mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49: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:
parent
7bd281ee3d
commit
95c6dc58d3
1 changed files with 7 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
||||||
#include "Graphics.h"
|
#include "Graphics.h"
|
||||||
#include "GraphicsUtil.h"
|
#include "GraphicsUtil.h"
|
||||||
#include "KeyPoll.h"
|
#include "KeyPoll.h"
|
||||||
|
#include "LevelDebugger.h"
|
||||||
#include "Localization.h"
|
#include "Localization.h"
|
||||||
#include "LocalizationMaint.h"
|
#include "LocalizationMaint.h"
|
||||||
#include "Map.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)
|
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)
|
if (edit_mode || help_screen)
|
||||||
{
|
{
|
||||||
fullscreen_rect.x = 0;
|
fullscreen_rect.x = 0;
|
||||||
|
@ -369,7 +375,7 @@ namespace roomname_translator
|
||||||
help_screen = true;
|
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;
|
edit_mode = !edit_mode;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue