Skip to content

Commit

Permalink
new tab gui, scale fonts, wnds
Browse files Browse the repository at this point in the history
  • Loading branch information
cryham committed Apr 11, 2024
1 parent 14fe9d1 commit dfe1f28
Show file tree
Hide file tree
Showing 8 changed files with 173 additions and 71 deletions.
99 changes: 66 additions & 33 deletions data/gui/Editor_Options.layout
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,69 @@
<Property key="TextColour" value="0.5 0.8 0.8"/>
<Property key="FontName" value="font.big"/>
</Widget>
<!-- </Widget>

<Widget type="TextBox" skin="TextBox" position="32 336 248 24">
<Property key="Caption" value="#{Brightness}"/>
<Property key="TextColour" value="0.9 0.7 0.7"/>
<Property key="Alpha" value="0.8"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="296 336 48 24" name="BrightVal">
<Property key="TextColour" value="0.9 0.7 0.7"/>
</Widget>
<Widget type="Slider" skin="Slider" position="344 336 216 16" name="Bright">
<Property key="Colour" value="0.9 0.7 0.7"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="32 366 248 24">
<Property key="Caption" value="#{Contrast}"/>
<Property key="TextColour" value="0.9 0.5 0.5"/>
<Property key="Alpha" value="0.8"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="296 366 48 24" name="ContrastVal">
<Property key="TextColour" value="0.9 0.5 0.5"/>
</Widget>
<Widget type="Slider" skin="Slider" position="344 366 216 16" name="Contrast">
<Property key="Colour" value="0.9 0.5 0.5"/>
</Widget>
</Widget>

<Widget type="TabItem" skin="" position="2 24 738 472" layer="Back">
<Property key="Caption" value="#A090A0#{GUI}"/>

<Widget type="TextBox" skin="TextBox" position="32 56 136 24">
<Property key="Caption" value="*#{NeedRestart}"/>
<Property key="TextColour" value="0.6 0.5 0.6"/>
</Widget>

<Widget type="TextBox" skin="TextBox" position="32 106 248 24">
<Property key="Caption" value="#{WindowMargin}"/>
<Property key="TextColour" value="0.8 0.8 0.9"/>
<Property key="Alpha" value="0.8"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="296 106 48 24" name="FntWndVal">
<Property key="TextColour" value="0.8 0.8 0.9"/>
</Widget>
<Widget type="Slider" skin="Slider" position="344 106 316 16" name="FntWnd">
<Property key="Colour" value="0.8 0.8 0.9"/>
</Widget>

<Widget type="TextBox" skin="TextBox" position="32 136 248 24">
<Property key="Caption" value="#{FontSizes}"/>
<Property key="TextColour" value="0.8 0.7 0.8"/>
</Widget>

<Widget type="TextBox" skin="TextBox" position="32 166 248 24">
<Property key="Caption" value="#{GUI}"/>
<Property key="TextColour" value="0.9 0.5 0.9"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="296 166 48 24" name="FntGuiVal">
<Property key="TextColour" value="0.9 0.5 0.9"/>
</Widget>
<Widget type="Slider" skin="Slider" position="344 166 316 16" name="FntGui">
<Property key="Colour" value="0.9 0.5 0.9"/>
</Widget>
</Widget>

<!-- <Widget type="TabItem" skin="" position="2 24 738 472" layer="Back">
<Property key="Caption" value="#60D0FF#{Video}"/> -->

<!-- <Widget type="Button" skin="CheckBox" position="32 48 176 24" name="VSync">
Expand Down Expand Up @@ -106,41 +166,14 @@
<Property key="Alpha" value="0.6"/>
<Property key="Static" value="true"/>
<Property key="ReadOnly" value="true"/>
</Widget>-->
<Widget type="TextBox" skin="TextBox" position="582 488 136 24">
<Property key="Caption" value="*#{NeedRestart}"/>
<Property key="TextColour" value="0.7 1 0.5"/>
</Widget>
<!-- <Widget type="Button" skin="CheckBox" position="364 156 190 24" name="VRmode">
<Widget type="Button" skin="CheckBox" position="364 156 190 24" name="VRmode">
<Property key="Caption" value="#{VRmode} * = #{NotDone}"/>
<Property key="TextColour" value="0.3 0.6 0.8"/>
<Property key="FontName" value="font.small"/>
</Widget> -->

