From: Jarda B. <edh...@us...> - 2004-06-27 19:30:15
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22737/plugins/Core Modified Files: GameControl.cpp EventMgr.h Log Message: Support for popping up PS:T Floating menu with RMB Floating menu additions Finally select PC portraits based on animation ID Index: EventMgr.h =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/EventMgr.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** EventMgr.h 28 Apr 2004 12:52:14 -0000 1.15 --- EventMgr.h 27 Jun 2004 19:30:06 -0000 1.16 *************** *** 38,41 **** --- 38,45 ---- #define GEM_MOUSEOUT 128 + // Mouse buttons + #define GEM_MB_ACTION 1 + #define GEM_MB_MENU 4 + #ifdef WIN32 Index: GameControl.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/GameControl.cpp,v retrieving revision 1.143 retrieving revision 1.144 diff -C2 -d -r1.143 -r1.144 *** GameControl.cpp 24 Jun 2004 17:53:17 -0000 1.143 --- GameControl.cpp 27 Jun 2004 19:30:06 -0000 1.144 *************** *** 150,153 **** --- 150,154 ---- }; */ + /* Point points[4] = { {SelectionRect.x, SelectionRect.y}, *************** *** 157,161 **** }; Gem_Polygon poly( points, 4 ); ! video->DrawPolyline( &poly, green, false ); } if (DebugFlags & 4) { --- 158,164 ---- }; Gem_Polygon poly( points, 4 ); ! //video->DrawPolyline( &poly, green, false ); ! */ ! video->DrawRect( SelectionRect, green, false, true ); } if (DebugFlags & 4) { *************** *** 610,614 **** unsigned char Button, unsigned short Mod) { ! if (DisableMouse) { return; } --- 613,617 ---- unsigned char Button, unsigned short Mod) { ! if (DisableMouse || Button != GEM_MB_ACTION) { return; } *************** *** 632,635 **** --- 635,648 ---- return; } + if (Button == GEM_MB_MENU) { + core->GetDictionary()->SetAt( "MenuX", x ); + core->GetDictionary()->SetAt( "MenuY", y ); + core->GetGUIScriptEngine()->RunFunction( "OpenFloatMenuWindow" ); + return; + } + if (Button != GEM_MB_ACTION) { + return; + } + MouseIsDown = false; short GameX = x, GameY = y; |