Implement Godot UX scene scaffold
This commit is contained in:
19
src/ReactorMaintenance.Godot/Screens/GameOverScreen.cs
Normal file
19
src/ReactorMaintenance.Godot/Screens/GameOverScreen.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Godot;
|
||||
using ReactorMaintenance.Godot.Data;
|
||||
|
||||
namespace ReactorMaintenance.Godot.Screens;
|
||||
|
||||
public partial class GameOverScreen : ScreenBase
|
||||
{
|
||||
public void Configure(AppController app, CampaignLevel level)
|
||||
{
|
||||
var body = CreatePage("Game Over");
|
||||
body.Alignment = BoxContainer.AlignmentMode.Center;
|
||||
body.AddChild(CreateBodyText($"Failed level: {level.Name}"));
|
||||
|
||||
var actions = new HBoxContainer { SizeFlagsHorizontal = SizeFlags.ShrinkCenter };
|
||||
body.AddChild(actions);
|
||||
actions.AddChild(CreateButton("Retry Current Level", app.RetryCurrentLevel));
|
||||
actions.AddChild(CreateButton("Main Menu", app.ShowMainMenu));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user