FF Diff Viewer

Comparing 2006 Base SDK to Fortress Forever 2.46

cl_dll/game_controls/classmenu.h

123456789
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ //=============================================================================// #ifndef CLASSMENU_H #define CLASSMENU_H
1234567891011121314
/// =============== Fortress Forever ============== /// ======== A modification for Half-Life 2 ======= /// /// @file classmenu2.h /// @author Gavin "Mirvin_Monkey" Bramhill /// @date August 15, 2005 /// @brief New class selection menu /// /// REVISIONS /// --------- /// Aug 15, 2005 Mirv: First creation #ifndef CLASSMENU_H #define CLASSMENU_H
1415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
#include #include #include #include #include #include #include #include "mouseoverpanelbutton.h" namespace vgui { class TextEntry; } //----------------------------------------------------------------------------- // Purpose: Draws the class menu //----------------------------------------------------------------------------- class CClassMenu : public vgui::Frame, public IViewPortPanel { private: DECLARE_CLASS_SIMPLE( CClassMenu, vgui::Frame ); public: CClassMenu(IViewPort *pViewPort); CClassMenu(IViewPort *pViewPort, const char *panelName ); virtual ~CClassMenu(); virtual const char *GetName( void ) { return PANEL_CLASS; } virtual void SetData(KeyValues *data); virtual void Reset(); virtual void Update() {}; virtual bool NeedsUpdate( void ) { return false; } virtual bool HasInputElements( void ) { return true; } virtual void ShowPanel( bool bShow ); // both vgui::Frame and IViewPortPanel define these, so explicitly define them here as passthroughs to vgui vgui::VPANEL GetVPanel( void ) { return BaseClass::GetVPanel(); } virtual bool IsVisible() { return BaseClass::IsVisible(); } virtual void SetParent( vgui::VPANEL parent ) { BaseClass::SetParent( parent ); } protected: virtual vgui::Panel *CreateControlByName(const char *controlName); virtual MouseOverPanelButton* CreateNewMouseOverPanelButton(vgui::EditablePanel *panel); //vgui2 overrides virtual void OnKeyCodePressed(vgui::KeyCode code); // helper functions void SetLabelText(const char *textEntryName, const char *text); void SetVisibleButton(const char *textEntryName, bool state); // command callbacks void OnCommand( const char *command ); IViewPort *m_pViewPort; int m_iScoreBoardKey; int m_iTeam; vgui::EditablePanel *m_pPanel; CUtlVector< MouseOverPanelButton * > m_mouseoverButtons; };
192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
#include #include #include #include #include #include "mouseoverpanelbutton.h" class MouseOverButton; class LoadoutLabel; class ClassPropertiesLabel; namespace vgui { class TextEntry; class PlayerModelPanel; class FFButton; class ProgressBar; class Section; class RichText; } //----------------------------------------------------------------------------- // Purpose: displays the MOTD //----------------------------------------------------------------------------- class CClassMenu : public vgui::Frame, public IViewPortPanel { private: DECLARE_CLASS_SIMPLE(CClassMenu, vgui::Frame); public: CClassMenu(IViewPort *pViewPort); virtual ~CClassMenu(); virtual void SetData(KeyValues *data); virtual void Reset(); virtual void Update(); virtual void ShowPanel(bool bShow); // both vgui::Frame and IViewPortPanel define these, so explicitly define them here as passthroughs to vgui vgui::VPANEL GetVPanel() { return BaseClass::GetVPanel(); } virtual bool IsVisible() { return BaseClass::IsVisible(); } virtual void SetParent(vgui::VPANEL parent) { BaseClass::SetParent(parent); } virtual const char *GetName() { return PANEL_CLASS; } virtual bool NeedsUpdate() { return gpGlobals->curtime > m_flNextUpdate; } virtual bool HasInputElements() { return true; } void OnKeyCodePressed(vgui::KeyCode code); void OnKeyCodeReleased(vgui::KeyCode code); MESSAGE_FUNC_PARAMS(OnMouseOverMessage, "MouseOverEvent", data); public: protected: // vgui overrides virtual void OnCommand(const char *command); void UpdateClassInfo(const char *pszClassName); void SetClassInfoVisible( bool state ); IViewPort *m_pViewPort; vgui::RichText *m_pClassInfo; float m_flNextUpdate; MouseOverButton *m_pClassButtons[10]; vgui::FFButton *m_pCancelButton; MouseOverButton *m_pRandomButton; LoadoutLabel *m_pPrimaryGren; LoadoutLabel *m_pSecondaryGren; LoadoutLabel *m_WepSlots[8]; ClassPropertiesLabel *m_pSpeed; ClassPropertiesLabel *m_pFirepower; ClassPropertiesLabel *m_pHealth; vgui::PlayerModelPanel *m_pModelView; vgui::Label *m_pClassRole; vgui::Section *m_pGrenadesSection; vgui::Section *m_pWeaponsSection; vgui::Section *m_pClassInfoSection; vgui::Section *m_pClassRoleSection; //virtual vgui::Panel *CreateControlByName(const char *controlName); //MouseOverPanelButton * CreateNewMouseOverPanelButton(vgui::Panel *panel); };