Adaptation of viewport for confirm mode.
This commit is contained in:
@@ -1208,6 +1208,7 @@ void SQGSWindow_Register(Squirrel *engine)
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_SHIFT, "WID_TT_SHIFT");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_CTRL, "WID_TT_CTRL");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_MOVE, "WID_TT_MOVE");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_CONFIRM, "WID_TT_CONFIRM");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TD_SORT_ORDER, "WID_TD_SORT_ORDER");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TD_SORT_CRITERIA, "WID_TD_SORT_CRITERIA");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TD_LIST, "WID_TD_LIST");
|
||||
|
||||
1334
src/script/api/game/game_window.hpp.sq.orig
Normal file
1334
src/script/api/game/game_window.hpp.sq.orig
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2841,9 +2841,18 @@ static void MouseLoop(MouseClick click, int mousewheel)
|
||||
Window *w = FindWindowFromPt(x, y);
|
||||
if (w == NULL) return;
|
||||
ViewPort *vp = IsPtInWindowViewport(w, x, y);
|
||||
bool confirm = (_settings_client.gui.touchscreen_mode == TSC_CONFIRM);
|
||||
|
||||
HandlePlacePresize();
|
||||
UpdateTileSelection();
|
||||
/* Don't allow any action in a viewport if either in menu or when having a modal progress window */
|
||||
if (vp != NULL && (_game_mode == GM_MENU || HasModalProgress())) return;
|
||||
|
||||
/* On confirm mode do not update tile selection unless we are clicking on a viewport. */
|
||||
if (!confirm || (vp != NULL && _left_button_down && !_move_pressed)) {
|
||||
HandlePlacePresize();
|
||||
UpdateTileSelection();
|
||||
} else {
|
||||
//if presize, show tooltip if needed
|
||||
}
|
||||
|
||||
if (VpHandlePlaceSizingDrag() == ES_HANDLED) return;
|
||||
if (HandleMouseDragDrop() == ES_HANDLED) return;
|
||||
@@ -2860,9 +2869,6 @@ static void MouseLoop(MouseClick click, int mousewheel)
|
||||
|
||||
if (click != MC_NONE && click != MC_HOVER && !MaybeBringWindowToFront(w)) return;
|
||||
|
||||
/* Don't allow any action in a viewport if either in menu or when having a modal progress window */
|
||||
if (vp != NULL && (_game_mode == GM_MENU || HasModalProgress())) return;
|
||||
|
||||
if (mousewheel != 0) {
|
||||
/* Send mousewheel event to window */
|
||||
w->OnMouseWheel(mousewheel);
|
||||
|
||||
3527
src/window.cpp.orig
Normal file
3527
src/window.cpp.orig
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user