<Widget type="TextBox" skin="TextBox" position="32 336 248 24">
<Property key="Caption" value="#{Brightness}"/>
<Property key="TextColour" value="0.9 0.7 0.7"/>
<Property key="Alpha" value="0.8"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="296 336 48 24" name="BrightVal">
<Property key="TextColour" value="0.9 0.7 0.7"/>
</Widget>
<Widget type="Slider" skin="Slider" position="344 336 216 16" name="Bright">
<Property key="Colour" value="0.9 0.7 0.7"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="32 366 248 24">
<Property key="Caption" value="#{Contrast}"/>
<Property key="TextColour" value="0.9 0.5 0.5"/>
<Property key="Alpha" value="0.8"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="296 366 48 24" name="ContrastVal">
<Property key="TextColour" value="0.9 0.5 0.5"/>
</Widget>
<Widget type="Slider" skin="Slider" position="344 366 216 16" name="Contrast">
<Property key="Colour" value="0.9 0.5 0.5"/>
</Widget>
<!--
<Widget type="Button" skin="CheckBox" position="32 176 292 26" name="LimitFpsOn">
<Property key="Caption" value="#{LimitFPS} **"/>
<Property key="TextColour" value="0.6 0.6 0.8"/>
Expand Down Expand Up @@ -172,8 +205,8 @@
<Widget type="Slider" skin="Slider" position="270 240 320 16" name="LimitSleep">
<Property key="Colour" value="0.7 0.6 0.8"/>
<Property key="Alpha" value="0.8"/>
</Widget> -->
</Widget>
</Widget>
</Widget> -->
</Widget>
</Widget>

Expand Down
118 changes: 89 additions & 29 deletions data/gui/Game_Options.layout
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,92 @@
<Property key="TextColour" value="0.5 0.8 0.8"/>
<Property key="FontName" value="font.big"/>
</Widget>
<!-- </Widget>


<Widget type="TextBox" skin="TextBox" position="32 336 248 24">
<Property key="Caption" value="#{Brightness}"/>
<Property key="TextColour" value="0.9 0.7 0.7"/>
<Property key="Alpha" value="0.8"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="296 336 48 24" name="BrightVal">
<Property key="TextColour" value="0.9 0.7 0.7"/>
</Widget>
<Widget type="Slider" skin="Slider" position="344 336 216 16" name="Bright">
<Property key="Colour" value="0.9 0.7 0.7"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="32 366 248 24">
<Property key="Caption" value="#{Contrast}"/>
<Property key="TextColour" value="0.9 0.5 0.5"/>
<Property key="Alpha" value="0.8"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="296 366 48 24" name="ContrastVal">
<Property key="TextColour" value="0.9 0.5 0.5"/>
</Widget>
<Widget type="Slider" skin="Slider" position="344 366 216 16" name="Contrast">
<Property key="Colour" value="0.9 0.5 0.5"/>
</Widget>
</Widget>

<Widget type="TabItem" skin="" position="2 24 738 472" layer="Back">
<Property key="Caption" value="#A090A0#{GUI}"/>

<Widget type="TextBox" skin="TextBox" position="32 56 136 24">
<Property key="Caption" value="*#{NeedRestart}"/>
<Property key="TextColour" value="0.6 0.5 0.6"/>
</Widget>

<Widget type="TextBox" skin="TextBox" position="32 106 248 24">
<Property key="Caption" value="#{WindowMargin}"/>
<Property key="TextColour" value="0.8 0.8 0.9"/>
<Property key="Alpha" value="0.8"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="296 106 48 24" name="FntWndVal">
<Property key="TextColour" value="0.8 0.8 0.9"/>
</Widget>
<Widget type="Slider" skin="Slider" position="344 106 316 16" name="FntWnd">
<Property key="Colour" value="0.8 0.8 0.9"/>
</Widget>

<Widget type="TextBox" skin="TextBox" position="32 136 248 24">
<Property key="Caption" value="#{FontSizes}"/>
<Property key="TextColour" value="0.8 0.7 0.8"/>
</Widget>

<Widget type="TextBox" skin="TextBox" position="32 166 248 24">
<Property key="Caption" value="#{GUI}"/>
<Property key="TextColour" value="0.9 0.5 0.9"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="296 166 48 24" name="FntGuiVal">
<Property key="TextColour" value="0.9 0.5 0.9"/>
</Widget>
<Widget type="Slider" skin="Slider" position="344 166 316 16" name="FntGui">
<Property key="Colour" value="0.9 0.5 0.9"/>
</Widget>

