Skip to content

Commit

Permalink
data-model and LaunchMode = LaunchMode.SingleTask
Browse files Browse the repository at this point in the history
  • Loading branch information
gleblebedev committed Jan 30, 2025
1 parent e9458f8 commit ff5081d
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 49 deletions.
60 changes: 31 additions & 29 deletions Content/Common/Data/UI/GameScreen.rml
Original file line number Diff line number Diff line change
Expand Up @@ -43,38 +43,40 @@
</style>
</head>

<body data-model="GameRmlUIComponent" style="width: 100%; height: 100%; margin: 0; nav: auto">
<div class="gray-header-panel menu-panel" style="top: 0%; left: 50%; position: absolute; transform: translate(-50%, 0); width: 100%; ">
<div style="float: left">
<input type="button" class="blue-button" style="display: block" data-event-click="Settings">
<img sprite="icon-settings"></img>
</input>
<body style="width: 100%; height: 100%; margin: 0; nav: auto">
<div data-model="GameRmlUIComponent">
<div class="gray-header-panel menu-panel" style="top: 0%; left: 50%; position: absolute; transform: translate(-50%, 0); width: 100%; ">
<div style="float: left">
<input type="button" class="blue-button" style="display: block" data-event-click="Settings">
<img sprite="icon-settings"></img>
</input>
</div>
<!--<div style="float: right">
<img sprite="icon-diamond"></img> 0
</div>-->
<div style="text-align: center">{{Level}}</div>
<div style="text-align: center">
<div class="levelblock" style="">{{CurrentLevel > BaseLevel ? 'V' : BaseLevel}}</div>
<div class="levelblock" style="">{{CurrentLevel > BaseLevel+1 ? 'V' : BaseLevel+1}}</div>
<div class="levelblock" style="">{{CurrentLevel > BaseLevel+2 ? 'V' : BaseLevel+2}}</div>
<div class="levelblock" style="">{{CurrentLevel > BaseLevel+3 ? 'V' : BaseLevel+3}}</div>
<div class="levelblock" style="">{{CurrentLevel > BaseLevel+4 ? 'V' : BaseLevel+4}}</div>
</div>
</div>
<!--<div style="float: right">
<img sprite="icon-diamond"></img> 0
</div>-->
<div style="text-align: center">{{Level}}</div>
<div style="text-align: center">
<div class="levelblock" style="">{{CurrentLevel > BaseLevel ? 'V' : BaseLevel}}</div>
<div class="levelblock" style="">{{CurrentLevel > BaseLevel+1 ? 'V' : BaseLevel+1}}</div>
<div class="levelblock" style="">{{CurrentLevel > BaseLevel+2 ? 'V' : BaseLevel+2}}</div>
<div class="levelblock" style="">{{CurrentLevel > BaseLevel+3 ? 'V' : BaseLevel+3}}</div>
<div class="levelblock" style="">{{CurrentLevel > BaseLevel+4 ? 'V' : BaseLevel+4}}</div>

<div data-visible="Victory" class="" style="background: #000000A0; padding:10px; top: 50%; left: 50%; position: absolute; transform: translate(-50%, -50%); width: 50%; max-height: 90%">
<div style="text-align: center">Level complete!</div>
<img src="../Images/Victory.png" style="margin: 0 auto; max-width: 33%"/>
<input type="button" class="blue-button" style="display: block" data-event-click="Next">
Next
</input>
</div>
</div>

<div data-visible="Victory" class="" style="background: #000000A0; padding:10px; top: 50%; left: 50%; position: absolute; transform: translate(-50%, -50%); width: 50%; max-height: 90%">
<div style="text-align: center">Level complete!</div>
<img src="../Images/Victory.png" style="margin: 0 auto; max-width: 33%"/>
<input type="button" class="blue-button" style="display: block" data-event-click="Next">
Next
</input>
</div>

<div class="gray-footer-panel menu-panel" style="top: 100%; left: 50%; position: absolute; transform: translate(-50%, -100%); width: 100%; ">
<!--<input type="button" class="blue-button" style="display: block" data-event-click="Exit">
Hint
</input>-->
<div class="gray-footer-panel menu-panel" style="top: 100%; left: 50%; position: absolute; transform: translate(-50%, -100%); width: 100%; ">
<!--<input type="button" class="blue-button" style="display: block" data-event-click="Exit">
Hint
</input>-->
</div>
</div>
</body>

Expand Down
40 changes: 21 additions & 19 deletions Content/Common/Data/UI/MainMenu.rml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,28 @@
</style>
</head>

<body data-model="GameRmlUIComponent" style="width: 100%; height: 100%; margin: 0; nav: auto">
<div class="gray-inner-panel menu-panel" style="top: 50%; left: 50%; position: absolute; transform: translate(-50%, -50%); width: 50%; max-height: 90%">
<div style="text-align: center">{{game_title}}</div>
<input type="button" class="blue-button" data-attrif-disabled="!is_game_played" style="display: block" data-event-click="Continue">
Continue
</input>
<input type="button" class="blue-button" style="display: block" data-event-click="NewGame">
New game
</input>
<input type="button" class="blue-button" style="display: block" data-event-click="Settings">
Settings
</input>
<input type="button" class="blue-button" style="display: block" data-event-click="Exit">
Exit
</input>
</div>
<div style="top: 100%; left: 100%; position: absolute; transform: translate(-100%, -100%);">
<input type="button" class="blue-button" style="display: block; margin: 5px" data-event-click="Discord">
<img sprite="icon-discord"></img>
<body style="width: 100%; height: 100%; margin: 0; nav: auto">
<div data-model="GameRmlUIComponent">
<div class="gray-inner-panel menu-panel" style="top: 50%; left: 50%; position: absolute; transform: translate(-50%, -50%); width: 50%; max-height: 90%">
<div style="text-align: center">{{game_title}}</div>
<input type="button" class="blue-button" data-attrif-disabled="!is_game_played" style="display: block" data-event-click="Continue">
Continue
</input>
<input type="button" class="blue-button" style="display: block" data-event-click="NewGame">
New game
</input>
<input type="button" class="blue-button" style="display: block" data-event-click="Settings">
Settings
</input>
<input type="button" class="blue-button" style="display: block" data-event-click="Exit">
Exit
</input>
</div>
<div style="top: 100%; left: 100%; position: absolute; transform: translate(-100%, -100%);">
<input type="button" class="blue-button" style="display: block; margin: 5px" data-event-click="Discord">
<img sprite="icon-discord"></img>
</input>
</div>
</div>
</body>

Expand Down
2 changes: 1 addition & 1 deletion RbfxTemplate.Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace RbfxTemplate
{
[Activity(Label = "@string/app_name",
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.KeyboardHidden,
Theme = "@android:style/Theme.NoTitleBar.Fullscreen", HardwareAccelerated = true, MainLauncher = true)]
Theme = "@android:style/Theme.NoTitleBar.Fullscreen", HardwareAccelerated = true, MainLauncher = true, LaunchMode = LaunchMode.SingleTask)]
public class MainActivity : UrhoActivity
{
protected override void OnResume()
Expand Down

0 comments on commit ff5081d

Please sign in to comment.