Skip to content

Commit

Permalink
Allow some key binds in editor when GUI is hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
def- committed Jun 26, 2018
1 parent daf8347 commit 89ca2cf
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/game/editor/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5108,6 +5108,12 @@ void CEditor::Render()
if(m_ShowServerSettingsEditor && !m_ShowPicker)
View.HSplitBottom(250.0f, &View, &ExtraEditor);
}
else
{
// hack to get keyboard inputs from toolbar even when GUI is not active
ToolBar.HSplitTop(53.0f, &ToolBar, 0);
ToolBar.Margin(-1000, &ToolBar);
}

// a little hack for now
if(m_Mode == MODE_LAYERS)
Expand Down Expand Up @@ -5160,11 +5166,14 @@ void CEditor::Render()

RenderBackground(StatusBar, ms_BackgroundTexture, 128.0f, Brightness);
StatusBar.Margin(2.0f, &StatusBar);
}

// do the toolbar
if(m_Mode == MODE_LAYERS)
DoToolbar(ToolBar);
// do the toolbar
if(m_Mode == MODE_LAYERS)
DoToolbar(ToolBar);

if(m_GuiActive)
{
if(m_ShowEnvelopeEditor || m_ShowServerSettingsEditor)
{
RenderBackground(ExtraEditor, ms_BackgroundTexture, 128.0f, Brightness);
Expand Down

0 comments on commit 89ca2cf

Please sign in to comment.