Commit graph

16 commits

Author SHA1 Message Date
Daniel Gibson
27aeda205c Make Sys_SetInteractiveIngameGuiActive() work better
it could happen that UIs are added to the internal list twice,
and also that the last UI wasn't removed from the list when a new one
was focused fast enough.

That should work better now, I hope I didn't break anything..
2024-03-17 04:03:27 +01:00
Daniel Gibson
d708fbd974 Fix lingering messages in HUD after loading savegame
If you save, you get a message like "Game Saved..." which goes away
after a few seconds. This happens at the very end of idPlayer::Save():
    if ( hud ) {
        hud->SetStateString( "message", /* .. left out .. */ );
        hud->HandleNamedEvent( "Message" );
    }
And handled in hud.gui, "onNamedEvent Message { ..."

However, if you save again before it's gone, it'll be shown after
loading the savegame and not go away until you save again..
This works around that issue by setting an empty message after loading
a savegame.

The underlying problem (which is not fixed!) seems to be that the
transition GUI command (that's executed when hud.gui handles the
"Message" event that's used to show this message) is probably not
properly saved/restored so fading out the message isn't continued
after loading.
2020-07-27 03:39:12 +02:00
Daniel Gibson
f5dfdead43 Do the cursor/crosshair scaling to 4:3 also when loading savegame 2018-11-05 04:54:53 +01:00
Daniel Gibson
cd0a11f974 Allow scaling non-menu WIN_DESKTOP GUIs to 4:3
WIN_DESKTOP means that this can currently only be set for the top-level
window in a .gui (all its subwindows/widgets will be scaled implicitly)

There are two ways to make a GUI use this:
1. in the .gui add a window variable "scaleto43 1", like
    windowDef Desktop {
	rect	0 ,0 ,640 ,480
	nocursor	1
	float	talk 	0

	scaleto43 1

	// .. etc rest of windowDef

2. When creating the GUI from C++ code, you can afterwards make the
   UserInterface scale to 4:3 like this:
    idUserInterface* ui = Whatever(); // create it
    ui->SetStateBool("scaleto43", true);
    ui->StateChanged(gameLocal.time);
   Both lines are important!

As you can see in my changes to Player.cpp, my primary usecase for this
is the cursor/crosshair GUI.
2018-11-05 04:33:57 +01:00
dhewg
3256783af1 Get rid of ID_DEMO_BUILD
There are no demo pk4s compatible to this 1.3.1 codebase.
2012-07-03 21:12:55 +02:00
dhewg
9034da11d0 s/ReadLong/ReadInt/ to match the return type 2012-06-28 13:52:24 +02:00
dhewg
94df46637a s/WriteLong/WriteInt/ to match the argument type 2012-06-28 13:52:23 +02:00
dhewg
6d6c5c8ce7 Fix "unreachable code" warnings 2012-01-15 14:13:44 +01:00
dhewg
736ec20d4d Untangle the epic precompiled.h mess
Don't include the lazy precompiled.h everywhere, only what's
required for the compilation unit.
platform.h needs to be included instead to provide all essential
defines and types.
All includes use the relative path to the neo or the game
specific root.
Move all idlib related includes from idlib/Lib.h to precompiled.h.
precompiled.h still exists for the MFC stuff in tools/.
Add some missing header guards.
2011-12-19 23:21:47 +01:00
dhewg
ee0996e380 Fix -Wunused-value warnings
value computed is not used
left operand of comma operator has no effect
right operand of comma operator has no effect
2011-12-10 15:36:04 +01:00
dhewg
3f5c14ef5f Fix -Wunused-but-set-variable warnings
variable set but not used

Removes some CollisionModel code under _DEBUG which was probably a
leftover, since it was completely useless (its done later anyways).
2011-12-10 15:36:04 +01:00
dhewg
e4771f3a5f Fix -Wunused-variable warnings
unused variable
2011-12-10 15:36:03 +01:00
dhewg
783db18c5e Fix -Wpointer-arith warnings
NULL used in arithmetic
2011-12-10 15:36:01 +01:00
dhewg
79ad905e05 Fix all whitespace errors
Excluding 3rd party files.
2011-12-10 15:35:54 +01:00
dhewg
ff493f6847 Fix quoting in GPL headers 2011-12-10 15:34:48 +01:00
Timothee 'TTimo' Besset
fb1609f554 hello world 2011-11-22 15:28:15 -06:00