mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 03:56:10 +08:00
Sync with upstream (Issue #30).
Recompiled tier1 and mathlib for all platforms will come in next commit.
This commit is contained in:
@ -52,6 +52,9 @@ public:
|
||||
bool StartAnimationSequence(const char *sequenceName);
|
||||
bool StartAnimationSequence(Panel *pWithinParent, const char *sequenceName);
|
||||
|
||||
bool StopAnimationSequence( Panel *pWithinParent, const char *sequenceName );
|
||||
void CancelAnimationsForPanel( Panel *pWithinParent );
|
||||
|
||||
// gets the length of an animation sequence, in seconds
|
||||
float GetAnimationSequenceLength(const char *sequenceName);
|
||||
|
||||
@ -96,6 +99,9 @@ private:
|
||||
CMD_SETFONT,
|
||||
CMD_SETTEXTURE,
|
||||
CMD_SETSTRING,
|
||||
CMD_RUNEVENTCHILD,
|
||||
CMD_FIRECOMMAND,
|
||||
CMD_SETVISIBLE,
|
||||
};
|
||||
|
||||
enum RelativeAlignment
|
||||
@ -223,6 +229,7 @@ private:
|
||||
// variable names
|
||||
UtlSymId_t m_sPosition, m_sSize, m_sFgColor, m_sBgColor;
|
||||
UtlSymId_t m_sXPos, m_sYPos, m_sWide, m_sTall;
|
||||
UtlSymId_t m_sModelPos;
|
||||
|
||||
// file name
|
||||
CUtlVector<UtlSymId_t> m_ScriptFileNames;
|
||||
|
@ -63,7 +63,7 @@ public:
|
||||
virtual int AddItem(const char *itemText, const KeyValues *userData);
|
||||
virtual int AddItem(const wchar_t *itemText, const KeyValues *userData);
|
||||
|
||||
virtual int GetItemCount();
|
||||
virtual int GetItemCount() const;
|
||||
int GetItemIDFromRow( int row );
|
||||
|
||||
// update the item
|
||||
|
@ -24,7 +24,6 @@
|
||||
#endif
|
||||
#include "steam/steam_api.h"
|
||||
|
||||
class HTMLComboBoxHost;
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
@ -80,7 +79,7 @@ public:
|
||||
|
||||
// overridden to paint our special web browser texture
|
||||
virtual void Paint();
|
||||
|
||||
|
||||
// pass messages to the texture component to tell it about resizes
|
||||
virtual void OnSizeChanged(int wide,int tall);
|
||||
|
||||
@ -124,7 +123,7 @@ public:
|
||||
void AddHeader( const char *pchHeader, const char *pchValue );
|
||||
void OnKillFocus();
|
||||
void OnSetFocus();
|
||||
|
||||
|
||||
void Find( const char *pchSubStr );
|
||||
void StopFind();
|
||||
void FindNext();
|
||||
@ -147,7 +146,6 @@ public:
|
||||
}
|
||||
#endif // DBGFLAG_VALIDATE
|
||||
|
||||
void PaintComboBox();
|
||||
ISteamHTMLSurface *SteamHTMLSurface() { return m_SteamAPIContext.SteamHTMLSurface(); }
|
||||
|
||||
void OnHTMLMouseMoved( int x, int y )
|
||||
@ -159,20 +157,13 @@ public:
|
||||
protected:
|
||||
virtual void ApplySchemeSettings( IScheme *pScheme );
|
||||
|
||||
friend class HTMLComboBoxHost;
|
||||
vgui::Menu *m_pContextMenu;
|
||||
|
||||
|
||||
private:
|
||||
STEAM_CALLBACK( HTML, BrowserNeedsPaint, HTML_NeedsPaint_t, m_NeedsPaint );
|
||||
STEAM_CALLBACK( HTML, BrowserComboNeedsPaint, HTML_ComboNeedsPaint_t, m_ComboNeedsPaint );
|
||||
STEAM_CALLBACK( HTML, BrowserStartRequest, HTML_StartRequest_t, m_StartRequest );
|
||||
STEAM_CALLBACK( HTML, BrowserURLChanged, HTML_URLChanged_t, m_URLChanged );
|
||||
STEAM_CALLBACK( HTML, BrowserFinishedRequest, HTML_FinishedRequest_t, m_FinishedRequest );
|
||||
STEAM_CALLBACK( HTML, BrowserShowPopup, HTML_ShowPopup_t, m_ShowPopup );
|
||||
STEAM_CALLBACK( HTML, BrowserHidePopup, HTML_HidePopup_t, m_HidePopup );
|
||||
STEAM_CALLBACK( HTML, BrowserSizePopup, HTML_SizePopup_t, m_SizePopup );
|
||||
|
||||
STEAM_CALLBACK( HTML, BrowserOpenNewTab, HTML_OpenLinkInNewTab_t, m_LinkInNewTab );
|
||||
STEAM_CALLBACK( HTML, BrowserSetHTMLTitle, HTML_ChangedTitle_t, m_ChangeTitle );
|
||||
STEAM_CALLBACK( HTML, BrowserPopupHTMLWindow, HTML_NewWindow_t, m_NewWindow );
|
||||
@ -227,7 +218,6 @@ private:
|
||||
};
|
||||
|
||||
CHTMLFindBar *m_pFindBar;
|
||||
HTMLComboBoxHost *m_pComboBoxHost;
|
||||
|
||||
int m_iMouseX,m_iMouseY; // where the mouse is on the control
|
||||
|
||||
@ -255,10 +245,7 @@ private:
|
||||
// when the size has changed and reallocate the texture.
|
||||
int m_allocedTextureWidth;
|
||||
int m_allocedTextureHeight;
|
||||
int m_iComboBoxTextureID; // vgui texture id of the combo box
|
||||
bool m_bNeedsFullTextureUpload;
|
||||
int m_allocedComboBoxWidth;
|
||||
int m_allocedComboBoxHeight;
|
||||
bool m_bNeedsFullTextureUpload;
|
||||
CUtlString m_sCurrentURL; // the url of our current page
|
||||
// find in page state
|
||||
bool m_bInFind;
|
||||
|
@ -216,7 +216,7 @@ public:
|
||||
virtual int GetActiveItem(); // returns the itemID (not the row) of the active item
|
||||
|
||||
// Return the number of items currently in the menu list
|
||||
virtual int GetItemCount();
|
||||
virtual int GetItemCount() const;
|
||||
|
||||
// return the menuID of the n'th item in the menu list, valid from [0, GetItemCount)
|
||||
virtual int GetMenuID(int index);
|
||||
@ -351,6 +351,29 @@ private:
|
||||
double m_fLastTypeAheadTime;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Helper class to create menu
|
||||
//-----------------------------------------------------------------------------
|
||||
class MenuBuilder
|
||||
{
|
||||
public:
|
||||
|
||||
MenuBuilder( Menu *pMenu, Panel *pActionTarget );
|
||||
|
||||
MenuItem* AddMenuItem( const char *pszButtonText, const char *pszCommand, const char *pszCategoryName );
|
||||
|
||||
MenuItem* AddCascadingMenuItem( const char *pszButtonText, Menu *pSubMenu, const char *pszCategoryName );
|
||||
|
||||
private:
|
||||
|
||||
void AddSepratorIfNeeded( const char *pszCategoryName );
|
||||
|
||||
Menu *m_pMenu;
|
||||
Panel *m_pActionTarget;
|
||||
const char *m_pszLastCategory;
|
||||
};
|
||||
|
||||
} // namespace vgui
|
||||
|
||||
#endif // MENU_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)
|
||||
|
@ -210,6 +210,8 @@ public:
|
||||
void MoveSelectionDown( void );
|
||||
void MoveSelectionUp( void );
|
||||
|
||||
ScrollBar *GetScrollBar( void ) { return m_pScrollBar; }
|
||||
|
||||
protected:
|
||||
virtual void PerformLayout();
|
||||
virtual void ApplySchemeSettings(IScheme *pScheme);
|
||||
|
@ -105,6 +105,9 @@ public:
|
||||
void SetColorChangeStream( CUtlSortVector<label_colorchange_t,CColorChangeListLess> *pUtlVecStream );
|
||||
void ClearColorChangeStream( void ) { m_ColorChangeStream.Purge(); }
|
||||
|
||||
const wchar_t *GetEllipsesPosition( void ) const { return m_pwszEllipsesPosition; }
|
||||
bool IsWrapping() const { return m_LineBreaks.Count() != 0; }
|
||||
|
||||
protected:
|
||||
// truncate the _text string to fit into the draw width
|
||||
void SizeText(wchar_t *tempText, int stringLength);
|
||||
|
Reference in New Issue
Block a user