Skip to content

Commit f8cd0fd

Browse files
committed
Wrap in GroupOption to allow collapsing.
1 parent 3d411ca commit f8cd0fd

File tree

5 files changed

+32
-16
lines changed

5 files changed

+32
-16
lines changed

SerialPrograms/Source/CommonFramework/Globals.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace PokemonAutomation{
2626
const bool IS_BETA_VERSION = true;
2727
const int PROGRAM_VERSION_MAJOR = 0;
2828
const int PROGRAM_VERSION_MINOR = 60;
29-
const int PROGRAM_VERSION_PATCH = 3;
29+
const int PROGRAM_VERSION_PATCH = 4;
3030

3131
const std::string PROGRAM_VERSION_BASE =
3232
"v" + std::to_string(PROGRAM_VERSION_MAJOR) +

SerialPrograms/Source/Controllers/ControllerStateTable.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,15 @@ std::unique_ptr<EditableTableRow> ControllerCommandTable::make_row(){
313313
ControllerCommandTables::~ControllerCommandTables(){
314314
m_type.remove_listener(*this);
315315
}
316-
ControllerCommandTables::ControllerCommandTables(const std::vector<ControllerClass>& controller_list)
317-
: BatchOption(LockMode::UNLOCK_WHILE_RUNNING)
316+
ControllerCommandTables::ControllerCommandTables(
317+
std::string label,
318+
const std::vector<ControllerClass>& controller_list
319+
)
320+
: GroupOption(
321+
std::move(label),
322+
LockMode::UNLOCK_WHILE_RUNNING,
323+
EnableMode::ALWAYS_ENABLED
324+
)
318325
, m_type(
319326
"<b>Controller Type:</b>",
320327
make_database(controller_list),

SerialPrograms/Source/Controllers/ControllerStateTable.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#ifndef PokemonAutomation_Controllers_ControllerStateTable_H
88
#define PokemonAutomation_Controllers_ControllerStateTable_H
99

10-
#include "Common/Cpp/Options/BatchOption.h"
10+
#include "Common/Cpp/Options/GroupOption.h"
1111
#include "Common/Cpp/Options/EnumDropdownOption.h"
1212
#include "Common/Cpp/Options/EditableTableOption.h"
1313
#include "ControllerTypes.h"
@@ -89,10 +89,13 @@ class ControllerCommandTable : public EditableTableOption{
8989

9090

9191

92-
class ControllerCommandTables : public BatchOption, public ConfigOption::Listener{
92+
class ControllerCommandTables : public GroupOption, public ConfigOption::Listener{
9393
public:
9494
~ControllerCommandTables();
95-
ControllerCommandTables(const std::vector<ControllerClass>& controller_list);
95+
ControllerCommandTables(
96+
std::string label,
97+
const std::vector<ControllerClass>& controller_list
98+
);
9699

97100
void run(CancellableScope& scope, AbstractController& controller){
98101
m_table.run(scope, controller);

SerialPrograms/Source/NintendoSwitch/DevPrograms/TestProgramSwitch.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,14 @@ TestProgram::TestProgram()
224224
, BOX("Box", LockMode::UNLOCK_WHILE_RUNNING, 0, 0, 1, 1)
225225
, BUTTONS("Buttons", ProController_Button_Database(), LockMode::UNLOCK_WHILE_RUNNING, BUTTON_NONE)
226226
, DPAD(ProController_Dpad_Database(), LockMode::UNLOCK_WHILE_RUNNING, DPAD_NONE)
227-
, COMMANDS({
228-
ControllerClass::NintendoSwitch_ProController,
229-
ControllerClass::NintendoSwitch_LeftJoycon,
230-
ControllerClass::NintendoSwitch_RightJoycon,
231-
})
227+
, COMMANDS(
228+
"Command Schedule:",
229+
{
230+
ControllerClass::NintendoSwitch_ProController,
231+
ControllerClass::NintendoSwitch_LeftJoycon,
232+
ControllerClass::NintendoSwitch_RightJoycon,
233+
}
234+
)
232235
, NOTIFICATION_TEST("Test", true, true, ImageAttachmentMode::JPG)
233236
, NOTIFICATIONS({
234237
&NOTIFICATION_TEST,

SerialPrograms/Source/NintendoSwitch/Programs/NintendoSwitch_TurboMacro.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@ TurboMacro::TurboMacro()
3232
LockMode::UNLOCK_WHILE_RUNNING,
3333
100, 0
3434
)
35-
, TABLE({
36-
ControllerClass::NintendoSwitch_ProController,
37-
ControllerClass::NintendoSwitch_LeftJoycon,
38-
ControllerClass::NintendoSwitch_RightJoycon,
39-
})
35+
, TABLE(
36+
"Command Schedule:",
37+
{
38+
ControllerClass::NintendoSwitch_ProController,
39+
ControllerClass::NintendoSwitch_LeftJoycon,
40+
ControllerClass::NintendoSwitch_RightJoycon,
41+
}
42+
)
4043
{
4144
PA_ADD_OPTION(LOOP);
4245
PA_ADD_OPTION(TABLE);

0 commit comments

Comments
 (0)