|
|
@ -242,8 +242,12 @@ public: |
|
|
|
{ |
|
|
|
{ |
|
|
|
BaseClass::ApplySchemeSettings(pScheme); |
|
|
|
BaseClass::ApplySchemeSettings(pScheme); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int height = atoi(pScheme->GetResourceString("MainMenu.MenuItemHeight")); |
|
|
|
|
|
|
|
if( IsProportional() ) |
|
|
|
|
|
|
|
height = scheme()->GetProportionalScaledValue( height ); |
|
|
|
|
|
|
|
|
|
|
|
// make fully transparent
|
|
|
|
// make fully transparent
|
|
|
|
SetMenuItemHeight(atoi(pScheme->GetResourceString("MainMenu.MenuItemHeight"))); |
|
|
|
SetMenuItemHeight(height); |
|
|
|
SetBgColor(Color(0, 0, 0, 0)); |
|
|
|
SetBgColor(Color(0, 0, 0, 0)); |
|
|
|
SetBorder(NULL); |
|
|
|
SetBorder(NULL); |
|
|
|
} |
|
|
|
} |
|
|
@ -292,7 +296,6 @@ public: |
|
|
|
MenuItem *item = new CGameMenuItem(this, itemName); |
|
|
|
MenuItem *item = new CGameMenuItem(this, itemName); |
|
|
|
item->AddActionSignalTarget(target); |
|
|
|
item->AddActionSignalTarget(target); |
|
|
|
item->SetCommand(command); |
|
|
|
item->SetCommand(command); |
|
|
|
item->SetProportional(true); |
|
|
|
|
|
|
|
item->SetText(itemText); |
|
|
|
item->SetText(itemText); |
|
|
|
item->SetUserData(userData); |
|
|
|
item->SetUserData(userData); |
|
|
|
return BaseClass::AddMenuItem(item); |
|
|
|
return BaseClass::AddMenuItem(item); |
|
|
@ -303,7 +306,6 @@ public: |
|
|
|
MenuItem *item = new CGameMenuItem(this, itemName); |
|
|
|
MenuItem *item = new CGameMenuItem(this, itemName); |
|
|
|
item->AddActionSignalTarget(target); |
|
|
|
item->AddActionSignalTarget(target); |
|
|
|
item->SetCommand(command); |
|
|
|
item->SetCommand(command); |
|
|
|
item->SetProportional(true); |
|
|
|
|
|
|
|
item->SetText(itemText); |
|
|
|
item->SetText(itemText); |
|
|
|
item->SetUserData(userData); |
|
|
|
item->SetUserData(userData); |
|
|
|
return BaseClass::AddMenuItem(item); |
|
|
|
return BaseClass::AddMenuItem(item); |
|
|
@ -659,7 +661,6 @@ void CGameMenu::OnCursorEnteredMenuItem(int VPanel) |
|
|
|
static CBackgroundMenuButton* CreateMenuButton( CBasePanel *parent, const char *panelName, const wchar_t *panelText ) |
|
|
|
static CBackgroundMenuButton* CreateMenuButton( CBasePanel *parent, const char *panelName, const wchar_t *panelText ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
CBackgroundMenuButton *pButton = new CBackgroundMenuButton( parent, panelName ); |
|
|
|
CBackgroundMenuButton *pButton = new CBackgroundMenuButton( parent, panelName ); |
|
|
|
pButton->SetProportional(true); |
|
|
|
|
|
|
|
pButton->SetCommand("OpenGameMenu"); |
|
|
|
pButton->SetCommand("OpenGameMenu"); |
|
|
|
pButton->SetText(panelText); |
|
|
|
pButton->SetText(panelText); |
|
|
|
|
|
|
|
|
|
|
@ -673,6 +674,9 @@ bool g_bIsCreatingNewGameMenuForPreFetching = false; |
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
CBasePanel::CBasePanel() : Panel(NULL, "BaseGameUIPanel") |
|
|
|
CBasePanel::CBasePanel() : Panel(NULL, "BaseGameUIPanel") |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
if( NeedProportional() ) |
|
|
|
|
|
|
|
SetProportional( true ); |
|
|
|
|
|
|
|
|
|
|
|
g_pBasePanel = this; |
|
|
|
g_pBasePanel = this; |
|
|
|
m_bLevelLoading = false; |
|
|
|
m_bLevelLoading = false; |
|
|
|
m_eBackgroundState = BACKGROUND_INITIAL; |
|
|
|
m_eBackgroundState = BACKGROUND_INITIAL; |
|
|
|