Skip to content

Commit

Permalink
UI Demo: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Cooler2 committed Jun 28, 2023
1 parent cf85a27 commit 4c29a14
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions demo/UI/MainScene.pas
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@ constructor TMainApp.Create;

// Most app initialization is here. Default spinner is running
procedure TMainApp.CreateScenes;
var
scale:single;
begin
inherited;
scale:=game.screenDPI/96;
{ scale:=game.screenDPI/96;
txt.SetScale(scale);
SetDefaultUIScale(scale,scale);
SetDefaultUIScale(scale,scale);}
// initialize our main scene
sceneMain:=TMainScene.Create('Main');
// switch to the main scene using fade transition effect
Expand Down Expand Up @@ -128,7 +126,7 @@ procedure TestWidgets;
TUISplitter.CreateH(2,5,0,cont,$80000000);
// Check boxes
TUICheckBox.Create(-1,22,'Check1','checkbox 1 VERYLONG',cont,true);
TUICheckBox.Create(-1,22,'Check2','checkbox 2 (red)',cont).AddStyle('tickColor:811');
TUICheckBox.Create(-1,22,'Check2','checkbox 2 (red)',cont).SetStyle('tickColor','811');
TUISplitter.CreateH(10,cont);
// Radio buttons
TUIRadioButton.Create(100,22,'Radio1','radio 1',cont);
Expand Down Expand Up @@ -179,7 +177,7 @@ procedure TMainScene.Initialize;
btn:TUIButton;
panel:TUIElement;
begin
UI.font:=txt.GetFont('',8.0,fsBold);
UI.font:=txt.GetFont('',9.0,fsBold);
// Create menu panel
panel:=TUIElement.Create(250,400,UI,'MainMenu');
panel.scale:=1.2;
Expand Down

0 comments on commit 4c29a14

Please sign in to comment.