mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- the keybinding menu is finally working.
Obviously the existing menu implementation from Duke Nukem needs to be tossed out at some point, but at least the functionality is there again.
This commit is contained in:
parent
94baca8b1e
commit
2997bb6292
32 changed files with 335 additions and 91 deletions
|
@ -175,9 +175,9 @@ void ctrlGetInput(void)
|
|||
gInput.keyFlags.quit = 1;
|
||||
|
||||
if (gGameStarted && gInputMode != kInputMessage && gInputMode != kInputMenu
|
||||
&& buttonMap.ButtonDown(gamefunc_Send_Message))
|
||||
&& buttonMap.ButtonDown(gamefunc_SendMessage))
|
||||
{
|
||||
buttonMap.ClearButton(gamefunc_Send_Message);
|
||||
buttonMap.ClearButton(gamefunc_SendMessage);
|
||||
inputState.keyFlushScans();
|
||||
gInputMode = kInputMessage;
|
||||
}
|
||||
|
@ -286,13 +286,13 @@ void ctrlGetInput(void)
|
|||
gInput.buttonFlags.lookDown = buttonMap.ButtonDown(gamefunc_Aim_Down);
|
||||
}
|
||||
|
||||
if (buttonMap.ButtonDown(gamefunc_Aim_Center))
|
||||
if (buttonMap.ButtonDown(gamefunc_Center_View))
|
||||
{
|
||||
buttonMap.ClearButton(gamefunc_Aim_Center);
|
||||
buttonMap.ClearButton(gamefunc_Center_View);
|
||||
gInput.keyFlags.lookCenter = 1;
|
||||
}
|
||||
|
||||
gInput.keyFlags.spin180 = buttonMap.ButtonDown(gamefunc_Turn_Around);
|
||||
gInput.keyFlags.spin180 = buttonMap.ButtonDown(gamefunc_TurnAround);
|
||||
|
||||
if (buttonMap.ButtonDown(gamefunc_Inventory_Left))
|
||||
{
|
||||
|
|
|
@ -1858,7 +1858,7 @@ int32_t handleevents_pollsdl(void)
|
|||
|
||||
while (SDL_PollEvent(&ev))
|
||||
{
|
||||
if (GUICapture & 2)
|
||||
if ((GUICapture & 10) == 2)
|
||||
{
|
||||
if (ImGui_ImplSDL2_ProcessEvent(&ev)) return 0;
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ static int GetConfigKeyFromName (const char *key)
|
|||
//
|
||||
//=============================================================================
|
||||
|
||||
static const char *KeyName (int key)
|
||||
const char *KeyName (int key)
|
||||
{
|
||||
static char name[5];
|
||||
|
||||
|
@ -294,14 +294,14 @@ void C_NameKeys (char *str, int first, int second)
|
|||
//
|
||||
//=============================================================================
|
||||
|
||||
FString C_NameKeys (int *keys, int count)
|
||||
FString C_NameKeys (int *keys, int count, bool colors)
|
||||
{
|
||||
FString result;
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
int key = keys[i];
|
||||
if (key == 0) continue;
|
||||
for (int j = 0; j < count; j++)
|
||||
for (int j = 0; j < i; j++)
|
||||
{
|
||||
if (key == keys[j])
|
||||
{
|
||||
|
@ -310,7 +310,7 @@ FString C_NameKeys (int *keys, int count)
|
|||
}
|
||||
}
|
||||
if (key == 0) continue;
|
||||
if (result.IsNotEmpty()) result += TEXTCOLOR_BLACK ", " TEXTCOLOR_NORMAL;
|
||||
if (result.IsNotEmpty()) result += colors? TEXTCOLOR_BLACK ", " TEXTCOLOR_NORMAL : ", ";
|
||||
result += KeyName(key);
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -42,8 +42,9 @@ struct event_t;
|
|||
class FConfigFile;
|
||||
class FCommandLine;
|
||||
|
||||
const char* KeyName(int key);
|
||||
void C_NameKeys (char *str, int first, int second);
|
||||
FString C_NameKeys (int *keys, int count);
|
||||
FString C_NameKeys (int *keys, int count, bool colors = false);
|
||||
|
||||
class FKeyBindings
|
||||
{
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include "printf.h"
|
||||
#include "cmdlib.h"
|
||||
#include "c_dispatch.h"
|
||||
#include "gamecontrol.h"
|
||||
|
||||
ButtonMap buttonMap;
|
||||
|
||||
|
@ -83,8 +84,8 @@ static const ButtonDesc gamefuncs[] = {
|
|||
{ gamefunc_Jetpack, "Jetpack"},
|
||||
{ gamefunc_NightVision, "NightVision"},
|
||||
{ gamefunc_MedKit, "MedKit"},
|
||||
{ gamefunc_TurnAround, "TurnAround"},
|
||||
{ gamefunc_SendMessage, "SendMessage"},
|
||||
{ gamefunc_TurnAround, "Turn_Around"},
|
||||
{ gamefunc_SendMessage, "Send_Message"},
|
||||
{ gamefunc_Map, "Map"},
|
||||
{ gamefunc_Shrink_Screen, "Shrink_Screen"},
|
||||
{ gamefunc_Enlarge_Screen, "Enlarge_Screen"},
|
||||
|
@ -111,11 +112,6 @@ static const ButtonDesc gamefuncs[] = {
|
|||
{ gamefunc_Third_Person_View, "Third_Person_View"},
|
||||
{ gamefunc_Toggle_Crouch, "Toggle_Crouch"},
|
||||
{ gamefunc_See_Chase_View, "See_Chase_View"}, // the following were added by Blood
|
||||
{ gamefunc_Turn_Around, "Turn_Around"},
|
||||
{ gamefunc_Aim_Center, "Aim_Center"},
|
||||
{ gamefunc_Tilt_Left, "Tilt_Left"},
|
||||
{ gamefunc_Tilt_Right, "Tilt_Right"},
|
||||
{ gamefunc_Send_Message, "Send_Message"},
|
||||
{ gamefunc_BeastVision, "BeastVision"},
|
||||
{ gamefunc_CrystalBall, "CrystalBall"},
|
||||
{ gamefunc_JumpBoots, "JumpBoots"},
|
||||
|
@ -128,6 +124,97 @@ static const ButtonDesc gamefuncs[] = {
|
|||
|
||||
};
|
||||
|
||||
static const ButtonDesc gamealiases_Duke3D[] = {
|
||||
{ gamefunc_BeastVision, ""},
|
||||
{ gamefunc_CrystalBall, ""},
|
||||
{ gamefunc_ProximityBombs, ""},
|
||||
{ gamefunc_RemoteBombs, ""},
|
||||
{ gamefunc_Smoke_Bomb, "" },
|
||||
{ gamefunc_Gas_Bomb, "" },
|
||||
{ gamefunc_Flash_Bomb, "" },
|
||||
{ gamefunc_Caltrops, "" },
|
||||
|
||||
};
|
||||
|
||||
static const ButtonDesc gamealiases_Nam[] = {
|
||||
{ gamefunc_Holo_Duke, "Holo_Soldier"},
|
||||
{ gamefunc_Jetpack, "Huey"},
|
||||
{ gamefunc_Steroids, "Tank_Mode"},
|
||||
{ gamefunc_Show_DukeMatch_Scores, "Show_GruntMatch_Scores"},
|
||||
{ gamefunc_BeastVision, ""},
|
||||
{ gamefunc_CrystalBall, ""},
|
||||
{ gamefunc_ProximityBombs, ""},
|
||||
{ gamefunc_RemoteBombs, ""},
|
||||
{ gamefunc_Smoke_Bomb, "" },
|
||||
{ gamefunc_Gas_Bomb, "" },
|
||||
{ gamefunc_Flash_Bomb, "" },
|
||||
{ gamefunc_Caltrops, "" },
|
||||
|
||||
};
|
||||
|
||||
static const ButtonDesc gamealiases_WW2GI[] = {
|
||||
{ gamefunc_Holo_Duke, "Fire Mission"},
|
||||
{ gamefunc_Jetpack, ""},
|
||||
{ gamefunc_Steroids, "Smokes"},
|
||||
{ gamefunc_Show_DukeMatch_Scores, "Show_GIMatch_Scores"},
|
||||
{ gamefunc_BeastVision, ""},
|
||||
{ gamefunc_CrystalBall, ""},
|
||||
{ gamefunc_ProximityBombs, ""},
|
||||
{ gamefunc_RemoteBombs, ""},
|
||||
{ gamefunc_Smoke_Bomb, "" },
|
||||
{ gamefunc_Gas_Bomb, "" },
|
||||
{ gamefunc_Flash_Bomb, "" },
|
||||
{ gamefunc_Caltrops, "" },
|
||||
};
|
||||
|
||||
static const ButtonDesc gamealiases_RR[] = {
|
||||
{ gamefunc_Holo_Duke, "Beer"},
|
||||
{ gamefunc_Jetpack, "Cow Pie"},
|
||||
{ gamefunc_NightVision, "Yeehaa"},
|
||||
{ gamefunc_MedKit, "Whiskey"},
|
||||
{ gamefunc_Steroids, "Moonshine"},
|
||||
{ gamefunc_Quick_Kick, "Pee"},
|
||||
{ gamefunc_Show_DukeMatch_Scores, "Show_Scores"},
|
||||
{ gamefunc_Alt_Fire, ""},
|
||||
{ gamefunc_BeastVision, ""},
|
||||
{ gamefunc_CrystalBall, ""},
|
||||
{ gamefunc_ProximityBombs, ""},
|
||||
{ gamefunc_RemoteBombs, ""},
|
||||
{ gamefunc_Smoke_Bomb, "" },
|
||||
{ gamefunc_Gas_Bomb, "" },
|
||||
{ gamefunc_Flash_Bomb, "" },
|
||||
{ gamefunc_Caltrops, "" },
|
||||
};
|
||||
|
||||
static const ButtonDesc gamealiases_Blood[] = {
|
||||
{ gamefunc_Holo_Duke, ""},
|
||||
{ gamefunc_JumpBoots, "JumpBoots"},
|
||||
{ gamefunc_Steroids, ""},
|
||||
{ gamefunc_Quick_Kick, ""},
|
||||
{ gamefunc_Show_DukeMatch_Scores, ""},
|
||||
{ gamefunc_Alt_Weapon, ""},
|
||||
{ gamefunc_Smoke_Bomb, "" },
|
||||
{ gamefunc_Gas_Bomb, "" },
|
||||
{ gamefunc_Flash_Bomb, "" },
|
||||
{ gamefunc_Caltrops, "" },
|
||||
|
||||
};
|
||||
|
||||
static const ButtonDesc gamealiases_SW[] = {
|
||||
{ gamefunc_Holo_Duke, ""},
|
||||
{ gamefunc_Jetpack, ""},
|
||||
{ gamefunc_NightVision, ""},
|
||||
{ gamefunc_MedKit, ""},
|
||||
{ gamefunc_Steroids, ""},
|
||||
{ gamefunc_Quick_Kick, ""},
|
||||
{ gamefunc_Show_DukeMatch_Scores, ""},
|
||||
{ gamefunc_Smoke_Bomb, "" },
|
||||
{ gamefunc_Gas_Bomb, "" },
|
||||
{ gamefunc_Flash_Bomb, "" },
|
||||
{ gamefunc_Caltrops, "" },
|
||||
|
||||
};
|
||||
|
||||
// This is for use by the tab command builder which can run before the optimized tables are initialized.
|
||||
const char* StaticGetButtonName(int32_t func)
|
||||
{
|
||||
|
@ -159,6 +246,59 @@ ButtonMap::ButtonMap()
|
|||
//
|
||||
//=============================================================================
|
||||
|
||||
void ButtonMap::SetGameAliases()
|
||||
{
|
||||
// Ion Fury hacks this together from the CON script and uses the same table as Duke Nukem
|
||||
if (g_gameType & (GAMEFLAG_DUKE|GAMEFLAG_FURY))
|
||||
{
|
||||
for (auto& gf : gamealiases_Duke3D)
|
||||
{
|
||||
NumToAlias[gf.index] = gf.name;
|
||||
}
|
||||
}
|
||||
if (g_gameType & GAMEFLAG_NAM)
|
||||
{
|
||||
for (auto& gf : gamealiases_Nam)
|
||||
{
|
||||
NumToAlias[gf.index] = gf.name;
|
||||
}
|
||||
}
|
||||
if (g_gameType & GAMEFLAG_WW2GI)
|
||||
{
|
||||
for (auto& gf : gamealiases_WW2GI)
|
||||
{
|
||||
NumToAlias[gf.index] = gf.name;
|
||||
}
|
||||
}
|
||||
if (g_gameType & (GAMEFLAG_RR|GAMEFLAG_RRRA))
|
||||
{
|
||||
for (auto& gf : gamealiases_RR)
|
||||
{
|
||||
NumToAlias[gf.index] = gf.name;
|
||||
}
|
||||
}
|
||||
if (g_gameType & GAMEFLAG_BLOOD)
|
||||
{
|
||||
for (auto& gf : gamealiases_Blood)
|
||||
{
|
||||
NumToAlias[gf.index] = gf.name;
|
||||
}
|
||||
}
|
||||
if (g_gameType & GAMEFLAG_SW)
|
||||
{
|
||||
for (auto& gf : gamealiases_SW)
|
||||
{
|
||||
NumToAlias[gf.index] = gf.name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
int ButtonMap::ListActionCommands (const char *pattern)
|
||||
{
|
||||
char matcher[32];
|
||||
|
|
|
@ -16,7 +16,7 @@ enum GameFunction_t
|
|||
gamefunc_Fire,
|
||||
gamefunc_Open,
|
||||
gamefunc_Run,
|
||||
gamefunc_Alt_Fire,
|
||||
gamefunc_Alt_Fire, // Duke3D, Blood
|
||||
gamefunc_Jump,
|
||||
gamefunc_Crouch,
|
||||
gamefunc_Look_Up,
|
||||
|
@ -41,8 +41,9 @@ enum GameFunction_t
|
|||
gamefunc_Inventory_Use = gamefunc_Inventory,
|
||||
gamefunc_Inventory_Left,
|
||||
gamefunc_Inventory_Right,
|
||||
gamefunc_Holo_Duke,
|
||||
gamefunc_Holo_Duke, // Duke3D, RR
|
||||
gamefunc_Jetpack,
|
||||
gamefunc_JumpBoots = gamefunc_Jetpack,
|
||||
gamefunc_NightVision,
|
||||
gamefunc_Night_Vision = gamefunc_NightVision,
|
||||
gamefunc_MedKit,
|
||||
|
@ -75,16 +76,10 @@ enum GameFunction_t
|
|||
gamefunc_Quick_Load,
|
||||
gamefunc_Alt_Weapon,
|
||||
gamefunc_Third_Person_View,
|
||||
gamefunc_See_Chase_View = gamefunc_Third_Person_View, // this was added by Blood
|
||||
gamefunc_Toggle_Crouch,
|
||||
gamefunc_See_Chase_View, // this was added by Blood
|
||||
gamefunc_Turn_Around,
|
||||
gamefunc_Aim_Center,
|
||||
gamefunc_Tilt_Left,
|
||||
gamefunc_Tilt_Right,
|
||||
gamefunc_Send_Message,
|
||||
gamefunc_BeastVision,
|
||||
gamefunc_CrystalBall,
|
||||
gamefunc_JumpBoots,
|
||||
gamefunc_ProximityBombs,
|
||||
gamefunc_RemoteBombs,
|
||||
gamefunc_Smoke_Bomb, // and these by ShadowWarrior (todo: There's quite a bit of potential for consolidation here - is it worth it?)
|
||||
|
@ -123,6 +118,7 @@ class ButtonMap
|
|||
|
||||
public:
|
||||
ButtonMap();
|
||||
void SetGameAliases();
|
||||
|
||||
constexpr int NumButtons() const
|
||||
{
|
||||
|
|
|
@ -163,6 +163,7 @@ void D_ProcessEvents (void)
|
|||
// Called by the I/O functions when input is detected.
|
||||
//
|
||||
//==========================================================================
|
||||
void sendKeyForBinding(int key);
|
||||
|
||||
void D_PostEvent (const event_t *ev)
|
||||
{
|
||||
|
@ -194,6 +195,13 @@ void D_PostEvent (const event_t *ev)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((GUICapture & 8) && ev->type == EV_KeyDown)
|
||||
{
|
||||
// This must bypass the entire event management
|
||||
sendKeyForBinding(ev->data1);
|
||||
return;
|
||||
}
|
||||
|
||||
// Add the key to the global keyboard state.
|
||||
// This is probably the biggest roadblock with the input system as it undermines a proper event driven approach.
|
||||
|
|
|
@ -386,6 +386,7 @@ int CONFIG_Init()
|
|||
playername = userConfig.CommandName;
|
||||
}
|
||||
V_InitFonts();
|
||||
buttonMap.SetGameAliases();
|
||||
|
||||
|
||||
|
||||
|
|
92
source/common/optionmenu/optionmenu.cpp
Normal file
92
source/common/optionmenu/optionmenu.cpp
Normal file
|
@ -0,0 +1,92 @@
|
|||
|
||||
|
||||
|
||||
#include "imgui.h"
|
||||
#include "v_draw.h"
|
||||
#include "gamecvars.h"
|
||||
#include "c_buttons.h"
|
||||
#include "c_bind.h"
|
||||
#include "inputstate.h"
|
||||
|
||||
FString activeCommand;
|
||||
|
||||
void sendKeyForBinding(int key)
|
||||
{
|
||||
Bindings.DoBind(KeyName(key), activeCommand);
|
||||
GUICapture &= ~8;
|
||||
}
|
||||
|
||||
|
||||
bool ShowOptionMenu()
|
||||
{
|
||||
bool isOpen = true;
|
||||
int w = screen->GetWidth(), h = screen->GetHeight();
|
||||
double scale;
|
||||
if (w >= 1024 && h >= 768)
|
||||
{
|
||||
scale = 1;
|
||||
ImGui::SetNextWindowPos(ImVec2((w-1024)/2, (h-768)/2), ImGuiCond_Always);
|
||||
ImGui::SetNextWindowSize(ImVec2(1024, 768), ImGuiCond_Always);
|
||||
}
|
||||
else
|
||||
{
|
||||
// This should use a smaller font!
|
||||
scale = 640.0/1024.0;
|
||||
ImGui::SetNextWindowPos(ImVec2((w-640)/2, (h-480)/2), ImGuiCond_Always);
|
||||
ImGui::SetNextWindowSize(ImVec2(640, 480), ImGuiCond_Always);
|
||||
}
|
||||
|
||||
|
||||
const int window_flags = ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize;
|
||||
// Main body of the Demo window starts here.
|
||||
if (!ImGui::Begin("Customize Controls", &isOpen, window_flags))
|
||||
{
|
||||
// Early out if the window is collapsed, as an optimization.
|
||||
ImGui::End();
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < NUMGAMEFUNCTIONS; i++)
|
||||
{
|
||||
FString al = buttonMap.GetButtonAlias(i);
|
||||
FString cmd = "+" + al;
|
||||
if (al.IsNotEmpty())
|
||||
{
|
||||
al.Substitute('_', ' ');
|
||||
ImGui::Text(al.GetChars());
|
||||
ImGui::SameLine(300*scale);
|
||||
al = buttonMap.GetButtonName(i);
|
||||
auto binds = Bindings.GetKeysForCommand(cmd);
|
||||
al = C_NameKeys(binds.Data(), binds.Size());
|
||||
if (ImGui::Button(al, ImVec2(450 * scale, 0)))
|
||||
{
|
||||
activeCommand = cmd;
|
||||
ImGui::OpenPopup("Bind");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ImGui::BeginPopupModal("Bind", NULL, ImGuiWindowFlags_AlwaysAutoResize))
|
||||
{
|
||||
auto binds = Bindings.GetKeysForCommand(activeCommand);
|
||||
auto al = C_NameKeys(binds.Data(), binds.Size());
|
||||
|
||||
ImGui::Text("Press 'bind' to enter binding mode or\n'delete' to clear all bindings for this action\n\nCurrently bound to this action:\n%s\n\n", al.GetChars());
|
||||
ImGui::Separator();
|
||||
if (ImGui::Button("Done", ImVec2(120, 0))) { ImGui::CloseCurrentPopup(); }
|
||||
ImGui::SetItemDefaultFocus();
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Clear", ImVec2(120, 0))) { Bindings.UnbindACommand(activeCommand); }
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Bind", ImVec2(120, 0)))
|
||||
{
|
||||
// Todo: Set event handler to binding mode.
|
||||
// Wait for a bound key to arrive and add to the current command.
|
||||
GUICapture |= 8;
|
||||
}
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
|
||||
|
||||
ImGui::End();
|
||||
return isOpen;
|
||||
}
|
|
@ -444,7 +444,7 @@ MAKE_MENU_TOP_ENTRYLINK( "Player Setup", MEF_OptionsMenu, OPTIONS_PLAYERSETUP, M
|
|||
#ifndef EDUKE32_ANDROID_MENU
|
||||
MAKE_MENU_TOP_ENTRYLINK( "Control Setup", MEF_OptionsMenu, OPTIONS_CONTROLS, MENU_CONTROLS );
|
||||
|
||||
MAKE_MENU_TOP_ENTRYLINK( "Keyboard Setup", MEF_BigOptionsRtSections, OPTIONS_KEYBOARDSETUP, MENU_KEYBOARDSETUP );
|
||||
MAKE_MENU_TOP_ENTRYLINK( "Configure Controls", MEF_BigOptionsRtSections, OPTIONS_KEYBOARDSETUP, MENU_KEYBOARDSETUP );
|
||||
MAKE_MENU_TOP_ENTRYLINK( "Mouse Setup", MEF_BigOptionsRtSections, OPTIONS_MOUSESETUP, MENU_MOUSESETUP );
|
||||
#endif
|
||||
MAKE_MENU_TOP_ENTRYLINK( "Gamepad Setup", MEF_BigOptionsRtSections, OPTIONS_JOYSTICKSETUP, MENU_JOYSTICKSETUP );
|
||||
|
@ -708,7 +708,7 @@ static MenuEntry_t ME_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
|
|||
static MenuEntry_t *MEL_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
|
||||
|
||||
static MenuLink_t MEO_KEYBOARDSETUP_KEYS = { MENU_KEYBOARDKEYS, MA_Advance, };
|
||||
static MenuEntry_t ME_KEYBOARDSETUP_KEYS = MAKE_MENUENTRY( "Configure Keys", &MF_Redfont, &MEF_CenterMenu, &MEO_KEYBOARDSETUP_KEYS, Link );
|
||||
static MenuEntry_t ME_KEYBOARDSETUP_KEYS = MAKE_MENUENTRY( "Edit Configuration", &MF_Redfont, &MEF_CenterMenu, &MEO_KEYBOARDSETUP_KEYS, Link );
|
||||
static MenuLink_t MEO_KEYBOARDSETUP_RESET = { MENU_KEYSRESETVERIFY, MA_None, };
|
||||
static MenuEntry_t ME_KEYBOARDSETUP_RESET = MAKE_MENUENTRY( "Reset To Defaults", &MF_Redfont, &MEF_CenterMenu, &MEO_KEYBOARDSETUP_RESET, Link );
|
||||
static MenuLink_t MEO_KEYBOARDSETUP_RESETCLASSIC = { MENU_KEYSCLASSICVERIFY, MA_None, };
|
||||
|
@ -1250,7 +1250,7 @@ static MenuMenu_t M_GAMESETUP = MAKE_MENUMENU( "Game Setup", &MMF_BigOptions, ME
|
|||
#endif
|
||||
static MenuMenu_t M_OPTIONS = MAKE_MENUMENU( s_Options, &MMF_Top_Options, MEL_OPTIONS );
|
||||
static MenuMenu_t M_VIDEOSETUP = MAKE_MENUMENU( "Video Mode", &MMF_BigOptions, MEL_VIDEOSETUP );
|
||||
static MenuMenu_t M_KEYBOARDSETUP = MAKE_MENUMENU( "Keyboard Setup", &MMF_Top_Options, MEL_KEYBOARDSETUP );
|
||||
static MenuMenu_t M_KEYBOARDSETUP = MAKE_MENUMENU( "Configure Controls", &MMF_Top_Options, MEL_KEYBOARDSETUP );
|
||||
static MenuMenu_t M_CONTROLS = MAKE_MENUMENU( "Control Setup", &MMF_BigOptions, MEL_CONTROLS );
|
||||
static MenuMenu_t M_CHEATS = MAKE_MENUMENU( "Cheats", &MMF_SmallOptions, MEL_CHEATS );
|
||||
static MenuMenu_t M_MOUSESETUP = MAKE_MENUMENU( "Mouse Setup", &MMF_BigOptions, MEL_MOUSESETUP );
|
||||
|
@ -3782,10 +3782,10 @@ int32_t Menu_Anim_SinInLeft(MenuAnimation_t *animdata)
|
|||
|
||||
void Menu_AnimateChange(int32_t cm, MenuAnimationType_t animtype)
|
||||
{
|
||||
if (cm == MENU_OPTIONS)
|
||||
if (cm == MENU_KEYBOARDKEYS)
|
||||
{
|
||||
//GUICapture |= 2;
|
||||
//return;
|
||||
GUICapture |= 2;
|
||||
return;
|
||||
}
|
||||
|
||||
if (FURY)
|
||||
|
|
|
@ -411,7 +411,7 @@ MAKE_MENU_TOP_ENTRYLINK( "Player Setup", MEF_OptionsMenu, OPTIONS_PLAYERSETUP, M
|
|||
#ifndef EDUKE32_ANDROID_MENU
|
||||
MAKE_MENU_TOP_ENTRYLINK( "Control Setup", MEF_OptionsMenu, OPTIONS_CONTROLS, MENU_CONTROLS );
|
||||
|
||||
MAKE_MENU_TOP_ENTRYLINK( "Keyboard Setup", MEF_CenterMenu, OPTIONS_KEYBOARDSETUP, MENU_KEYBOARDSETUP );
|
||||
MAKE_MENU_TOP_ENTRYLINK( "Configure Controls", MEF_CenterMenu, OPTIONS_KEYBOARDSETUP, MENU_KEYBOARDSETUP );
|
||||
MAKE_MENU_TOP_ENTRYLINK( "Mouse Setup", MEF_CenterMenu, OPTIONS_MOUSESETUP, MENU_MOUSESETUP );
|
||||
#endif
|
||||
MAKE_MENU_TOP_ENTRYLINK( "Joystick Setup", MEF_CenterMenu, OPTIONS_JOYSTICKSETUP, MENU_JOYSTICKSETUP );
|
||||
|
@ -663,7 +663,7 @@ static MenuEntry_t ME_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
|
|||
static MenuEntry_t *MEL_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
|
||||
|
||||
static MenuLink_t MEO_KEYBOARDSETUP_KEYS = { MENU_KEYBOARDKEYS, MA_Advance, };
|
||||
static MenuEntry_t ME_KEYBOARDSETUP_KEYS = MAKE_MENUENTRY( "Configure Keys", &MF_Redfont, &MEF_CenterMenu, &MEO_KEYBOARDSETUP_KEYS, Link );
|
||||
static MenuEntry_t ME_KEYBOARDSETUP_KEYS = MAKE_MENUENTRY( "Edit Configuration", &MF_Redfont, &MEF_CenterMenu, &MEO_KEYBOARDSETUP_KEYS, Link );
|
||||
static MenuEntry_t ME_KEYBOARDSETUP_RESET = MAKE_MENUENTRY( "Reset To Defaults", &MF_Redfont, &MEF_CenterMenu, &MEO_NULL, Link );
|
||||
static MenuEntry_t ME_KEYBOARDSETUP_RESETCLASSIC = MAKE_MENUENTRY( "Reset To Classic", &MF_Redfont, &MEF_CenterMenu, &MEO_NULL, Link );
|
||||
|
||||
|
@ -1198,7 +1198,7 @@ static MenuMenu_t M_GAMESETUP = MAKE_MENUMENU( "Game Setup", &MMF_BigOptions, ME
|
|||
#endif
|
||||
static MenuMenu_t M_OPTIONS = MAKE_MENUMENU( s_Options, &MMF_Top_Options, MEL_OPTIONS );
|
||||
static MenuMenu_t M_VIDEOSETUP = MAKE_MENUMENU( "Video Mode", &MMF_BigOptions, MEL_VIDEOSETUP );
|
||||
static MenuMenu_t M_KEYBOARDSETUP = MAKE_MENUMENU( "Keyboard Setup", &MMF_Top_Options, MEL_KEYBOARDSETUP );
|
||||
static MenuMenu_t M_KEYBOARDSETUP = MAKE_MENUMENU( "Configure Controls", &MMF_Top_Options, MEL_KEYBOARDSETUP );
|
||||
static MenuMenu_t M_CONTROLS = MAKE_MENUMENU( "Control Setup", &MMF_Top_Options, MEL_CONTROLS );
|
||||
static MenuMenu_t M_CHEATS = MAKE_MENUMENU( "Cheats", &MMF_SmallOptions, MEL_CHEATS );
|
||||
static MenuMenu_t M_MOUSESETUP = MAKE_MENUMENU( "Mouse Setup", &MMF_BigOptions, MEL_MOUSESETUP );
|
||||
|
@ -4153,6 +4153,12 @@ int32_t Menu_Anim_SinInLeft(MenuAnimation_t *animdata)
|
|||
|
||||
void Menu_AnimateChange(int32_t cm, MenuAnimationType_t animtype)
|
||||
{
|
||||
if (cm == MENU_KEYBOARDKEYS)
|
||||
{
|
||||
GUICapture |= 2;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (animtype)
|
||||
{
|
||||
case MA_Advance:
|
||||
|
|
|
@ -24,15 +24,15 @@ Home "+Aim_Up"
|
|||
KP7 "+Aim_Up"
|
||||
End "+Aim_Down"
|
||||
KP1 "+Aim_Down"
|
||||
KP5 "+Aim_Center"
|
||||
KP5 "+Center_View"
|
||||
PgUp "+Look_Up"
|
||||
KP9 "+Look_Up"
|
||||
PgDn "+Look_Down"
|
||||
KP3 "+Look_Down"
|
||||
Ins "+Tilt_Left"
|
||||
KP0 "+Tilt_Left"
|
||||
Del "+Tilt_Right"
|
||||
KP. "+Tilt_Right"
|
||||
Ins "+Look_Left"
|
||||
KP0 "+Look_Left"
|
||||
Del "+Look_Right"
|
||||
KP. "+Look_Right"
|
||||
1 "+Weapon_1"
|
||||
2 "+Weapon_2"
|
||||
3 "+Weapon_3"
|
||||
|
@ -64,7 +64,7 @@ Scroll "+Holster_Weapon"
|
|||
Y "+Show_Opponents_Weapon"
|
||||
B "+BeastVision"
|
||||
C "+CrystalBall"
|
||||
J "+JumpBoots"
|
||||
J "+JetPack"
|
||||
M "+MedKit"
|
||||
P "+ProximityBombs"
|
||||
R "+RemoteBombs"
|
||||
|
|
|
@ -27,10 +27,10 @@ Home "+Aim_Up"
|
|||
End "+Aim_Down"
|
||||
PgUp "+Look_Up"
|
||||
PgDn "+Look_Down"
|
||||
Ins "+Tilt_Left"
|
||||
KP0 "+Tilt_Left"
|
||||
Del "+Tilt_Right"
|
||||
KP. "+Tilt_Right"
|
||||
Ins "+Look_Left"
|
||||
KP0 "+Look_Left"
|
||||
Del "+Look_Right"
|
||||
KP. "+Look_Right"
|
||||
1 "+Weapon_1"
|
||||
2 "+Weapon_2"
|
||||
3 "+Weapon_3"
|
||||
|
@ -51,7 +51,7 @@ F "+Map_Follow_Mode"
|
|||
= "+Enlarge_Screen"
|
||||
T "+Send_Message"
|
||||
K "+See_Coop_View"
|
||||
F7 "+See_Chase_View"
|
||||
F7 "+Third_Person_View"
|
||||
U "+Mouse_Aiming"
|
||||
I "+Toggle_Crosshair"
|
||||
' "+Next_Weapon"
|
||||
|
@ -60,7 +60,7 @@ Scroll "+Holster_Weapon"
|
|||
W "+Show_Opponents_Weapon"
|
||||
B "+BeastVision"
|
||||
C "+CrystalBall"
|
||||
J "+JumpBoots"
|
||||
J "+JetPack"
|
||||
M "+MedKit"
|
||||
P "+ProximityBombs"
|
||||
R "+RemoteBombs"
|
||||
|
|
|
@ -25,15 +25,15 @@ Home "+Aim_Up"
|
|||
KP7 "+Aim_Up"
|
||||
End "+Aim_Down"
|
||||
KP1 "+Aim_Down"
|
||||
KP5 "+Aim_Center"
|
||||
KP5 "+Center_View"
|
||||
PgUp "+Look_Up"
|
||||
KP9 "+Look_Up"
|
||||
PgDn "+Look_Down"
|
||||
KP3 "+Look_Down"
|
||||
Ins "+Tilt_Left"
|
||||
KP0 "+Tilt_Left"
|
||||
Del "+Tilt_Right"
|
||||
KP. "+Tilt_Right"
|
||||
Ins "+Look_Left"
|
||||
KP0 "+Look_Left"
|
||||
Del "+Look_Right"
|
||||
KP. "+Look_Right"
|
||||
1 "+Weapon_1"
|
||||
2 "+Weapon_2"
|
||||
3 "+Weapon_3"
|
||||
|
@ -56,7 +56,7 @@ KP- "+Shrink_Screen"
|
|||
KP+ "+Enlarge_Screen"
|
||||
T "+Send_Message"
|
||||
K "+See_Coop_View"
|
||||
F7 "+See_Chase_View"
|
||||
F7 "+Third_Person_View"
|
||||
U "+Mouse_Aiming"
|
||||
I "+Toggle_Crosshair"
|
||||
' "+Next_Weapon"
|
||||
|
@ -65,7 +65,7 @@ Scroll "+Holster_Weapon"
|
|||
W "+Show_Opponents_Weapon"
|
||||
B "+BeastVision"
|
||||
C "+CrystalBall"
|
||||
J "+JumpBoots"
|
||||
J "+JetPack"
|
||||
M "+MedKit"
|
||||
P "+ProximityBombs"
|
||||
R "+RemoteBombs"
|
||||
|
|
|
@ -47,8 +47,8 @@ H "+Holo_Duke"
|
|||
J "+Jetpack"
|
||||
N "+NightVision"
|
||||
M "+MedKit"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
KP- "+Shrink_Screen"
|
||||
|
|
|
@ -44,8 +44,8 @@ H "+Holo_Duke"
|
|||
J "+Jetpack"
|
||||
N "+NightVision"
|
||||
M "+MedKit"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
= "+Enlarge_Screen"
|
||||
|
|
|
@ -48,8 +48,8 @@ H "+Holo_Duke"
|
|||
J "+Jetpack"
|
||||
N "+NightVision"
|
||||
M "+MedKit"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
KP- "+Shrink_Screen"
|
||||
|
|
|
@ -43,8 +43,8 @@ Enter "+Inventory"
|
|||
KP-Enter "+Inventory"
|
||||
[ "+Inventory_Left"
|
||||
] "+Inventory_Right"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
KP- "+Shrink_Screen"
|
||||
|
|
|
@ -44,8 +44,8 @@ Enter "+Inventory"
|
|||
KP-Enter "+Inventory"
|
||||
[ "+Inventory_Left"
|
||||
] "+Inventory_Right"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
= "+Enlarge_Screen"
|
||||
|
|
|
@ -44,8 +44,8 @@ Enter "+Inventory"
|
|||
KP-Enter "+Inventory"
|
||||
[ "+Inventory_Left"
|
||||
] "+Inventory_Right"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
KP- "+Shrink_Screen"
|
||||
|
|
|
@ -47,8 +47,8 @@ H "+Holo_Duke"
|
|||
J "+Jetpack"
|
||||
N "+NightVision"
|
||||
M "+MedKit"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
KP- "+Shrink_Screen"
|
||||
|
|
|
@ -48,8 +48,8 @@ H "+Holo_Duke"
|
|||
J "+Jetpack"
|
||||
N "+NightVision"
|
||||
M "+MedKit"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
= "+Enlarge_Screen"
|
||||
|
|
|
@ -48,8 +48,8 @@ H "+Holo_Duke"
|
|||
J "+Jetpack"
|
||||
N "+NightVision"
|
||||
M "+MedKit"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
KP- "+Shrink_Screen"
|
||||
|
|
|
@ -48,8 +48,8 @@ B "+Holo_Duke"
|
|||
C "+Jetpack"
|
||||
Y "+NightVision"
|
||||
R "+MedKit"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
KP- "+Shrink_Screen"
|
||||
|
|
|
@ -48,8 +48,8 @@ B "+Holo_Duke"
|
|||
C "+Jetpack"
|
||||
Y "+NightVision"
|
||||
W "+MedKit"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
= "+Enlarge_Screen"
|
||||
|
|
|
@ -50,8 +50,8 @@ B "+Holo_Duke"
|
|||
C "+Jetpack"
|
||||
Y "+NightVision"
|
||||
W "+MedKit"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
KP- "+Shrink_Screen"
|
||||
|
|
|
@ -26,8 +26,8 @@ N "+Nightvision"
|
|||
G "+Gas_Bomb"
|
||||
F "+Flash_Bomb"
|
||||
C "+Caltrops"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
= "+Enlarge_Screen"
|
||||
|
|
|
@ -46,8 +46,8 @@ N "+Nightvision"
|
|||
G "+Gas_Bomb"
|
||||
F "+Flash_Bomb"
|
||||
C "+Caltrops"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
= "+Enlarge_Screen"
|
||||
|
|
|
@ -48,8 +48,8 @@ N "+Nightvision"
|
|||
G "+Gas_Bomb"
|
||||
F "+Flash_Bomb"
|
||||
C "+Caltrops"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
KP- "+Shrink_Screen"
|
||||
|
|
|
@ -47,8 +47,8 @@ H "+Holo_Duke"
|
|||
J "+Jetpack"
|
||||
N "+NightVision"
|
||||
M "+MedKit"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
KP- "+Shrink_Screen"
|
||||
|
|
|
@ -49,8 +49,8 @@ H "+Holo_Duke"
|
|||
J "+Jetpack"
|
||||
N "+NightVision"
|
||||
M "+MedKit"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
= "+Enlarge_Screen"
|
||||
|
|
|
@ -49,8 +49,8 @@ H "+Holo_Duke"
|
|||
J "+Jetpack"
|
||||
N "+NightVision"
|
||||
M "+MedKit"
|
||||
Backspace "+TurnAround"
|
||||
T "+SendMessage"
|
||||
Backspace "+Turn_Around"
|
||||
T "+Send_Message"
|
||||
Tab "+Map"
|
||||
- "+Shrink_Screen"
|
||||
KP- "+Shrink_Screen"
|
||||
|
|
Loading…
Reference in a new issue