Description:
Hacky changes to make it more like SimCity 2000's.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -1,4 +1,4 | |||
|
1 | using System.Collections.Generic; | |
|
1 | using System.Collections.Generic; | |
|
2 | 2 | using System.Linq; |
|
3 | 3 | using Microsoft.Xna.Framework; |
|
4 | 4 | using Microsoft.Xna.Framework.Audio; |
@@ -35,6 +35,7 | |||
|
35 | 35 | private SpriteBatch batch; |
|
36 | 36 | private SoundEffect sound; |
|
37 | 37 | private SpriteFont monoFont; |
|
38 | private SpriteFont smallFont; | |
|
38 | 39 | |
|
39 | 40 | private Camera camera = new Camera(new float[] { 0.25f, 0.5f, 1.0f, 2.0f, 4.0f }); |
|
40 | 41 | |
@@ -906,7 +907,7 | |||
|
906 | 907 | |
|
907 | 908 | bool quit = false; |
|
908 | 909 | Menu.Render(debugWindow.monoFont, FNAGame.width, this.imGuiWindowBridgeEngine, ref quit, ref this.simulation.paused, ref this.simulation.currentRate, ref this.showBudget, header_left); |
|
909 | Toolbar.Render(debugWindow.monoFont, FNAGame.width, this.imGuiWindowBridgeEngine); | |
|
910 | Toolbar.Render(debugWindow.monoFont, debugWindow.smallFont, FNAGame.width, this.imGuiWindowBridgeEngine); | |
|
910 | 911 | |
|
911 | 912 | if (quit) { |
|
912 | 913 | System.Environment.Exit(0); |
@@ -32,6 +32,7 | |||
|
32 | 32 | private bool show_test_window; |
|
33 | 33 | |
|
34 | 34 | public ImFontPtr monoFont; |
|
35 | public ImFontPtr smallFont; | |
|
35 | 36 | |
|
36 | 37 | |
|
37 | 38 | public DebugWindow(ImGuiRenderer _imGuiRenderer, GraphicsDevice graphicsDevice) |
@@ -62,6 +63,20 | |||
|
62 | 63 | |
|
63 | 64 | } |
|
64 | 65 | |
|
66 | unsafe //god this sucks | |
|
67 | { | |
|
68 | ImFontConfigPtr config = ImGuiNative.ImFontConfig_ImFontConfig(); | |
|
69 | config.MergeMode = true; | |
|
70 | var builder = new ImFontGlyphRangesBuilderPtr(ImGuiNative.ImFontGlyphRangesBuilder_ImFontGlyphRangesBuilder()); | |
|
71 | // builder.AddText("\ue125\ue126"); | |
|
72 | var icon_ranges = new ushort[] { 0xe000, 0xe1f4, 0 }; | |
|
73 | GCHandle rangeHandle = GCHandle.Alloc(icon_ranges, GCHandleType.Pinned); | |
|
74 | io.Fonts.AddFontFromFileTTF(@"Content/typicons.ttf", 15, config, rangeHandle.AddrOfPinnedObject()); | |
|
75 | ||
|
76 | ||
|
77 | } | |
|
78 | this.smallFont = io.Fonts.AddFontFromFileTTF(@"Content/iosevka-term-extendedmedium.ttf", 5); | |
|
79 | ||
|
65 | 80 | _imGuiRenderer.RebuildFontAtlas(); // Required so fonts are available for rendering |
|
66 | 81 | |
|
67 | 82 |
You need to be logged in to leave comments.
Login now