void CInMapDraw::MousePress(int x, int y, int button) { float3 pos = GetMouseMapPos(); if (pos.x < 0) return; switch (button) { case SDL_BUTTON_LEFT: { if (lastLeftClickTime > gu->gameTime - 0.3f) { PromptLabel(pos); } lastLeftClickTime = gu->gameTime; break; } case SDL_BUTTON_RIGHT: { SendErase(pos); break; } case SDL_BUTTON_MIDDLE:{ SendPoint(pos, "", false); break; } } lastPos = pos; }
void TouchScreen_::TouchDownB(uint16_t inx, uint16_t iny) { pointB.flag = true; pointB.x = inx + 1; pointB.y = iny + 1; SendPoint(); }
void CInMapDraw::SendWaitingInput(const std::string& label) { SendPoint(waitingPoint, label, false); wantLabel = false; drawMode = false; }
void TouchScreen_::TouchDownAll(uint16_t ax, uint16_t ay, uint16_t bx, uint16_t by) { pointA.flag = true; pointA.x = ax + 1; pointA.y = ay + 1; pointB.flag = true; pointB.x = bx + 1; pointB.y = by + 1; SendPoint(); }
void TouchScreen_::TouchUpB(void) { pointB.flag = false; SendPoint(); }
void TouchScreen_::TouchUpAll(void) { pointA.flag = false; pointA.flag = false; SendPoint(); }