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 | 170 | - Grids sometimes overlap trees. |
|
171 | 171 | - Trees sometimes |
|
172 | 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 | 177 | Misc: |
|
174 | 178 | - Exits are messy (does Encompass add threading?) |
|
175 | 179 | [xcb] Unknown sequence number while appending request |
@@ -240,7 +240,7 | |||
|
240 | 240 | WorldBuilder.AddEngine(new OrganizationSpawner(this.simulation, this.grammar)); |
|
241 | 241 | |
|
242 | 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 | 244 | var contractWindow = WorldBuilder.CreateEntity(); |
|
245 | 245 | WorldBuilder.SetComponent(contractWindow, new VisibilityComponent { visible = false }); |
|
246 | 246 | WorldBuilder.SetComponent(contractWindow, new WindowTypeComponent { type = isometricparkfna.Messages.Window.Contracts }); |
@@ -22,15 +22,17 | |||
|
22 | 22 | private ImFontPtr font; |
|
23 | 23 | private ImFontPtr italicFont; |
|
24 | 24 | private ImGuiWindowBridgeEngine BridgeEngine; |
|
25 | private int width; | |
|
26 | 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 | 31 | this.font = font; |
|
30 | 32 | this.italicFont = italicFont; |
|
31 | 33 | this.BridgeEngine = engine; |
|
32 | this.width = width; | |
|
33 | 34 | this.game = game; |
|
35 | this.gdm = gdm; | |
|
34 | 36 | } |
|
35 | 37 | |
|
36 | 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 | 65 | public override void Render() |
|
64 | 66 | { |
|
67 | ||
|
68 | var width = gdm.PreferredBackBufferWidth; | |
|
65 | 69 | foreach (ref readonly var entity in ReadEntities<WindowTypeComponent>()) |
|
66 | 70 | { |
|
67 | 71 | var window_type = GetComponent<WindowTypeComponent>(entity).type; |
You need to be logged in to leave comments.
Login now