mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-07 17:29:36 +00:00
arm64 : fix vgui2 VPAMEL in messagemap
This commit is contained in:
@@ -869,6 +869,18 @@ void BuildGroup::PanelAdded(Panel *panel)
|
||||
_panelDar.AddToTail(temp);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Add panel the list of panels that are in the build group
|
||||
//-----------------------------------------------------------------------------
|
||||
void BuildGroup::PanelRemoved(Panel *panel)
|
||||
{
|
||||
Assert(panel);
|
||||
|
||||
PHandle temp;
|
||||
temp = panel;
|
||||
_panelDar.FindAndRemove(temp);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: loads the control settings from file
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -2365,9 +2365,8 @@ int Menu::GetCurrentlyHighlightedItem()
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Respond to cursor entering a menuItem.
|
||||
//-----------------------------------------------------------------------------
|
||||
void Menu::OnCursorEnteredMenuItem(int VPanel)
|
||||
void Menu::OnCursorEnteredMenuItem(VPANEL menuItem)
|
||||
{
|
||||
VPANEL menuItem = (VPANEL)VPanel;
|
||||
// if we are in mouse mode
|
||||
if (m_iInputMode == MOUSE)
|
||||
{
|
||||
@@ -2389,9 +2388,8 @@ void Menu::OnCursorEnteredMenuItem(int VPanel)
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Respond to cursor exiting a menuItem
|
||||
//-----------------------------------------------------------------------------
|
||||
void Menu::OnCursorExitedMenuItem(int VPanel)
|
||||
void Menu::OnCursorExitedMenuItem(VPANEL menuItem)
|
||||
{
|
||||
VPANEL menuItem = (VPANEL)VPanel;
|
||||
// only care if we are in mouse mode
|
||||
if (m_iInputMode == MOUSE)
|
||||
{
|
||||
|
||||
@@ -222,7 +222,7 @@ void MenuItem::OnCursorEntered()
|
||||
// forward the message on to the parent of this menu.
|
||||
KeyValues *msg = new KeyValues ("CursorEnteredMenuItem");
|
||||
// tell the parent this menuitem is the one that was entered so it can highlight it
|
||||
msg->SetInt("VPanel", GetVPanel());
|
||||
msg->SetInt("menuItem", ToHandle() );
|
||||
|
||||
ivgui()->PostMessage(GetVParent(), msg, NULL);
|
||||
}
|
||||
@@ -236,7 +236,7 @@ void MenuItem::OnCursorExited()
|
||||
// forward the message on to the parent of this menu.
|
||||
KeyValues *msg = new KeyValues ("CursorExitedMenuItem");
|
||||
// tell the parent this menuitem is the one that was entered so it can unhighlight it
|
||||
msg->SetInt("VPanel", GetVPanel());
|
||||
msg->SetInt("menuItem", ToHandle() );
|
||||
|
||||
ivgui()->PostMessage(GetVParent(), msg, NULL);
|
||||
}
|
||||
|
||||
@@ -880,7 +880,7 @@ const char *Panel::GetClassName()
|
||||
{
|
||||
// loop up the panel map name
|
||||
PanelMessageMap *panelMap = GetMessageMap();
|
||||
if ( panelMap )
|
||||
if ( panelMap && panelMap->pfnClassName )
|
||||
{
|
||||
return panelMap->pfnClassName();
|
||||
}
|
||||
@@ -3575,7 +3575,7 @@ void Panel::RequestFocus(int direction)
|
||||
//-----------------------------------------------------------------------------
|
||||
void Panel::OnRequestFocus(VPANEL subFocus, VPANEL defaultPanel)
|
||||
{
|
||||
CallParentFunction(new KeyValues("OnRequestFocus", "subFocus", subFocus, "defaultPanel", defaultPanel));
|
||||
CallParentFunction(new KeyValues("OnRequestFocus", "subFocus", ivgui()->PanelToHandle( subFocus ), "defaultPanel", ivgui()->PanelToHandle( defaultPanel )));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -3800,13 +3800,17 @@ void Panel::SetTall(int tall)
|
||||
|
||||
void Panel::SetBuildGroup(BuildGroup* buildGroup)
|
||||
{
|
||||
//TODO: remove from old group
|
||||
|
||||
Assert(buildGroup != NULL);
|
||||
|
||||
_buildGroup = buildGroup;
|
||||
|
||||
_buildGroup->PanelAdded(this);
|
||||
if ( _buildGroup == buildGroup )
|
||||
return;
|
||||
if ( _buildGroup.Get() )
|
||||
{
|
||||
_buildGroup->PanelRemoved( this );
|
||||
}
|
||||
_buildGroup = buildGroup;
|
||||
if ( _buildGroup.Get() )
|
||||
{
|
||||
_buildGroup->PanelAdded(this);
|
||||
}
|
||||
}
|
||||
|
||||
bool Panel::IsBuildGroupEnabled()
|
||||
@@ -5134,6 +5138,13 @@ void Panel::OnMessage(const KeyValues *params, VPANEL ifromPanel)
|
||||
VPANEL vp = ivgui()->HandleToPanel( param1->GetInt() );
|
||||
(this->*((MessageFunc_HandleConstCharPtr_t)pMap->func))( vp, param2->GetWString() );
|
||||
}
|
||||
else if ( (DATATYPE_HANDLE == pMap->firstParamType) && (DATATYPE_HANDLE == pMap->secondParamType) )
|
||||
{
|
||||
typedef void (Panel::*MessageFunc_HandleConstCharPtr_t)(VPANEL, VPANEL);
|
||||
VPANEL vp1 = ivgui()->HandleToPanel( param1->GetInt() );
|
||||
VPANEL vp2 = ivgui()->HandleToPanel( param1->GetInt() );
|
||||
(this->*((MessageFunc_HandleConstCharPtr_t)pMap->func))( vp1, vp2 );
|
||||
}
|
||||
else
|
||||
{
|
||||
// the message isn't handled
|
||||
@@ -5515,7 +5526,7 @@ void Panel::OnDelete()
|
||||
// Purpose: Panel handle implementation
|
||||
// Returns a pointer to a valid panel, NULL if the panel has been deleted
|
||||
//-----------------------------------------------------------------------------
|
||||
Panel *PHandle::Get()
|
||||
Panel *PHandle::Get() const
|
||||
{
|
||||
if (m_iPanelID != INVALID_PANEL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user