#include "options_pane.h" #include "ap_state.h" namespace { const char* kDoorShuffleLabels[] = {"None", "Panels", "Doors"}; const char* kLocationChecksLabels[] = {"Normal", "Reduced", "Insanity"}; const char* kPanelShuffleLabels[] = {"None", "Rearrange"}; const char* kVictoryConditionLabels[] = {"The End", "The Master", "Level 2", "Pilgrimage"}; const char* kSunwarpAccessLabels[] = {"Normal", "Disabled", "Unlock", "Individual", "Progressive"}; void AddRow(wxDataViewListCtrl* list, const std::string& text) { wxVector data; data.push_back(wxVariant{text + ": "}); data.push_back(wxVariant{""}); list->AppendItem(data); } } // namespace OptionsPane::OptionsPane(wxWindow* parent) : wxDataViewListCtrl(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_ROW_LINES) { AppendTextColumn("Name", wxDATAVIEW_CELL_INERT, wxCOL_WIDTH_AUTOSIZE); AppendTextColumn("Value"); AddRow(this, "Shuffle Doors"); AddRow(this, "Group Doors"); AddRow(this, "Location Checks"); AddRow(this, "Shuffle Colors"); AddRow(this, "Shuffle Panels"); AddRow(this, "Shuffle Paintings"); AddRow(this, "Victory Condition"); AddRow(this, "Early Color Hallways"); AddRow(this, "Shuffle Postgame"); AddRow(this, "Enable Pilgrimage"); AddRow(this, "Pilgrimage Roof Access"); AddRow(this, "Pilgrimage Paintings"); AddRow(this, "Sunwarp Access"); AddRow(this, "Shuffle Sunwarps"); AddRow(this, "Mastery Achievements"); AddRow(this, "Level 2 Requirement"); } void OptionsPane::OnConnect() { SetTextValue(kDoorShuffleLabels[static_cast(AP_GetDoorShuffleMode())], 0, 1); SetTextValue(AP_AreDoorsGrouped() ? "Yes" : "No", 1, 1); SetTextValue( kLocationChecksLabels[static_cast(AP_GetLocationsChecks())], 2, 1); SetTextValue(AP_IsColorShuffle() ? "Yes" : "No", 3, 1); SetTextValue( kPanelShuffleLabels[static_cast(AP_GetPanelShuffleMode())], 4, 1); SetTextValue(AP_IsPaintingShuffle() ? "Yes" : "No", 5, 1); SetTextValue( kVictoryConditionLabels[static_cast(AP_GetVictoryCondition())], 6, 1); SetTextValue(AP_HasEarlyColorHallways() ? "Yes" : "No", 7, 1); SetTextValue(AP_IsPostgameShuffle() ? "Yes" : "No", 8, 1); SetTextValue(AP_IsPilgrimageEnabled() ? "Yes" : "No", 9, 1); SetTextValue(AP_DoesPilgrimageAllowRoofAccess() ? "Yes" : "No", 10, 1); SetTextValue(AP_DoesPilgrimageAllowPaintings() ? "Yes" : "No", 11, 1); SetTextValue(kSunwarpAccessLabels[static_cast(AP_GetSunwarpAccess())], 12, 1); SetTextValue(AP_IsSunwarpShuffle() ? "Yes" : "No", 13, 1); SetTextValue(std::to_string(AP_GetMasteryRequirement()), 14, 1); SetTextValue(std::to_string(AP_GetLevel2Requirement()), 15, 1); }