1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#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<wxVariant> 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<size_t>(AP_GetDoorShuffleMode())],
0, 1);
SetTextValue(AP_AreDoorsGrouped() ? "Yes" : "No", 1, 1);
SetTextValue(
kLocationChecksLabels[static_cast<size_t>(AP_GetLocationsChecks())], 2,
1);
SetTextValue(AP_IsColorShuffle() ? "Yes" : "No", 3, 1);
SetTextValue(
kPanelShuffleLabels[static_cast<size_t>(AP_GetPanelShuffleMode())], 4, 1);
SetTextValue(AP_IsPaintingShuffle() ? "Yes" : "No", 5, 1);
SetTextValue(
kVictoryConditionLabels[static_cast<size_t>(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<size_t>(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);
}
|