- moved two native player menu functions out of the main menu class.

These manipulate entries of that menu and have no business being called from anywhere else than this menu and its subclasses.
This commit is contained in:
Christoph Oelckers 2020-10-04 19:08:14 +02:00
parent 43eb7d61e7
commit f3d75469c9
3 changed files with 5 additions and 4 deletions

View file

@ -937,7 +937,7 @@ void M_CreateGameMenus()
}
}
DEFINE_ACTION_FUNCTION(DMenu, UpdateColorsets)
DEFINE_ACTION_FUNCTION(DNewPlayerMenu, UpdateColorsets)
{
PARAM_PROLOGUE;
PARAM_POINTER(playerClass, FPlayerClass);
@ -963,7 +963,7 @@ DEFINE_ACTION_FUNCTION(DMenu, UpdateColorsets)
return 0;
}
DEFINE_ACTION_FUNCTION(DMenu, UpdateSkinOptions)
DEFINE_ACTION_FUNCTION(DNewPlayerMenu, UpdateSkinOptions)
{
PARAM_PROLOGUE;
PARAM_POINTER(playerClass, FPlayerClass);

View file

@ -99,8 +99,6 @@ class Menu : Object native ui version("2.4")
native static void SetMouseCapture(bool on);
native void Close();
native void ActivateMenu();
native static void UpdateColorsets(PlayerClass cls);
native static void UpdateSkinOptions(PlayerClass cls);
//=============================================================================
//

View file

@ -408,6 +408,9 @@ class OptionMenuItemPlayerSwitchOnPickupItem : OptionMenuItemOptionBase
class NewPlayerMenu : OptionMenu
{
protected native static void UpdateColorsets(PlayerClass cls);
protected native static void UpdateSkinOptions(PlayerClass cls);
PlayerClass mPlayerClass;
int mRotation;
PlayerMenuPlayerDisplay mPlayerDisplay;