Skip to content

Commit

Permalink
Small bug fix, and button re-arrangement
Browse files Browse the repository at this point in the history
  • Loading branch information
Caeden117 committed May 24, 2019
1 parent 73097f4 commit 67c773e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Counters+/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.6")]
[assembly: AssemblyFileVersion("1.5.6")]
[assembly: AssemblyVersion("1.5.7")]
[assembly: AssemblyFileVersion("1.5.7")]
19 changes: 9 additions & 10 deletions Counters+/UI/ViewControllers/CountersPlusEditViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ protected override void DidActivate(bool firstActivation, ActivationType activat
}
else
{
UpdateSettings(SelectedConfigModel, SelectedSettingsInfo);
if (SelectedConfigModel != null) UpdateSettings(SelectedConfigModel, SelectedSettingsInfo);
else CreateCredits();
}
}

Expand All @@ -73,7 +74,7 @@ internal static void CreateCredits()

//name = BeatSaberUI.CreateText(rect, "Temporary Name LMAO", Vector2.zero);
name = BeatSaberUI.CreateText(rect, "Counters+", Vector2.zero);
name.fontSize = 9;
name.fontSize = 11;
name.alignment = TextAlignmentOptions.Center;
name.characterSpacing = 2;
setPositioning(name.rectTransform, 0, 0.7f, 1, 0.166f, 0.5f);
Expand All @@ -99,22 +100,20 @@ internal static void CreateCredits()
creator.alignment = TextAlignmentOptions.Center;
setPositioning(creator.rectTransform, 0, 0.35f, 1, 0.166f, 0.5f);

github = BeatSaberUI.CreateUIButton(rect, "QuitButton", Vector2.zero, null, "GitHub");
github = BeatSaberUI.CreateUIButton(rect, "SettingsButton", Vector2.left, null, "GitHub");
github.onClick.AddListener(() => { GoTo("https://github.com/Caeden117/CountersPlus", github); });
setPositioning(github.transform as RectTransform, 0.1f, 0.1f, 0.25f, 0.166f, 0.5f);
setPositioning(github.transform as RectTransform, 0f, 0f, 0.39f, 0.125f, 0.5f);
BeatSaberUI.AddHintText(github.transform as RectTransform, "Opens in a new browser tab on your desktop. Feel free to explore the source code! Maybe try out experimental versions?");

issues = BeatSaberUI.CreateUIButton(rect, "QuitButton", Vector2.zero, null, "Report an Issue");
issues = BeatSaberUI.CreateUIButton(rect, "QuitButton", Vector2.right, null, "Report an Issue");
issues.onClick.AddListener(() => { GoTo("https://github.com/Caeden117/CountersPlus/issues", issues); });
setPositioning(issues.transform as RectTransform, 0.55f, 0.1f, 0.35f, 0.166f, 0.5f);
setPositioning(issues.transform as RectTransform, 0.5f, 0f, 0.5f, 0.125f, 0.5f);
BeatSaberUI.AddHintText(issues.transform as RectTransform, "Opens in a new browser tab on your desktop. Be sure to read the Issue template thoroughly!");

donate = BeatSaberUI.CreateUIButton(rect, "PlayButton", Vector2.zero, null, "<3");
ColorUtility.TryParseHtmlString("#FF0048", out Color color);
donate.gameObject.GetComponentInChildren<Image>().color = color;
donate = BeatSaberUI.CreateUIButton(rect, "CreditsButton", Vector2.zero, null, "<3");
donate.onClick.AddListener(() => { GoTo("https://ko-fi.com/Caeden117", donate); });
BeatSaberUI.AddHintText(donate.transform as RectTransform, "Buy me a coffee if you feel like I'm deserving of one.");
setPositioning(donate.transform as RectTransform, 0.375f, 0.075f, 0.15f, 0.166f, 0.5f);
setPositioning(donate.transform as RectTransform, 0.36f, 0f, 0.17f, 0.125f, 0.5f);

loadedElements.AddRange(new GameObject[] { name.gameObject, version.gameObject, creator.gameObject, github.gameObject, issues.gameObject, donate.gameObject });
}
Expand Down
2 changes: 1 addition & 1 deletion Counters+/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"icon": "CountersPlus.UI.Images.Logo.png",
"id": "Counters+",
"name": "Counters+",
"version": "1.5.6",
"version": "1.5.7",
"dependsOn": {
"BS Utils": "^1.3.3",
"CustomUI": "^1.5.8"
Expand Down

0 comments on commit 67c773e

Please sign in to comment.