mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-05 22:09:59 +03:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user