Description:
Fix issue when adjusting width.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -170,6 +170,10 | |||||
|
170 | - Grids sometimes overlap trees. |
|
170 | - Grids sometimes overlap trees. |
|
171 | - Trees sometimes |
|
171 | - Trees sometimes |
|
172 | - Sometimes framerate jumps to 180-200 fps. (Better than reverse, but kinda weird) |
|
172 | - Sometimes framerate jumps to 180-200 fps. (Better than reverse, but kinda weird) |
|
|
173 | - Graphics don't adjust for the resolution | ||
|
|
174 | - Scroll area | ||
|
|
175 | - Ingame Menu @done(2021-06-22) | ||
|
|
176 | - Main Menu | ||
|
173 | Misc: |
|
177 | Misc: |
|
174 | - Exits are messy (does Encompass add threading?) |
|
178 | - Exits are messy (does Encompass add threading?) |
|
175 | [xcb] Unknown sequence number while appending request |
|
179 | [xcb] Unknown sequence number while appending request |
@@ -240,7 +240,7 | |||||
|
240 | WorldBuilder.AddEngine(new OrganizationSpawner(this.simulation, this.grammar)); |
|
240 | WorldBuilder.AddEngine(new OrganizationSpawner(this.simulation, this.grammar)); |
|
241 |
|
241 | ||
|
242 | WorldBuilder.AddGeneralRenderer(new AreaRenderer(this.batch, this.monoFont), 1); |
|
242 | WorldBuilder.AddGeneralRenderer(new AreaRenderer(this.batch, this.monoFont), 1); |
|
243 |
WorldBuilder.AddGeneralRenderer(new ImGuiWindowRenderer(this, debugWindow.monoFont, debugWindow.italicFont, this.imGuiWindowBridgeEngine, |
|
243 | WorldBuilder.AddGeneralRenderer(new ImGuiWindowRenderer(this, debugWindow.monoFont, debugWindow.italicFont, this.imGuiWindowBridgeEngine, this.gdm) , 2); |
|
244 | var contractWindow = WorldBuilder.CreateEntity(); |
|
244 | var contractWindow = WorldBuilder.CreateEntity(); |
|
245 | WorldBuilder.SetComponent(contractWindow, new VisibilityComponent { visible = false }); |
|
245 | WorldBuilder.SetComponent(contractWindow, new VisibilityComponent { visible = false }); |
|
246 | WorldBuilder.SetComponent(contractWindow, new WindowTypeComponent { type = isometricparkfna.Messages.Window.Contracts }); |
|
246 | WorldBuilder.SetComponent(contractWindow, new WindowTypeComponent { type = isometricparkfna.Messages.Window.Contracts }); |
@@ -22,15 +22,17 | |||||
|
22 | private ImFontPtr font; |
|
22 | private ImFontPtr font; |
|
23 | private ImFontPtr italicFont; |
|
23 | private ImFontPtr italicFont; |
|
24 | private ImGuiWindowBridgeEngine BridgeEngine; |
|
24 | private ImGuiWindowBridgeEngine BridgeEngine; |
|
25 | private int width; |
|
||
|
26 | private FNAGame game; |
|
25 | private FNAGame game; |
|
27 | public ImGuiWindowRenderer(FNAGame game, ImFontPtr font, ImFontPtr italicFont, ImGuiWindowBridgeEngine engine, int width) |
|
26 | |
|
|
27 | private GraphicsDeviceManager gdm; | ||
|
|
28 | |||
|
|
29 | public ImGuiWindowRenderer(FNAGame game, ImFontPtr font, ImFontPtr italicFont, ImGuiWindowBridgeEngine engine, GraphicsDeviceManager gdm) | ||
|
28 | { |
|
30 | { |
|
29 | this.font = font; |
|
31 | this.font = font; |
|
30 | this.italicFont = italicFont; |
|
32 | this.italicFont = italicFont; |
|
31 | this.BridgeEngine = engine; |
|
33 | this.BridgeEngine = engine; |
|
32 | this.width = width; |
|
||
|
33 | this.game = game; |
|
34 | this.game = game; |
|
|
35 | this.gdm = gdm; | ||
|
34 | } |
|
36 | } |
|
35 |
|
37 | ||
|
36 | private (Entity entity, string name, string description, ContractStatus status, decimal amount, string delta_trees, int image_index, Vector2 square) |
|
38 | private (Entity entity, string name, string description, ContractStatus status, decimal amount, string delta_trees, int image_index, Vector2 square) |
@@ -62,6 +64,8 | |||||
|
62 |
|
64 | ||
|
63 | public override void Render() |
|
65 | public override void Render() |
|
64 | { |
|
66 | { |
|
|
67 | |||
|
|
68 | var width = gdm.PreferredBackBufferWidth; | ||
|
65 | foreach (ref readonly var entity in ReadEntities<WindowTypeComponent>()) |
|
69 | foreach (ref readonly var entity in ReadEntities<WindowTypeComponent>()) |
|
66 | { |
|
70 | { |
|
67 | var window_type = GetComponent<WindowTypeComponent>(entity).type; |
|
71 | var window_type = GetComponent<WindowTypeComponent>(entity).type; |
You need to be logged in to leave comments.
Login now