Description:
Pull out MainMenu from FNAGame.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -228,6 +228,7 | |||
|
228 | 228 | WorldBuilder.AddEngine(new UIEngine()); |
|
229 | 229 | |
|
230 | 230 | WorldBuilder.AddEngine(new GameBridgeEngine(this)); |
|
231 | WorldBuilder.AddEngine(new GameStateEngine()); | |
|
231 | 232 | WorldBuilder.AddEngine(this.simulation.BridgeEngine); |
|
232 | 233 | WorldBuilder.AddEngine(new CameraBridgeEngine(this.camera)); |
|
233 | 234 | this.imGuiWindowBridgeEngine = new ImGuiWindowBridgeEngine(); |
@@ -252,6 +253,10 | |||
|
252 | 253 | WorldBuilder.SetComponent(newsWindow, new VisibilityComponent { visible = false }); |
|
253 | 254 | WorldBuilder.SetComponent(newsWindow, new WindowTypeComponent { type = isometricparkfna.Messages.Window.News }); |
|
254 | 255 | |
|
256 | var mainMenu = WorldBuilder.CreateEntity(); | |
|
257 | WorldBuilder.SetComponent(mainMenu, new VisibilityComponent { visible = true }); | |
|
258 | WorldBuilder.SetComponent(mainMenu, new WindowTypeComponent { type = isometricparkfna.Messages.Window.MainMenu }); | |
|
259 | ||
|
255 | 260 | // var budgetWindow = WorldBuilder.CreateEntity(); |
|
256 | 261 | // WorldBuilder.SetComponent(budgetWindow, new VisibilityComponent{visible = true}); |
|
257 | 262 | // WorldBuilder.SetComponent(budgetWindow, new BudgetComponent()); |
@@ -867,8 +872,6 | |||
|
867 | 872 | Vector2 middle_dimensions = largeMonoFont.MeasureString("Isometric Park"); |
|
868 | 873 | float middle_start = (int)((FNAGame.width / 2) - (middle_dimensions.X / 2)); |
|
869 | 874 | ImGui.SetNextWindowPos(new Num.Vector2(((FNAGame.width/2) - 40), 200)); |
|
870 | MainMenu.Render(debugWindow.monoFont, imGuiWindowBridgeEngine); | |
|
871 | ||
|
872 | 875 | batch.DrawString(largeMonoFont, "Isometric Park", |
|
873 | 876 | new Vector2(middle_start, 50), |
|
874 | 877 | Color.Black, 0.0f, Vector2.Zero, |
@@ -877,6 +880,7 | |||
|
877 | 880 | new Vector2(middle_start-1, 49), |
|
878 | 881 | Color.White, 0.0f, Vector2.Zero, |
|
879 | 882 | 1.0f, SpriteEffects.None, 0.51f); |
|
883 | World.Draw(); | |
|
880 | 884 | |
|
881 | 885 | Vector2 version_dimensions = monoFont.MeasureString(typeof(FNAGame).Assembly.GetName().Version.ToString()); |
|
882 | 886 | batch.DrawString(monoFont, |
@@ -1,6 +1,7 | |||
|
1 | 1 | using Microsoft.Xna.Framework; |
|
2 | 2 | using Microsoft.Xna.Framework.Graphics; |
|
3 | 3 | |
|
4 | using System; | |
|
4 | 5 | using System.Collections.Generic; |
|
5 | 6 | using System.Linq; |
|
6 | 7 | |
@@ -89,7 +90,10 | |||
|
89 | 90 | ContractWindow.Render(this.font, this.italicFont, this.BridgeEngine, entity, data.name, data.description, data.status, data.amount, data.delta_trees, area_size, data.image_index, data.square); |
|
90 | 91 | |
|
91 | 92 | break; |
|
93 | case Window.MainMenu: | |
|
94 | MainMenu.Render(this.font, this.BridgeEngine); | |
|
92 | 95 | |
|
96 | break; | |
|
93 | 97 | default: |
|
94 | 98 | break; |
|
95 | 99 | } |
You need to be logged in to leave comments.
Login now