mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2024-11-25 14:01:10 +00:00
Scale crosshair to 4:3 (in d3xp/)
so it's round in widescreen resolutions
This commit is contained in:
parent
d0062f4a82
commit
2e1dc5ce3e
1 changed files with 13 additions and 0 deletions
|
@ -1779,6 +1779,13 @@ void idPlayer::Spawn( void ) {
|
|||
cursor = uiManager->FindGui( temp, true, gameLocal.isMultiplayer, gameLocal.isMultiplayer );
|
||||
}
|
||||
if ( cursor ) {
|
||||
// DG: make it scale to 4:3 so crosshair looks properly round
|
||||
// yes, like so many scaling-related things this is a bit hacky
|
||||
// and note that this is special cased in StateChanged and you
|
||||
// can *not* generally set windowDef properties like this.
|
||||
cursor->SetStateBool("scaleto43", true);
|
||||
cursor->StateChanged(gameLocal.time); // DG end
|
||||
|
||||
cursor->Activate( true, gameLocal.time );
|
||||
}
|
||||
|
||||
|
@ -2473,6 +2480,12 @@ void idPlayer::Restore( idRestoreGame *savefile ) {
|
|||
savefile->ReadInt( focusTime );
|
||||
savefile->ReadObject( reinterpret_cast<idClass *&>( focusVehicle ) );
|
||||
savefile->ReadUserInterface( cursor );
|
||||
// DG: make it scale to 4:3 so crosshair looks properly round
|
||||
// yes, like so many scaling-related things this is a bit hacky
|
||||
// and note that this is special cased in StateChanged and you
|
||||
// can *not* generally set windowDef properties like this.
|
||||
cursor->SetStateBool("scaleto43", true);
|
||||
cursor->StateChanged(gameLocal.time); // DG end
|
||||
|
||||
savefile->ReadInt( oldMouseX );
|
||||
savefile->ReadInt( oldMouseY );
|
||||
|
|
Loading…
Reference in a new issue