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
parent 1f3436945f
commit 9d77bb17c5
20 changed files with 296 additions and 150 deletions

View File

@@ -45,7 +45,17 @@ using namespace vgui;
COptionsDialog::COptionsDialog(vgui::Panel *parent) : PropertyDialog(parent, "OptionsDialog")
{
SetDeleteSelfOnClose(true);
SetBounds(0, 0, 512, 406);
int w = 512;
int h = 406;
if (IsProportional())
{
w = scheme()->GetProportionalScaledValueEx(GetScheme(), w);
h = scheme()->GetProportionalScaledValueEx(GetScheme(), h);
}
SetBounds(0, 0, w, h);
SetSizeable( false );
SetTitle("#GameUI_Options", true);