CampaignFrame::CampaignFrame(Panel *parent, const char *panelName, bool showTaskbarIcon) :
	vgui::Frame(parent, panelName, showTaskbarIcon)
{
	vgui::HScheme scheme = vgui::scheme()->LoadSchemeFromFile("resource/SwarmSchemeNew.res", "SwarmSchemeNew");
	SetScheme(scheme);
	SetSize( ScreenWidth() + 1, ScreenHeight() + 1 );
	SetTitle("Campaign", true );
	SetPos(0,0);
	SetMoveable(false);
	SetSizeable(false);
	SetMenuButtonVisible(false);
	SetMaximizeButtonVisible(false);
	SetMinimizeToSysTrayButtonVisible(false);
	SetCloseButtonVisible(false);
	SetTitleBarVisible(false);
	SetAlpha(0.3f);
	SetPaintBackgroundEnabled(false);

	m_pCampaignPanel = new CampaignPanel( this, "CampaignPanel" );

	RequestFocus();
	SetVisible(true);
	SetEnabled(true);
	SetKeyBoardInputEnabled(false);

	if (GetClientModeASW() && GetClientModeASW()->m_bSpectator)
	{
		engine->ServerCmd("cl_spectating");
	}
}
PlayerListContainerFrame::PlayerListContainerFrame(Panel *parent, const char *panelName, bool showTaskbarIcon) :
	vgui::Frame(parent, panelName, showTaskbarIcon)
{
	SetMoveable(false);
	SetSizeable(false);
	SetMenuButtonVisible(false);
	SetMaximizeButtonVisible(false);
	SetMinimizeToSysTrayButtonVisible(false);
	SetCloseButtonVisible(true);
	SetTitleBarVisible(false);
}
Example #3
0
MainMenu::MainMenu(vgui::Panel* parent) : BaseClass(NULL, "MainMenu")
{
	vgui::HScheme Scheme = vgui::scheme()->LoadSchemeFromFile("resource2/schememainmenu.res", "SchemeMainMenu");
	SetScheme(Scheme);

	SetProportional(false);
	SetPaintBorderEnabled(false);
	SetPaintBackgroundEnabled(false);
	SetDeleteSelfOnClose(true);
	SetSizeable(false);
	SetMoveable(false);
	SetCloseButtonVisible(false);
	SetMenuButtonVisible(false);
	Activate();

	m_bFocused = true;

	m_logoLeft = GameUI2().GetLocalizedString("#GameUI2_LogoLeft");
	m_logoRight = GameUI2().GetLocalizedString("#GameUI2_LogoRight");

	CreateMenu("resource2/mainmenu.res");
}