diff options
| author | oy <Tom_Adams@web.de> | 2010-06-22 14:15:52 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-06-22 14:15:52 +0200 |
| commit | 6b713157a71a617b39734160d492e6b5ec56adab (patch) | |
| tree | f43ec59ffccceffd2dc3e5dd5fcb9e9c2a736d3a /src/game/editor | |
| parent | 62ffaa91422df95bf1e027d9b8da8cf1053256f8 (diff) | |
| download | zcatch-6b713157a71a617b39734160d492e6b5ec56adab.tar.gz zcatch-6b713157a71a617b39734160d492e6b5ec56adab.zip | |
added button to restore the map focus. Closes #116
Diffstat (limited to 'src/game/editor')
| -rw-r--r-- | src/game/editor/ed_editor.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp index 52477095..dbb5ffe8 100644 --- a/src/game/editor/ed_editor.cpp +++ b/src/game/editor/ed_editor.cpp @@ -773,6 +773,17 @@ void CEditor::DoToolbar(CUIRect ToolBar) DoMapBorder(); } } + + TB_Bottom.VSplitLeft(5.0f, 0, &TB_Bottom); + + // refocus button + TB_Bottom.VSplitLeft(50.0f, &Button, &TB_Bottom); + static int s_RefocusButton = 0; + if(DoButton_Editor(&s_RefocusButton, Localize("Refocus"), m_WorldOffsetX&&m_WorldOffsetY?0:-1, &Button, 0, Localize("[HOME] Restore map focus")) || Input()->KeyDown(KEY_HOME)) + { + m_WorldOffsetX = 0; + m_WorldOffsetY = 0; + } } static void Rotate(CPoint *pCenter, CPoint *pPoint, float Rotation) |