<Widget type="TextBox" skin="TextBox" position="32 196 248 24">
<Property key="Caption" value="#{HUD}"/>
<Property key="TextColour" value="0.9 0.9 0.5"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="296 196 48 24" name="FntHudVal">
<Property key="TextColour" value="0.9 0.9 0.5"/>
</Widget>
<Widget type="Slider" skin="Slider" position="344 196 316 16" name="FntHud">
<Property key="Colour" value="0.9 0.9 0.5"/>
</Widget>

<Widget type="TextBox" skin="TextBox" position="32 226 248 24">
<Property key="Caption" value="#{TimesBar}"/>
<Property key="TextColour" value="0.9 0.9 1.0"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="296 226 48 24" name="FntTimesVal">
<Property key="TextColour" value="0.9 0.9 1.0"/>
</Widget>
<Widget type="Slider" skin="Slider" position="344 226 316 16" name="FntTimes">
<Property key="Colour" value="0.9 0.9 1.0"/>
</Widget>
</Widget>

<!-- <Widget type="TabItem" skin="" position="2 24 738 472" layer="Back">
<Property key="Caption" value="#60D0FF#{Video}"/> -->

<!-- <Widget type="Button" skin="CheckBox" position="32 48 176 24" name="VSync">
Expand Down Expand Up @@ -107,41 +190,18 @@
<Property key="Alpha" value="0.6"/>
<Property key="Static" value="true"/>
<Property key="ReadOnly" value="true"/>
</Widget>-->
</Widget>
<Widget type="TextBox" skin="TextBox" position="582 488 136 24">
<Property key="Caption" value="*#{NeedRestart}"/>
<Property key="TextColour" value="0.7 1 0.5"/>
</Widget>
<!-- <Widget type="Button" skin="CheckBox" position="364 156 190 24" name="VRmode">
<Widget type="Button" skin="CheckBox" position="364 156 190 24" name="VRmode">
<Property key="Caption" value="#{VRmode} * = #{NotDone}"/>
<Property key="TextColour" value="0.3 0.6 0.8"/>
<Property key="FontName" value="font.small"/>
</Widget> -->

<Widget type="TextBox" skin="TextBox" position="32 336 248 24">
<Property key="Caption" value="#{Brightness}"/>
<Property key="TextColour" value="0.9 0.7 0.7"/>
<Property key="Alpha" value="0.8"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="296 336 48 24" name="BrightVal">
<Property key="TextColour" value="0.9 0.7 0.7"/>
</Widget>
<Widget type="Slider" skin="Slider" position="344 336 216 16" name="Bright">
<Property key="Colour" value="0.9 0.7 0.7"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="32 366 248 24">
<Property key="Caption" value="#{Contrast}"/>
<Property key="TextColour" value="0.9 0.5 0.5"/>
<Property key="Alpha" value="0.8"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="296 366 48 24" name="ContrastVal">
<Property key="TextColour" value="0.9 0.5 0.5"/>
</Widget>
<Widget type="Slider" skin="Slider" position="344 366 216 16" name="Contrast">
<Property key="Colour" value="0.9 0.5 0.5"/>
</Widget>
<!--
<Widget type="Button" skin="CheckBox" position="32 176 292 26" name="LimitFpsOn">
<Property key="Caption" value="#{LimitFPS} **"/>
<Property key="TextColour" value="0.6 0.6 0.8"/>
Expand Down Expand Up @@ -174,8 +234,8 @@
<Widget type="Slider" skin="Slider" position="270 240 320 16" name="LimitSleep">
<Property key="Colour" value="0.7 0.6 0.8"/>
<Property key="Alpha" value="0.8"/>
</Widget> -->
</Widget>
</Widget>
</Widget>-->
</Widget>
</Widget>

