Description:
Use OCR-A for the Budget window.
I think it improves the theming. ?\_(?)_/?
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -159,7 +159,7 | |||
|
159 | 159 | |
|
160 | 160 | Libraries: [FNA](https://fna-xna.github.io/), [SpriteFontPlus](https://github.com/rds1983/SpriteFontPlus), [Tracery.Net](https://github.com/josh-perry/Tracery.Net), [ImGui.NET](http://imgui.net/), and [Encompass-cs](http://moonside.games/docs/encompass/) |
|
161 | 161 | |
|
162 | Fonts: Droid Sans, [Iosevka,](https://typeof.net/Iosevka/) [Typicons by Stephen Hutchings](https://www.s-ings.com/typicons/) | |
|
162 | Fonts: Droid Sans, [Iosevka,](https://typeof.net/Iosevka/), [Typicons by Stephen Hutchings](https://www.s-ings.com/typicons/), [OCRA}() designed by American Type Founders and converted by Matthew Skala | |
|
163 | 163 | |
|
164 | 164 | Sources for the procedural generation are documented in Sources.md. |
|
165 | 165 |
@@ -49,6 +49,7 | |||
|
49 | 49 | // #endif |
|
50 | 50 | private SpriteFont monoFont; |
|
51 | 51 | private SpriteFont largeMonoFont; |
|
52 | private SpriteFont ocrFont; | |
|
52 | 53 | |
|
53 | 54 | private Camera camera = new Camera(new float[] {0.125f, 0.25f, 0.5f, 1.0f, 2.0f, 4.0f }); |
|
54 | 55 | |
@@ -246,8 +247,25 | |||
|
246 | 247 | new CharacterRange((char) 0x00B7) |
|
247 | 248 | } |
|
248 | 249 | ); |
|
250 | ||
|
251 | var bakedOCR = TtfFontBaker.Bake(File.OpenRead(@"Content/OCRA.ttf"), | |
|
252 | 18, | |
|
253 | 1024, | |
|
254 | 1024, | |
|
255 | new[] | |
|
256 | { | |
|
257 | CharacterRange.BasicLatin, | |
|
258 | CharacterRange.Latin1Supplement, | |
|
259 | CharacterRange.LatinExtendedA, | |
|
260 | CharacterRange.Cyrillic, | |
|
261 | CharacterRange.LatinExtendedB, | |
|
262 | new CharacterRange((char) 0x00B7) | |
|
263 | } | |
|
264 | ); | |
|
265 | ||
|
249 | 266 | monoFont = bakedMono.CreateSpriteFont(GraphicsDevice); |
|
250 | 267 | largeMonoFont = bakedMonoLarge.CreateSpriteFont(GraphicsDevice); |
|
268 | ocrFont = bakedOCR.CreateSpriteFont(GraphicsDevice); | |
|
251 | 269 | |
|
252 | 270 | //Has to happen before Encompass stuff, because the Encompass machinery around ImGui requires debugWindow's monoFont to be loaded: |
|
253 | 271 | this.debugWindow = new DebugWindow(this._imGuiRenderer, GraphicsDevice, this.imageMap); |
@@ -398,7 +416,7 | |||
|
398 | 416 | } |
|
399 | 417 | this.simulation.LoadContent(this.newsItems, this.grammar); |
|
400 | 418 | |
|
401 |
this.budgetWindow = new BudgetWindow(new Budget { }, this. |
|
|
419 | this.budgetWindow = new BudgetWindow(new Budget { }, this.ocrFont, 0, 0); | |
|
402 | 420 | |
|
403 | 421 | Logging.Success("Content loaded."); |
|
404 | 422 | } |
@@ -108,7 +108,7 | |||
|
108 | 108 | |
|
109 | 109 | batch.DrawString(font, String.Format("EXPENSES", this.budget.upkeep), new Vector2(x, bar_height * 10 + y), Color.Black); |
|
110 | 110 | batch.DrawString(font, String.Format("Upkeep.................${0:}....${1:}", this.budget.upkeep, this.previous_budget.upkeep), new Vector2(x, bar_height * 11 + y), Color.Black); |
|
111 |
batch.DrawString(font, String.Format("Tree Planting. |
|
|
111 | batch.DrawString(font, String.Format("Tree Planting..........${0:}....${1:}", this.budget.tree_planting, this.previous_budget.tree_planting), new Vector2(x, bar_height * 12 + y), Color.Black); | |
|
112 | 112 | batch.DrawString(font, String.Format("Tree Clearing..........${0:}....${1:}", this.budget.tree_clearing, this.previous_budget.tree_clearing), new Vector2(x, bar_height * 13 + y), Color.Black); |
|
113 | 113 | batch.DrawString(font, String.Format("Enforcement............${0:}....${1:}", this.budget.enforcement, this.previous_budget.enforcement), new Vector2(x, bar_height * 14 + y), Color.Black); |
|
114 | 114 |
@@ -114,6 +114,9 | |||
|
114 | 114 | <None Include="Content\iosevka-medium.ttf"> |
|
115 | 115 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
|
116 | 116 | </None> |
|
117 | <None Include="Content\OCRA.ttf"> | |
|
118 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
|
119 | </None> | |
|
117 | 120 | <Content Include="cimgui/win-x64/cimgui.dll" CopyToOutputDirectory="PreserveNewest" /> |
|
118 | 121 | <Content Include="cimgui/osx-x64/cimgui.dylib" CopyToOutputDirectory="PreserveNewest" Link="libcimgui.dylib" /> |
|
119 | 122 | <Content Include="cimgui/linux-x64/cimgui.so" CopyToOutputDirectory="PreserveNewest" Link="libcimgui.so" /> |
You need to be logged in to leave comments.
Login now