--- nono/wx/wxmpumonitor.cpp 2026/04/29 17:04:56 1.1.1.4 +++ nono/wx/wxmpumonitor.cpp 2026/04/29 17:05:08 1.1.1.5 @@ -4,7 +4,12 @@ // Licensed under nono-license.txt // +// +// MPU 関係のモニターウィンドウ +// + #include "wxmpumonitor.h" +#include "fontmanager.h" #include "wxtextscreen.h" #include "m88200.h" @@ -33,10 +38,10 @@ WXCacheWindow::OnLeftDown(wxMouseEvent& { const wxPoint& pos = event.GetPosition(); - // テキストの桁数、行数 - const wxSize& font = screen->GetFontSize(); - int x = pos.x / font.GetWidth(); - int y = pos.y / font.GetHeight(); + // テキストの桁数、行数にする + wxPoint tpos = screen->GetTextPosition(pos); + int x = tpos.x; + int y = tpos.y; // クリックされた場所のセット番号に更新 x -= 3;