Description:
Fix things in budget window.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r61:bb78969590d8 -

1 NO CONTENT: modified file, binary diff hidden
1 NO CONTENT: modified file, binary diff hidden
1 NO CONTENT: modified file, binary diff hidden
1 NO CONTENT: modified file, binary diff hidden
1 NO CONTENT: modified file, binary diff hidden
@@ -8,12 +8,7
8 8 "restore": {
9 9 "projectUniqueName": "/Users/alys/repos/isometric-park-fna/FNA/FNA.csproj",
10 10 "projectName": "FNA",
11 "projectPath": "/Users/alys/repos/isometric-park-fna/FNA/FNA.csproj",
12 "frameworks": {
13 "net48": {
14 "projectReferences": {}
15 }
16 }
11 "projectPath": "/Users/alys/repos/isometric-park-fna/FNA/FNA.csproj"
17 12 },
18 13 "frameworks": {
19 14 "net48": {}
@@ -39,6 +34,7
39 34 },
40 35 "frameworks": {
41 36 "net45": {
37 "targetAlias": "net45",
42 38 "projectReferences": {
43 39 "/Users/alys/repos/isometric-park-fna/FNA/FNA.csproj": {
44 40 "projectPath": "/Users/alys/repos/isometric-park-fna/FNA/FNA.csproj"
@@ -54,7 +50,8
54 50 },
55 51 "frameworks": {
56 52 "net45": {
57 "runtimeIdentifierGraphPath": "/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/RuntimeIdentifierGraph.json"
53 "targetAlias": "net45",
54 "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/5.0.102/RuntimeIdentifierGraph.json"
58 55 }
59 56 }
60 57 }
@@ -7,8 +7,11
7 7 <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/Users/alys/.nuget/packages/</NuGetPackageRoot>
8 8 <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/Users/alys/.nuget/packages/</NuGetPackageFolders>
9 9 <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
10 <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.6.0</NuGetToolVersion>
10 <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.8.0</NuGetToolVersion>
11 11 </PropertyGroup>
12 <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
13 <SourceRoot Include="$([MSBuild]::EnsureTrailingSlash($(NuGetPackageFolders)))" />
14 </ItemGroup>
12 15 <PropertyGroup>
13 16 <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
14 17 </PropertyGroup>
@@ -48,6 +48,7
48 48 },
49 49 "frameworks": {
50 50 "net45": {
51 "targetAlias": "net45",
51 52 "projectReferences": {
52 53 "/Users/alys/repos/isometric-park-fna/FNA/FNA.csproj": {
53 54 "projectPath": "/Users/alys/repos/isometric-park-fna/FNA/FNA.csproj"
@@ -63,7 +64,8
63 64 },
64 65 "frameworks": {
65 66 "net45": {
66 "runtimeIdentifierGraphPath": "/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/RuntimeIdentifierGraph.json"
67 "targetAlias": "net45",
68 "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/5.0.102/RuntimeIdentifierGraph.json"
67 69 }
68 70 }
69 71 }
@@ -1,6 +1,6
1 1 {
2 2 "version": 2,
3 "dgSpecHash": "kUPsWi+W/I8KOuiF0fQ9nWh1vVsW3b0wAQVjldBK6JNRF3usvNENwsXcLXddNG6Wh/129HHhkfaanQmLUK7wcA==",
3 "dgSpecHash": "QbljAP9YfnlfGt9DK+paIbf2KN67CHfFFP459FIA09f6Vs2u4/bm6jOZkhaagMtqNxlEucQ1En4ss24qjT71BA==",
4 4 "success": true,
5 5 "projectFilePath": "/Users/alys/repos/isometric-park-fna/SpriteFontPlus/src/SpriteFontPlus.FNA.csproj",
6 6 "expectedPackageFiles": [],
@@ -8,6 +8,7
8 8 public class BudgetWindow
9 9 {
10 10 private Budget budget;
11 private Budget previous_budget;
11 12 private SpriteFont font;
12 13 public int x;
13 14 public int y;
@@ -30,9 +31,10
30 31 this.y = start_y;
31 32 }
32 33
33 public bool update(MouseState mouseCur, Budget budget)
34 public bool update(MouseState mouseCur, Budget budget, Budget previous_budget)
34 35 {
35 36 this.budget = budget;
37 this.previous_budget = previous_budget;
36 38
37 39 if ((mouseCur.LeftButton == ButtonState.Pressed)
38 40 && MathUtils.Between(mouseCur.X, width+x-20, width+x)
@@ -100,12 +102,12
100 102 batch.DrawString(font, String.Format("Starting Funds.........${0:}", this.budget.money), new Vector2(x, bar_height * 2 + y), Color.Black);
101 103
102 104 batch.DrawString(font, String.Format("REVENUE", this.budget.upkeep), new Vector2(x, bar_height * 4 + y), Color.Black);
103 batch.DrawString(font, String.Format("Subsidy................${0:}", this.budget.upkeep), new Vector2(x, bar_height * 5 + y), Color.Black);
105 batch.DrawString(font, String.Format("Subsidy................${0:}....${1:}", this.budget.subsidy, this.previous_budget.subsidy), new Vector2(x, bar_height * 5 + y), Color.Black);
104 106
105 107 batch.DrawString(font, String.Format("EXPENSES", this.budget.upkeep), new Vector2(x, bar_height * 7 + y), Color.Black);
106 batch.DrawString(font, String.Format("Upkeep.................${0:}", this.budget.upkeep), new Vector2(x, bar_height * 8 + y), Color.Black);
108 batch.DrawString(font, String.Format("Upkeep.................${0:}....${1:}", this.budget.upkeep, this.previous_budget.upkeep), new Vector2(x, bar_height * 8 + y), Color.Black);
107 109
108 batch.DrawString(font, String.Format("Ending Funds.........${0:}", this.budget.final_money), new Vector2(x, bar_height * 11 + y), Color.Black);
110 batch.DrawString(font, String.Format("Ending Funds.........${0:}....${1:}", this.budget.final_money, this.previous_budget.final_money), new Vector2(x, bar_height * 11 + y), Color.Black);
109 111
110 112
111 113 FilledRectangle.drawFilledRectangle(batch, new Rectangle(50, 50, 50, 50), new Color (0, 0,0, 0), 0.99f);
@@ -411,7 +411,7
411 411
412 412 if (this.showBudget)
413 413 {
414 this.showBudget = this.budgetWindow.update(mouseCur, this.simulation.latestBudget);
414 this.showBudget = this.budgetWindow.update(mouseCur, this.simulation.latestBudget, this.simulation.previousBudget);
415 415 }
416 416
417 417
@@ -865,13 +865,6
865 865
866 866 additionalInfo.Add("Tracery Test", this.output);
867 867
868 additionalInfo.Add("Budget Money", this.simulation.latestBudget.money.ToString());
869 additionalInfo.Add("Budget Subsidy", this.simulation.latestBudget.subsidy.ToString());
870 additionalInfo.Add("Budget Upkeep", this.simulation.latestBudget.upkeep.ToString());
871 additionalInfo.Add("Budget Money Prior", this.simulation.previousBudget.money.ToString());
872 additionalInfo.Add("Budget Subsidy Prior", this.simulation.previousBudget.subsidy.ToString());
873 additionalInfo.Add("Budget Upkeep Prior", this.simulation.previousBudget.upkeep.ToString());
874
875 868 debugWindow.Layout(debugInfo, additionalInfo, ref show_another_window);
876 869
877 870
@@ -183,12 +183,12
183 183 upkeep = this.map.tree_count * 1
184 184 };
185 185
186
187 newBudget = this.applyBudget(newBudget); ;
186 188 this.budgets.Add(newBudget);
187
188 this.applyBudget(newBudget); ;
189 189 }
190 190
191 public void applyBudget(Budget budget) ///hacky
191 public Budget applyBudget(Budget budget)
192 192 {
193 193
194 194 this.money = budget.money
@@ -197,6 +197,8
197 197
198 198
199 199 budget.final_money = this.money;
200
201 return budget;
200 202 }
201 203
202 204 public void update(TimeSpan deltaTime)
You need to be logged in to leave comments. Login now