Description:
More refactoring.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -163,7 +163,6 | |||||
|
163 |
|
163 | ||
|
164 | Content.RootDirectory = "Content"; |
|
164 | Content.RootDirectory = "Content"; |
|
165 |
|
165 | ||
|
166 |
|
|||
|
167 | } |
|
166 | } |
|
168 |
|
167 | ||
|
169 | protected override void Initialize() |
|
168 | protected override void Initialize() |
@@ -272,7 +271,7 | |||||
|
272 | WorldBuilder.AddEngine(new TraceryBridgeEngine(this.grammar)); |
|
271 | WorldBuilder.AddEngine(new TraceryBridgeEngine(this.grammar)); |
|
273 |
|
272 | ||
|
274 | WorldBuilder.AddGeneralRenderer(new AreaRenderer(this.batch, this.monoFont), 1); |
|
273 | WorldBuilder.AddGeneralRenderer(new AreaRenderer(this.batch, this.monoFont), 1); |
|
275 |
WorldBuilder.AddGeneralRenderer(new ImGuiWindowRenderer(this, this.simulation, |
|
274 | WorldBuilder.AddGeneralRenderer(new ImGuiWindowRenderer(this, this.simulation, this.imGuiWindowBridgeEngine, this.gdm) , 2); |
|
276 | var contractWindow = WorldBuilder.CreateEntity(); |
|
275 | var contractWindow = WorldBuilder.CreateEntity(); |
|
277 | WorldBuilder.SetComponent(contractWindow, new VisibilityComponent { visible = false }); |
|
276 | WorldBuilder.SetComponent(contractWindow, new VisibilityComponent { visible = false }); |
|
278 | WorldBuilder.SetComponent(contractWindow, new WindowTypeComponent { type = isometricparkfna.Messages.Window.Contracts }); |
|
277 | WorldBuilder.SetComponent(contractWindow, new WindowTypeComponent { type = isometricparkfna.Messages.Window.Contracts }); |
@@ -21,17 +21,14 | |||||
|
21 |
|
21 | ||
|
22 | class ImGuiWindowRenderer : GeneralRenderer |
|
22 | class ImGuiWindowRenderer : GeneralRenderer |
|
23 | { |
|
23 | { |
|
24 | private ImFontPtr italicFont; |
|
||
|
25 | private ImGuiWindowBridgeEngine BridgeEngine; |
|
24 | private ImGuiWindowBridgeEngine BridgeEngine; |
|
26 | private FNAGame game; |
|
25 | private FNAGame game; |
|
27 | private Simulation simulation; |
|
26 | private Simulation simulation; |
|
28 |
|
27 | ||
|
29 | private GraphicsDeviceManager gdm; |
|
28 | private GraphicsDeviceManager gdm; |
|
30 |
|
29 | ||
|
31 |
public ImGuiWindowRenderer(FNAGame game, Simulation simulation, |
|
30 | public ImGuiWindowRenderer(FNAGame game, Simulation simulation, ImGuiWindowBridgeEngine engine, GraphicsDeviceManager gdm) |
|
32 | { |
|
31 | { |
|
33 | // this.font = font; |
|
||
|
34 | this.italicFont = italicFont; |
|
||
|
35 | this.BridgeEngine = engine; |
|
32 | this.BridgeEngine = engine; |
|
36 | this.game = game; |
|
33 | this.game = game; |
|
37 | this.simulation = simulation; |
|
34 | this.simulation = simulation; |
@@ -127,7 +124,7 | |||||
|
127 |
|
124 | ||
|
128 | var area = GetComponent<AreaComponent>(data.entity).squares; |
|
125 | var area = GetComponent<AreaComponent>(data.entity).squares; |
|
129 |
|
126 | ||
|
130 | ContractWindow.Render(this.BridgeEngine.font, this.italicFont, this.BridgeEngine, data); |
|
127 | ContractWindow.Render(this.BridgeEngine.font, this.BridgeEngine.italicFont, this.BridgeEngine, data); |
|
131 |
|
128 | ||
|
132 | break; |
|
129 | break; |
|
133 | case Window.News: |
|
130 | case Window.News: |
@@ -49,11 +49,6 | |||||
|
49 | ImGui.SliderInt("Tree Clearing", ref new_tree_clearing, 0, Simulation.MAX_TREES_TO_CLEAR, string.Format("%d (${0})", new_tree_clearing*Simulation.TREE_CLEAR_COST)); |
|
49 | ImGui.SliderInt("Tree Clearing", ref new_tree_clearing, 0, Simulation.MAX_TREES_TO_CLEAR, string.Format("%d (${0})", new_tree_clearing*Simulation.TREE_CLEAR_COST)); |
|
50 | sim.tree_clearing = new_tree_clearing; |
|
50 | sim.tree_clearing = new_tree_clearing; |
|
51 |
|
51 | ||
|
52 | ImGui.Checkbox("Enforce Trespassing.", ref enforceTresspassing1); |
|
||
|
53 |
|
|||
|
54 | ImGui.Text("Enforce tresspassing?"); |
|
||
|
55 | ImGui.SameLine(); |
|
||
|
56 |
|
|||
|
57 | if (ImGui.BeginCombo("##tresspassing2", enforceTresspassing2)) |
|
52 | if (ImGui.BeginCombo("##tresspassing2", enforceTresspassing2)) |
|
58 | { |
|
53 | { |
|
59 |
|
54 |
You need to be logged in to leave comments.
Login now