Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

50 lines
1.4 KiB

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================
#ifndef ACHIEVEMENTSANDSTATSINTERFACE_H
#define ACHIEVEMENTSANDSTATSINTERFACE_H
#ifdef _WIN32
#pragma once
#endif
#include "vgui_controls/Panel.h"
#include "vgui_controls/Panel.h"
#include "vgui_controls/PHandle.h"
#include "vgui_controls/MenuItem.h"
#include "vgui_controls/MessageDialog.h"
#include "vgui/ISurface.h"
class AchievementsAndStatsInterface
{
public:
AchievementsAndStatsInterface() { }
virtual void CreatePanel( vgui::Panel* pParent ) {}
virtual void DisplayPanel() {}
virtual void ReleasePanel() {}
virtual int GetAchievementsPanelMinWidth( void ) const { return 0; }
protected:
//-----------------------------------------------------------------------------
// Purpose: Positions a dialog on screen.
//-----------------------------------------------------------------------------
void PositionDialog(vgui::PHandle dlg)
{
if (!dlg.Get())
return;
int x, y, ww, wt, wide, tall;
vgui::surface()->GetWorkspaceBounds( x, y, ww, wt );
dlg->GetSize(wide, tall);
// Center it, keeping requested size
dlg->SetPos(x + ((ww - wide) / 2), y + ((wt - tall) / 2));
}
};
#endif // ACHIEVEMENTSANDSTATSINTERFACE_H