Skip to content

Commit f38bd3f

Browse files
committed
Moved rando to its own achievement window
1 parent 33f24a5 commit f38bd3f

5 files changed

Lines changed: 31 additions & 17 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ modding/
9797
node_modules
9898
/src/port/build.c
9999
/properties.h
100-
!/src/port/mods/
101100
mods/
101+
randomizer/
102+
!/src/port/mods/
102103
saves/
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include "port/ui/GhostshipMenu.h"
2+
3+
namespace GhostshipGui {
4+
using namespace UIWidgets;
5+
6+
void GhostshipMenu::AddMenuAchievements() {
7+
// Add Rando Menu
8+
AddMenuEntry("Achievements", CVAR_SETTING("Menu.AchievementsSidebarSection"));
9+
10+
WidgetPath path = { "Achievements", "General", SECTION_COLUMN_1 };
11+
AddSidebarEntry("Achievements", path.sidebarName, 1);
12+
13+
AddWidget(path, "Enable Achievements", WIDGET_CVAR_CHECKBOX)
14+
.CVar(CVAR_ENHANCEMENT("Achievements"))
15+
.RaceDisable(false)
16+
.Options(CheckboxOptions().Tooltip(
17+
"Enables the achievement system, which tracks various accomplishments and milestones in the game."));
18+
19+
AddWidget(path, "Popout Achievements", WIDGET_WINDOW_BUTTON)
20+
.CVar(CVAR_WINDOW("Achievements"))
21+
.WindowName("Achievements")
22+
.HideInSearch(true)
23+
.Options(WindowButtonOptions().Tooltip("Enables the separate Achievements Window."));
24+
}
25+
26+
} // namespace GhostshipGui

src/port/ui/GhostshipMenu.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ void GhostshipMenu::InitElement() {
123123
Ship::Menu::InitElement();
124124
AddMenuSettings();
125125
AddMenuEnhancements();
126-
AddMenuDevTools();
127126
AddMenuRando();
127+
AddMenuAchievements();
128+
AddMenuDevTools();
128129

129130
if (CVarGetInteger(CVAR_SETTING("Menu.SidebarSearch"), 0)) {
130131
InsertSidebarSearch();

src/port/ui/GhostshipMenu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class GhostshipMenu : public Ship::Menu {
2323
void AddMenuEnhancements();
2424
void AddMenuDevTools();
2525
void AddMenuRando();
26+
void AddMenuAchievements();
2627

2728
private:
2829
char mGitCommitHashTruncated[8];

src/port/ui/GhostshipMenuEnhancements.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,21 +120,6 @@ void GhostshipMenu::AddMenuEnhancements() {
120120
})
121121
.Options(IntSliderOptions().Min(1).Max(100).DefaultValue(9).ShowButtons(true).Format("%d"));
122122

123-
path = { "Enhancements", "Achievements", SECTION_COLUMN_1 };
124-
AddSidebarEntry("Enhancements", path.sidebarName, 1);
125-
126-
AddWidget(path, "Enable Achievements", WIDGET_CVAR_CHECKBOX)
127-
.CVar(CVAR_ENHANCEMENT("Achievements"))
128-
.RaceDisable(false)
129-
.Options(CheckboxOptions().Tooltip(
130-
"Enables the achievement system, which tracks various accomplishments and milestones in the game."));
131-
132-
AddWidget(path, "Popout Achievements", WIDGET_WINDOW_BUTTON)
133-
.CVar(CVAR_WINDOW("Achievements"))
134-
.WindowName("Achievements")
135-
.HideInSearch(true)
136-
.Options(WindowButtonOptions().Tooltip("Enables the separate Achievements Window."));
137-
138123
path = { "Enhancements", "Gameplay", SECTION_COLUMN_1 };
139124
AddSidebarEntry("Enhancements", path.sidebarName, 1);
140125
path.column = SECTION_COLUMN_1;

0 commit comments

Comments
 (0)