Merge pull request #238 from Chairn/DDRace64

Zooming will work as in game for editor using numpad.
This commit is contained in:
Dennis Felsing 2015-07-23 00:38:52 +02:00
commit 1d548b66db

View file

@ -2289,7 +2289,7 @@ void CEditor::DoMapEditor(CUIRect View, CUIRect ToolBar)
} }
else else
{ {
if(UI()->MouseButton(1)) if(UI()->MouseButtonClicked(1))
m_Brush.Clear(); m_Brush.Clear();
if(UI()->MouseButton(0) && s_Operation == OP_NONE) if(UI()->MouseButton(0) && s_Operation == OP_NONE)
@ -4788,9 +4788,9 @@ void CEditor::Render()
DoMapEditor(View, ToolBar); DoMapEditor(View, ToolBar);
// do zooming // do zooming
if(Input()->KeyDown(KEY_KP_MINUS) && m_Dialog == DIALOG_NONE && m_EditBoxActive == 0) if(Input()->KeyPresses(KEY_KP_MINUS) && m_Dialog == DIALOG_NONE && m_EditBoxActive == 0)
m_ZoomLevel += 50; m_ZoomLevel += 50;
if(Input()->KeyDown(KEY_KP_PLUS) && m_Dialog == DIALOG_NONE && m_EditBoxActive == 0) if(Input()->KeyPresses(KEY_KP_PLUS) && m_Dialog == DIALOG_NONE && m_EditBoxActive == 0)
m_ZoomLevel -= 50; m_ZoomLevel -= 50;
if(Input()->KeyDown(KEY_KP_MULTIPLY) && m_Dialog == DIALOG_NONE && m_EditBoxActive == 0) if(Input()->KeyDown(KEY_KP_MULTIPLY) && m_Dialog == DIALOG_NONE && m_EditBoxActive == 0)
{ {