mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Change editor hotkey Ctrl+A to Ctrl+T for layer/tile details
The hotkey Ctrl+A is already active universally in the editor to open and append a map to the current one. This collides with the hotkeys for opening the layer/tile details popup for tune, tele, speedup and switch layers, which is only active when a layer of said type is select. Pressing the hotkey in this context opens the popup and the append dialog at the same time, which is undesirable. Therefore the hotkey to open the layer/tile details is changed to Ctrl+T instead. This combination is currently unused and seems approriate, as the T could stand for "Tile details".
This commit is contained in:
parent
571b0b36de
commit
c916e5d262
|
@ -1166,11 +1166,11 @@ void CEditor::DoToolbar(CUIRect ToolBar)
|
||||||
if(pButtonName != nullptr)
|
if(pButtonName != nullptr)
|
||||||
{
|
{
|
||||||
static char aBuf[64];
|
static char aBuf[64];
|
||||||
str_format(aBuf, sizeof(aBuf), "[ctrl+a] %s", pButtonName);
|
str_format(aBuf, sizeof(aBuf), "[ctrl+t] %s", pButtonName);
|
||||||
|
|
||||||
TB_Bottom.VSplitLeft(60.0f, &Button, &TB_Bottom);
|
TB_Bottom.VSplitLeft(60.0f, &Button, &TB_Bottom);
|
||||||
static int s_ModifierButton = 0;
|
static int s_ModifierButton = 0;
|
||||||
if(DoButton_Ex(&s_ModifierButton, pButtonName, 0, &Button, 0, aBuf, IGraphics::CORNER_ALL) || (ModPressed && Input()->KeyPress(KEY_A)))
|
if(DoButton_Ex(&s_ModifierButton, pButtonName, 0, &Button, 0, aBuf, IGraphics::CORNER_ALL) || (ModPressed && Input()->KeyPress(KEY_T)))
|
||||||
{
|
{
|
||||||
static int s_ModifierPopupID = 0;
|
static int s_ModifierPopupID = 0;
|
||||||
if(!UiPopupExists(&s_ModifierPopupID))
|
if(!UiPopupExists(&s_ModifierPopupID))
|
||||||
|
|
Loading…
Reference in a new issue