diff options
Diffstat (limited to 'mp/src/public/vgui_controls/Panel.h')
| -rw-r--r-- | mp/src/public/vgui_controls/Panel.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/mp/src/public/vgui_controls/Panel.h b/mp/src/public/vgui_controls/Panel.h index 07b63d8d..174dea42 100644 --- a/mp/src/public/vgui_controls/Panel.h +++ b/mp/src/public/vgui_controls/Panel.h @@ -180,6 +180,8 @@ public: // all units are in pixels void SetPos(int x,int y); // sets position of panel, in local space (ie. relative to parent's position) void GetPos(int &x,int &y); // gets local position of panel + int GetXPos(); + int GetYPos(); void SetSize(int wide,int tall); // sets size of panel void GetSize(int &wide, int &tall); // gets size of panel void SetBounds(int x, int y, int wide, int tall); // combination of SetPos/SetSize @@ -232,7 +234,7 @@ public: Panel *FindSiblingByName(const char *siblingName); void CallParentFunction(KeyValues *message); - template <class T> + template < class T > T *FindControl( const char *pszName, bool recurseDown = false ) { return dynamic_cast<T *>( FindChildByName( pszName, recurseDown ) ); } virtual void SetAutoDelete(bool state); // if set to true, panel automatically frees itself when parent is deleted @@ -274,6 +276,8 @@ public: PIN_CENTER_RIGHT, PIN_CENTER_BOTTOM, PIN_CENTER_LEFT, + + PIN_LAST }; // specifies the auto-resize directions for the panel @@ -398,6 +402,7 @@ public: virtual void OnMousePressed(MouseCode code); virtual void OnMouseDoublePressed(MouseCode code); virtual void OnMouseReleased(MouseCode code); + virtual void OnMouseMismatchedRelease( MouseCode code, Panel* pPressedPanel ); virtual void OnMouseWheeled(int delta); // Trip pressing (e.g., select all text in a TextEntry) requires this to be enabled @@ -667,6 +672,8 @@ protected: virtual void PaintTraverse(bool Repaint, bool allowForce = true); protected: + virtual void OnChildSettingsApplied( KeyValues *pInResourceData, Panel *pChild ); + MESSAGE_FUNC_ENUM_ENUM( OnRequestFocus, "OnRequestFocus", VPANEL, subFocus, VPANEL, defaultPanel); MESSAGE_FUNC_INT_INT( OnScreenSizeChanged, "OnScreenSizeChanged", oldwide, oldtall ); virtual void *QueryInterface(EInterfaceID id); @@ -913,6 +920,8 @@ private: bool m_bForceStereoRenderToFrameBuffer; + static Panel* m_sMousePressedPanels[ ( MOUSE_MIDDLE - MOUSE_LEFT ) + 1 ]; + CPanelAnimationVar( float, m_flAlpha, "alpha", "255" ); // 1 == Textured (TextureId1 only) |