mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- fixed: attaching a new status bar to a player now calls 'setsizeneeded' - fixes an issue where the screen geometry is out of sync with the characteristics of the new status bar.
This commit is contained in:
parent
4ac43dac36
commit
e2f6fa95d4
2 changed files with 10 additions and 1 deletions
|
@ -588,6 +588,13 @@ DEFINE_ACTION_FUNCTION(DBaseStatusBar, BeginHUD)
|
|||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(DBaseStatusBar, UpdateScreenGeometry)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DBaseStatusBar);
|
||||
setsizeneeded = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// PROC AttachToPlayer
|
||||
|
|
|
@ -318,6 +318,8 @@ class BaseStatusBar native ui
|
|||
native void BeginStatusBar(bool forceScaled = false, int resW = -1, int resH = -1, int rel = -1);
|
||||
native void BeginHUD(double Alpha = 1., bool forcescaled = false, int resW = -1, int resH = -1);
|
||||
|
||||
native void UpdateScreenGeometry();
|
||||
|
||||
virtual void Init()
|
||||
{
|
||||
mSmallFont = HUDFont.Create("SmallFont");
|
||||
|
@ -330,7 +332,7 @@ class BaseStatusBar native ui
|
|||
native virtual clearscope void SetMugShotState (String state_name, bool wait_till_done=false, bool reset=false);
|
||||
|
||||
virtual void FlashItem (class<Inventory> itemtype) { artiflashTick = 4; itemflashFade = 0.75; }
|
||||
virtual void AttachToPlayer (PlayerInfo player) { CPlayer = player; }
|
||||
virtual void AttachToPlayer (PlayerInfo player) { CPlayer = player; UpdateScreenGeometry(); }
|
||||
virtual void FlashCrosshair () { CrosshairSize = XHAIRPICKUPSIZE; }
|
||||
virtual void NewGame () { if (CPlayer != null) AttachToPlayer(CPlayer); }
|
||||
virtual void ShowPop (int popnum) { ShowLog = (popnum == POP_Log && !ShowLog); }
|
||||
|
|
Loading…
Reference in a new issue