1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 09:39:43 +01:00

Fix TAB bind conflict with translator & debugger

The TAB bind is used in both roomname translator mode and the level
debugger. To fix this, the TAB keybind will prioritize roomname
translator mode, unless the debugger text is enabled (with the Y
keybind), in which case the debugger takes priority. Additionally, the
roomname translator text will not render when the debugger text is
shown.

Fixes #1094.
This commit is contained in:
Misa 2024-01-05 11:42:10 -08:00
parent 7bd281ee3d
commit 95c6dc58d3

View file

@ -6,6 +6,7 @@
#include "Graphics.h"
#include "GraphicsUtil.h"
#include "KeyPoll.h"
#include "LevelDebugger.h"
#include "Localization.h"
#include "LocalizationMaint.h"
#include "Map.h"
@ -51,6 +52,11 @@ namespace roomname_translator
void overlay_render(bool* force_roomname_hidden, bool* roomname_untranslated, int* roomname_r, int* roomname_g, int* roomname_b)
{
if (level_debugger::is_active())
{
return;
}
if (edit_mode || help_screen)
{
fullscreen_rect.x = 0;
@ -369,7 +375,7 @@ namespace roomname_translator
help_screen = true;
}
if (key_pressed_once(SDLK_TAB, &held_tab))
if (key_pressed_once(SDLK_TAB, &held_tab) && !level_debugger::is_active())
{
edit_mode = !edit_mode;
}