Files
cool-source-archive/game/client/sdk/hud_weaponselection.cpp
Totterynine 4b952b0e4e init
2021-09-13 15:31:53 +05:00

40 lines
1.1 KiB
C++

#include "cbase.h"
#include "weapon_selection.h"
#include "vgui_controls/Panel.h"
#include "iclientmode.h"
class CHudWeaponSelection : public CBaseHudWeaponSelection, public vgui::Panel
{
DECLARE_CLASS_SIMPLE( CHudWeaponSelection, vgui::Panel );
CHudWeaponSelection( const char* pElementName );
void ApplySchemeSettings(vgui::IScheme* pScheme);
void CycleToNextWeapon() {}
void CycleToPrevWeapon() {}
void SelectWeaponSlot(int iSlot) {}
C_BaseCombatWeapon* GetWeaponInSlot( int iSlot, int iSlotPos ) { return null; }
C_BaseCombatWeapon* GetSelectedWeapon() { return null; }
};
DECLARE_HUDELEMENT( CHudWeaponSelection );
CHudWeaponSelection::CHudWeaponSelection( const char* pElementName ) : CBaseHudWeaponSelection(pElementName), BaseClass(NULL, "HudWeaponSelection")
{
SetParent( g_pClientMode->GetViewport() );
}
void CHudWeaponSelection::ApplySchemeSettings(vgui::IScheme* pScheme)
{
BaseClass::ApplySchemeSettings(pScheme);
SetPaintBackgroundEnabled(false);
int x, y;
GetPos(x, y);
int screenWide, screenTall;
GetHudSize(screenWide, screenTall);
SetBounds( x, y, screenWide - x, screenTall - y );
}