[Gcblue-commits] gcb_wx/include/graphics tc3DViewer.h, 1.17, 1.18 tcContainerGui.h, 1.5, 1.6 tcCont
Status: Alpha
Brought to you by:
ddcforge
From: Dewitt C. <ddc...@us...> - 2006-11-20 00:16:32
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv29360/include/graphics Modified Files: tc3DViewer.h tcContainerGui.h tcContainerItem.h tcDatabaseInfoPanel.h tcDatabaseInfoWindow.h tcFlightportGui.h tcLauncherPopup.h tcStoresGui.h Log Message: Index: tcDatabaseInfoPanel.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcDatabaseInfoPanel.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcDatabaseInfoPanel.h 17 Aug 2006 01:27:10 -0000 1.1 --- tcDatabaseInfoPanel.h 20 Nov 2006 00:16:28 -0000 1.2 *************** *** 35,41 **** { class tcDatabaseObject; ! class tcGenericDBObject; class tcMissileDBObject; class tcTorpedoDBObject; } --- 35,44 ---- { class tcDatabaseObject; ! class tcPlatformDBObject; class tcMissileDBObject; class tcTorpedoDBObject; + class tcShipDBObject; + class tcAirDBObject; + class tcGroundDBObject; } *************** *** 82,91 **** void DrawDatabaseInfo(); ! void DrawDatabaseInfo(database::tcGenericDBObject* genericData, float yStart); void DrawDatabaseInfo(database::tcMissileDBObject* missileData, float yStart); void DrawDatabaseInfo(database::tcTorpedoDBObject* torpedoData, float yStart); ! void DrawLauncherInfo(database::tcGenericDBObject* genericData, float& y); ! void DrawSensorInfo(database::tcGenericDBObject* genericData, float& y); void PrintText(float x, float& y, const char* formatString, ...); --- 85,96 ---- void DrawDatabaseInfo(); ! void DrawDatabaseInfo(database::tcShipDBObject* shipData, float yStart); ! void DrawDatabaseInfo(database::tcAirDBObject* airData, float yStart); ! void DrawDatabaseInfo(database::tcGroundDBObject* groundData, float yStart); void DrawDatabaseInfo(database::tcMissileDBObject* missileData, float yStart); void DrawDatabaseInfo(database::tcTorpedoDBObject* torpedoData, float yStart); ! void DrawLauncherInfo(database::tcPlatformDBObject* genericData, float& y); ! void DrawSensorInfo(database::tcPlatformDBObject* genericData, float& y); void PrintText(float x, float& y, const char* formatString, ...); Index: tcFlightportGui.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcFlightportGui.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcFlightportGui.h 28 Sep 2006 02:01:52 -0000 1.5 --- tcFlightportGui.h 20 Nov 2006 00:16:28 -0000 1.6 *************** *** 88,94 **** size_t readyOffset; ///< slot index of first ready spot size_t hangarOffset; ///< slot index of first hangar spot ! float slotSize; ///< dimension of (square) slot wxRealPoint launchLoc; ///< upper-left of first launch spot float launchHorizontalSpacing; --- 88,96 ---- size_t readyOffset; ///< slot index of first ready spot size_t hangarOffset; ///< slot index of first hangar spot ! size_t magazineIdx; ///< slot index of first magazine slot ! size_t nMagazines; ///< number of magazines float slotSize; ///< dimension of (square) slot + float hangarSlotSize; ///< for hangar slots wxRealPoint launchLoc; ///< upper-left of first launch spot float launchHorizontalSpacing; *************** *** 99,107 **** float hangarVerticalSpacing; ///< spacing between rows unsigned int hangarRowSize; ///< number of hangar spots across ! void AddOrUpdateItem(tcContainerSlot& slot, tcAirState* airState); void CloseAllPlatformGuis(); tcFlightPort* GetFlightPort(); void InitializeGui(); void OpenPlatformGui(tcContainerItem* item); void ReadGuiParameters(); --- 101,114 ---- float hangarVerticalSpacing; ///< spacing between rows unsigned int hangarRowSize; ///< number of hangar spots across ! bool useSmallHangarSlots; ! wxRealPoint magazineLoc; ///< upper-left of first magazine ! wxRealPoint magazineOffset; ///< (x, y) offset between magazines ! osg::ref_ptr<osg::Geometry> magazineIcon; ! void AddOrUpdateItem(tcContainerSlot& slot, tcAirState* airState); void CloseAllPlatformGuis(); tcFlightPort* GetFlightPort(); void InitializeGui(); + void OpenMagazineGui(unsigned int idx, tcContainerItem* item); void OpenPlatformGui(tcContainerItem* item); void ReadGuiParameters(); Index: tc3DViewer.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DViewer.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tc3DViewer.h 24 Oct 2006 01:33:57 -0000 1.17 --- tc3DViewer.h 20 Nov 2006 00:16:28 -0000 1.18 *************** *** 47,50 **** --- 47,51 ---- class Sky; class wxGLCanvas; + class tcPoint; /** *************** *** 147,150 **** --- 148,152 ---- bool IsActive() {return isActive;} void LoadModel(tcGameObject *obj); + const tcPoint& GetOrigin() const; void SetActive(bool b); Index: tcDatabaseInfoWindow.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcDatabaseInfoWindow.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcDatabaseInfoWindow.h 17 Aug 2006 01:27:10 -0000 1.6 --- tcDatabaseInfoWindow.h 20 Nov 2006 00:16:28 -0000 1.7 *************** *** 35,39 **** { class tcDatabaseObject; ! class tcGenericDBObject; class tcMissileDBObject; class tcTorpedoDBObject; --- 35,39 ---- { class tcDatabaseObject; ! class tcPlatformDBObject; class tcMissileDBObject; class tcTorpedoDBObject; Index: tcContainerGui.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcContainerGui.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcContainerGui.h 22 Mar 2006 01:23:28 -0000 1.5 --- tcContainerGui.h 20 Nov 2006 00:16:28 -0000 1.6 *************** *** 41,44 **** --- 41,45 ---- bool updated; bool isMouseOver; ///< true if mouse is over slot + bool useSmallIcon; void ClearItem(); *************** *** 48,51 **** --- 49,53 ---- bool IsMouseOver() const; bool IsUpdated() const; + void SetUseSmallIcon(bool state); void SetItem(tcContainerItem* item_); void SetMouseOver(bool state); *************** *** 66,70 **** { public: ! void AddSlot(tcRect& loc); void ClearSlots(); size_t GetNumSlots() const; --- 68,77 ---- { public: ! enum IconSize ! { ! NORMAL_ICON_SIZE = 1, ! SMALL_ICON_SIZE = 2 ! }; ! void AddSlot(tcRect& loc, IconSize iconSize = NORMAL_ICON_SIZE); void ClearSlots(); size_t GetNumSlots() const; Index: tcStoresGui.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcStoresGui.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcStoresGui.h 22 Mar 2006 01:23:29 -0000 1.3 --- tcStoresGui.h 20 Nov 2006 00:16:28 -0000 1.4 *************** *** 45,52 **** //virtual void OnChar(wxKeyEvent& event); //virtual void OnEnterWindow(wxMouseEvent& event); ! //virtual void OnLButtonDown(wxMouseEvent& event); //virtual void OnLButtonUp(wxMouseEvent& event); //virtual void OnLeaveWindow(wxMouseEvent& event); ! //virtual void OnMouseMove(wxMouseEvent& event); virtual void OnRButtonDown(wxMouseEvent& event); --- 45,52 ---- //virtual void OnChar(wxKeyEvent& event); //virtual void OnEnterWindow(wxMouseEvent& event); ! virtual void OnLButtonDown(wxMouseEvent& event); //virtual void OnLButtonUp(wxMouseEvent& event); //virtual void OnLeaveWindow(wxMouseEvent& event); ! virtual void OnMouseMove(wxMouseEvent& event); virtual void OnRButtonDown(wxMouseEvent& event); *************** *** 66,69 **** --- 66,76 ---- float verticalSpacing; unsigned int rowSize; + + size_t slotsPerPage; + size_t nPages; + size_t currentPage; + size_t mouseOverPage; + const size_t maxSlots; + std::vector<tcRect> pageBoxes; void AddOrUpdateItem(tcContainerSlot& slot, const std::string& itemName, *************** *** 73,76 **** --- 80,84 ---- void InitializeGui(); void ReadGuiParameters(); + void SetCurrentPage(size_t page); void UpdateGui(); }; Index: tcContainerItem.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcContainerItem.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcContainerItem.h 22 Mar 2006 01:23:28 -0000 1.2 --- tcContainerItem.h 20 Nov 2006 00:16:28 -0000 1.3 *************** *** 53,56 **** --- 53,57 ---- osg::ref_ptr<osg::Geometry> icon; + osg::ref_ptr<osg::Geometry> iconSmall; int drawState; *************** *** 58,64 **** --- 59,67 ---- tcContainerGui* GetGui() const; osg::Geometry* GetIcon(); + osg::Geometry* GetIconSmall(); ///< half sized icon long GetId() const; const std::string& GetItemName() const; unsigned int GetQuantity() const; + const char* GetQuantityLabel() const; bool IdMatches(long val) const; bool ItemGuiIsActive() const; Index: tcLauncherPopup.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcLauncherPopup.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcLauncherPopup.h 22 Mar 2006 01:23:29 -0000 1.8 --- tcLauncherPopup.h 20 Nov 2006 00:16:28 -0000 1.9 *************** *** 52,55 **** --- 52,58 ---- static void SetUserPosition(unsigned int idx, const wxPoint& pos); + static bool ForceClose(long id, unsigned idx); ///< message to close matching popup + static bool WindowExists(long id, unsigned idx); ///< to check if popup is already open + tcLauncherPopup(long id, unsigned idx, const wxPoint& pos); virtual ~tcLauncherPopup(); *************** *** 76,80 **** virtual void OnMouseMove(wxMouseEvent& event); virtual void OnRButtonDown(wxMouseEvent& event); ! --- 79,84 ---- virtual void OnMouseMove(wxMouseEvent& event); virtual void OnRButtonDown(wxMouseEvent& event); ! ! *************** *** 114,117 **** --- 118,129 ---- static wxPoint userPositions[MAX_LAUNCHERS]; ///< saves last user move position for each launcher static bool userPositionsInitialized; + static std::map<long, bool> registry; ///< means of checking which windows are open and forcing closed without having pointer + + + static bool GetForceClose(long id, unsigned idx); + static long GetKey(long id, unsigned idx); + static void RegisterWindow(long id, unsigned idx); + static void UnregisterWindow(long id, unsigned idx); + static void UnregisterAll(); DECLARE_EVENT_TABLE() |