Expand Down
2 changes: 1 addition & 1 deletion docs/Statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Link to calculate [date difference](https://www.timeanddate.com/date/durationres

|Version | Date |Days| MB |g|e |Tracks |new|ren|del| Scn |New Sceneries |Vehicles|new|New Vehicles| Changes |
|---------|--------|----|-----|-|--|-------|---|---|---|------|---------------|--------|---|------------|-----------------------|
|**3.0.5**| ?.4'24|>122|2100?| |3 |**229**| +1|30?| | 41 | | **33** | +8| R1,R2,R3, Q1,Q3, H1,H2, YG | |
|**3.1** | ?.4'24|>122|2100?| |3 |**229**| +1|30?| | 41 | | **33** | +8| R1,R2,R3, Q1,Q3, H1,H2, YG | |
|**3.0.1**|20.12'23| 17 |2100?| | |**228**| | | | 41 | | 25 | | | |
|**3.0** | 3.12'23| 388|2098 |1|--|**228**|+26|153|-2 | 41 | | 25 | | | OgreNext, PBS, Horizons |
|**2.8?** | -- |>388|2098?| | |**227**|+25| 7 |-2 | 41 | Marble, Spring, Anomaly, PostApo | 25 | | | |
Expand Down
2 changes: 1 addition & 1 deletion src/common/settings_com.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,5 @@ const char SETcom::colFilDef[2][COL_FIL] =
// ver diff rating objects obstacles fluids bumps jumps loops pipes banked frenzy sum longn
// v ! * o c w ~ J L P b s E l * +
{{01, 0,0, 0,0, 0,0, 0,0,0, 0,0, 0,0, 0,0}, // min
{30, 7,6, 4,4, 5,5, 4,6,4, 5,5, 35,35, 6,1}}; // max
{31, 7,6, 4,4, 5,5, 4,6,4, 5,5, 35,35, 6,1}}; // max
///^ up in next ver, also in *default.cfg
3 changes: 3 additions & 0 deletions src/editor/CGui.h
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,9 @@ class CGui : public BGui
Ed trkName =0; void editTrkDescr(Ed), editTrkAdvice(Ed);


// fonts
SV svFntWnd, svFntGui;

// ⛓️ system, utils, mtr
Ogre::String strFSerrors; // not used..
bool Rename(Ogre::String from, Ogre::String to);
Expand Down
10 changes: 3 additions & 7 deletions src/editor/Gui_Init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -705,13 +705,9 @@ void CGui::InitGui()
gcom->ChangeTrackView();


/// 🧊 3d view [] (veget models, objects) todo:
//--------------------------------------------
//rndCanvas = mGUI->findWidget<Canvas>("CanVeget"); //?
// viewCanvas = app->mWndEdit->createWidget<Canvas>("Canvas", GetViewSize(), Align::Stretch);
// viewCanvas->setInheritsAlpha(false);
// viewCanvas->setPointer("hand");
// viewCanvas->setVisible(false);
// fonts
sv= &svFntWnd; sv->Init("FntWnd", &pSet->font_wnds, -0.1f, 0.2f); sv->DefaultF(0.f);
sv= &svFntGui; sv->Init("FntGui", &pSet->font_gui, 0.8f, 1.2f); sv->DefaultF(1.f);


bGI = true; // gui inited, gui events can now save vals
Expand Down
3 changes: 3 additions & 0 deletions src/game/CGui.h
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,9 @@ class CGui : public BGui
Ed edNetServerPort =0, edNetServerIP =0; void evEdNetServerPort(Ed), evEdNetServerIP(Ed);


// fonts
SV svFntWnd, svFntGui, svFntHud, svFntTimes;

// 🔗 open urls
void btnTrackEditor(WP); // start ed exe
void btnWelcome(WP), btnWebsite(WP), btnWiki(WP), btnWikiInput(WP);
Expand Down
7 changes: 7 additions & 0 deletions src/game/Gui_Init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,13 @@ void CGui::InitGui()
gcom->ChangeTrackView();


// fonts
sv= &svFntWnd; sv->Init("FntWnd", &pSet->font_wnds, -0.1f, 0.2f); sv->DefaultF(0.f);
sv= &svFntGui; sv->Init("FntGui", &pSet->font_gui, 0.8f, 1.2f); sv->DefaultF(1.f);
sv= &svFntHud; sv->Init("FntHud", &pSet->font_hud, 0.8f, 1.2f); sv->DefaultF(1.f);
sv= &svFntTimes; sv->Init("FntTimes", &pSet->font_times, 0.8f, 1.2f); sv->DefaultF(1.f);


// 🔗 open url btns -------------
Btn("BtnTrackEditor", btnTrackEditor);
Btn("OpenWelcome", btnWelcome); Btn("OpenWebsite", btnWebsite); Btn("OpenSources", btnSources);
Expand Down

0 comments on commit dfe1f28

Please sign in to comment.