Add proportionality support for GameUI panels (#35)

* Add proportionality support for GameUI panels

* Add Android platform define

* Fix button wrong state on fast clicking

Co-authored-by: JusicP <slender87844@gmail.com>
This commit is contained in:
nillerusr
2022-01-09 17:04:47 +03:00
committed by GitHub
co-authored by JusicP
parent 1f3436945f
commit 9d77bb17c5
20 changed files with 296 additions and 150 deletions
+5
View File
@@ -696,6 +696,11 @@ void CEngineVGui::Init()
COM_TimestampedLog( "Building Panels (staticGameUIPanel)" );
staticGameUIPanel = new CEnginePanel( staticPanel, "GameUI Panel" );
if (IsAndroid() || CommandLine()->CheckParm("-gameuiproportionality"))
{
staticGameUIPanel->SetProportional(true);
}
staticGameUIPanel->SetBounds( 0, 0, videomode->GetModeUIWidth(), videomode->GetModeUIHeight() );
staticGameUIPanel->SetPaintBorderEnabled(false);
staticGameUIPanel->SetPaintBackgroundEnabled(false);