mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 08:00:55 +02:00
* Fixes for ImGui map editing dialogs
This commit is contained in:
@@ -655,6 +655,8 @@ int MapEditClass::Pick_Scenario(char const * caption, int & scen_nump, ScenarioP
|
||||
g_globalKeyNumType = KN_NONE;
|
||||
g_globalKeyFlags = 0;
|
||||
UserInput.Process_Input();
|
||||
|
||||
Device_Present();
|
||||
}
|
||||
|
||||
Imgui_Dialog_Function = nullptr;
|
||||
@@ -1122,6 +1124,8 @@ int MapEditClass::Size_Map(int x, int y, int w, int h)
|
||||
g_globalKeyFlags = 0;
|
||||
UserInput.Process_Input();
|
||||
|
||||
Device_Present();
|
||||
|
||||
// display = REDRAW_NONE;
|
||||
|
||||
|
||||
@@ -1958,9 +1962,10 @@ int MapEditClass::Scenario_Dialog(void)
|
||||
*/
|
||||
KeyNumType input = KN_NONE; //commands->Input();
|
||||
|
||||
g_globalKeyNumType = KN_NONE;
|
||||
//g_globalKeyNumType = KN_NONE;
|
||||
g_globalKeyFlags = 0;
|
||||
UserInput.Process_Input();
|
||||
|
||||
UserInput.Process_Input(input);
|
||||
|
||||
/*
|
||||
** Process input
|
||||
@@ -2554,6 +2559,8 @@ int MapEditClass::Select_Trigger(void)
|
||||
g_globalKeyFlags = 0;
|
||||
UserInput.Process_Input();
|
||||
|
||||
Device_Present();
|
||||
|
||||
/*
|
||||
** Get user input
|
||||
*/
|
||||
|
||||
@@ -1589,7 +1589,7 @@ void MapEditClass::Main_Menu(void)
|
||||
g_globalKeyFlags = 0;
|
||||
UserInput.Process_Input();
|
||||
|
||||
Call_Back();
|
||||
Device_Present();
|
||||
|
||||
Show_Mouse();
|
||||
|
||||
@@ -1786,8 +1786,12 @@ void MapEditClass::AI_Menu(void)
|
||||
*/
|
||||
Call_Back();
|
||||
|
||||
g_globalKeyNumType = KN_NONE;
|
||||
g_globalKeyFlags = 0;
|
||||
UserInput.Process_Input();
|
||||
|
||||
Device_Present();
|
||||
|
||||
/*
|
||||
** Invoke menu
|
||||
*/
|
||||
|
||||
@@ -330,6 +330,12 @@ int MapEditClass::Select_Team(char const * )
|
||||
/*
|
||||
** Get user input
|
||||
*/
|
||||
g_globalKeyNumType = KN_NONE;
|
||||
g_globalKeyFlags = 0;
|
||||
UserInput.Process_Input();
|
||||
|
||||
//Device_Present();
|
||||
|
||||
KeyNumType input = commands->Input();
|
||||
|
||||
/*
|
||||
|
||||
@@ -245,11 +245,7 @@ int Check_Menu(int menu, char const * text[], char *, long field, int index, Key
|
||||
key = 0;
|
||||
UnknownKey = 0;
|
||||
if (Keyboard->Check()) {
|
||||
#ifdef WIN32
|
||||
key = (Keyboard->Get() & ~(WWKEY_SHIFT_BIT | WWKEY_ALT_BIT | WWKEY_CTRL_BIT)); /* mask off all but release bit */
|
||||
#else
|
||||
key = (Keyboard->Get() & 0x08FF); /* mask off all but release bit */
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -441,18 +437,23 @@ int Do_Menu(char const ** strings, bool )
|
||||
Keyboard->Clear();
|
||||
selection = -1;
|
||||
UnknownKey = 0;
|
||||
|
||||
// AI options main selection loop
|
||||
while (selection == -1) {
|
||||
// jmarshall
|
||||
Call_Back();
|
||||
|
||||
g_globalKeyNumType = KN_NONE;
|
||||
g_globalKeyFlags = 0;
|
||||
UserInput.Process_Input();
|
||||
|
||||
Call_Back();
|
||||
Device_Present();
|
||||
|
||||
Show_Mouse(true);
|
||||
|
||||
selection = Check_Menu(0, strings, NULL, 0xFFL, 0, (KeyNumType)g_globalKeyFlags);
|
||||
if (UnknownKey != 0 || UnknownKey == KN_ESC || UnknownKey==KN_LMOUSE || UnknownKey==KN_RMOUSE) break;
|
||||
if ( UnknownKey != 0 || UnknownKey == KN_ESC || UnknownKey==KN_LMOUSE || UnknownKey==KN_RMOUSE) break;
|
||||
}
|
||||
|
||||
Keyboard->Clear();
|
||||
Hide_Mouse();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user