about summary refs log tree commit diff
path: root/src/game
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-06-28 15:12:43 +0200
committeroy <Tom_Adams@web.de>2010-06-28 15:12:43 +0200
commitbd02c2043e9f76ec47ee9ac35caf23ae294b1dfa (patch)
treee179222ba0c44463d87d0aab1ccd4c774ba075f0 /src/game
parent7325bdac42db7a19e6eeb3e4b2ede7dfe9d3a5a9 (diff)
downloadzcatch-bd02c2043e9f76ec47ee9ac35caf23ae294b1dfa.tar.gz
zcatch-bd02c2043e9f76ec47ee9ac35caf23ae294b1dfa.zip
fixed editor popups shown outside the screen
Diffstat (limited to 'src/game')
-rw-r--r--src/game/editor/ed_popups.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/editor/ed_popups.cpp b/src/game/editor/ed_popups.cpp
index 08ec51cb..001a7249 100644
--- a/src/game/editor/ed_popups.cpp
+++ b/src/game/editor/ed_popups.cpp
@@ -20,6 +20,10 @@ static int g_UiNumPopups = 0;
 void CEditor::UiInvokePopupMenu(void *Id, int Flags, float x, float y, float w, float h, int (*pfnFunc)(CEditor *pEditor, CUIRect Rect), void *pExtra)
 {
 	dbg_msg("", "invoked");
+	if(x + w > UI()->Screen()->w)
+		x -= w;
+	if(y + h > UI()->Screen()->h)
+		y -= h;
 	s_UiPopups[g_UiNumPopups].m_pId = Id;
 	s_UiPopups[g_UiNumPopups].m_IsMenu = Flags;
 	s_UiPopups[g_UiNumPopups].m_Rect.x = x;