Skip to content

Commit

Permalink
Fix duplicating toolbar button
Browse files Browse the repository at this point in the history
  • Loading branch information
severedsolo committed Feb 17, 2020
1 parent 97daea6 commit 96d06e6
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 13 deletions.
11 changes: 5 additions & 6 deletions .idea/.idea.Bureaucracy/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion Bureaucracy/UI/UIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private PopupDialog DrawMainUi()
}
return PopupDialog.SpawnPopupDialog(new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f),
new MultiOptionDialog("BureaucracyMain", "", "Bureaucracy: Budget", UISkinManager.GetSkin("MainMenuSkin"),
GetRect(dialogElements), dialogElements.ToArray()), false, UISkinManager.GetSkin("MainMenuSkin"));
GetRect(dialogElements), dialogElements.ToArray()), false, UISkinManager.GetSkin("MainMenuSkin"), false);
}

private Rect GetRect(List<DialogGUIBase> dialogElements)
Expand Down Expand Up @@ -396,5 +396,11 @@ public PopupDialog KctError()
dialogElements.Add(new DialogGUIButton("OK", () => { }, true));
return PopupDialog.SpawnPopupDialog(new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new MultiOptionDialog("KCTError", "", "KCT Detected!", UISkinManager.GetSkin("MainMenuSkin"), new Rect(0.5f, 0.5f, 400,100), dialogElements.ToArray()), false, UISkinManager.GetSkin("MainMenuSkin"));
}

private void OnDestroy()
{
GameEvents.onGUIApplicationLauncherReady.Remove(SetupToolbarButton);
GameEvents.onGUIApplicationLauncherUnreadifying.Remove(RemoveToolbarButton);
}
}
}
12 changes: 6 additions & 6 deletions GameData/Bureaucracy/Bureaucracy.version
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@
"VERSION" :
{
"MAJOR" : 1,
"MINOR" : 1,
"PATCH" : 5,
"MINOR" : 2,
"PATCH" : 1,
"BUILD" : 0
},
"KSP_VERSION" :
{
"MAJOR" : 1,
"MINOR" : 8,
"PATCH" : 1
"MINOR" : 9,
"PATCH" : 0
},
"KSP_VERSION_MIN" :
{
"MAJOR" : 1,
"MINOR" : 8,
"MINOR" : 9,
"PATCH" : 0
},
"KSP_VERSION_MAX" :
{
"MAJOR" : 1,
"MINOR" : 8,
"MINOR" : 9,
"PATCH" : 99
},
"INSTALL_LOC":
Expand Down
15 changes: 15 additions & 0 deletions GameData/Bureaucracy/Changelog.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@ KERBALCHANGELOG
showChangelog = True
modName = Bureaucracy

VERSION
{
version = 1.2.1
change = Fix Magically Duplicating Toolbar Buttons
}

VERSION
{
version = 1.2
change = Recompile against KSP 1.9
change = Handle Kerbalism's "drip feed" science system properly (this also requires a change in Kerbalism which should be released shortly)
change = Running multiple identical experiments will add them to the same UI element, rather than a line for each
change = Fixed an issue where the mod wouldn't function properly if the first game loaded was a Sandbox save
}

VERSION
{
version = 1.1.5
Expand Down

0 comments on commit 96d06e6

Please sign in to comment.