mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-24 21:50:43 -04:00
fix conflicts
This commit is contained in:
@@ -2760,7 +2760,7 @@ void dFile_select_c::CommandExec() {
|
||||
// Copy over the seed hash as well
|
||||
auto& seedHashes = dusk::getSettings().randomizer.seedHashes;
|
||||
seedHashes[mCpDataToNum].setValue(seedHashes[mCpDataNum]);
|
||||
dusk::config::Save();
|
||||
dusk::config::save();
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@@ -2823,7 +2823,7 @@ void dFile_select_c::ErasePaneMoveOk() {
|
||||
#if TARGET_PC
|
||||
// Clear the seed hash for this file when it gets erased
|
||||
dusk::getSettings().randomizer.seedHashes.at(mSelectNum).setValue("");
|
||||
dusk::config::Save();
|
||||
dusk::config::save();
|
||||
#endif
|
||||
makeRecInfo(mSelectNum);
|
||||
headerTxtSet(0x4b, 0, 0);
|
||||
|
||||
@@ -1360,7 +1360,7 @@ void dMenu_save_c::dataWrite() {
|
||||
#if TARGET_PC
|
||||
// Save randomizer hash
|
||||
dusk::getSettings().randomizer.seedHashes[mSelectedFile].setValue(randomizer_GetContext().mHash);
|
||||
dusk::config::Save();
|
||||
dusk::config::save();
|
||||
if (randomizer_IsActive()) {
|
||||
g_randomizerState.mFileNum = mSelectedFile;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ bool writeAutoSave() {
|
||||
|
||||
// Save randomizer hash
|
||||
dusk::getSettings().randomizer.seedHashes[dComIfGs_getDataNum()].setValue(randomizer_GetContext().mHash);
|
||||
dusk::config::Save();
|
||||
dusk::config::save();
|
||||
if (randomizer_IsActive()) {
|
||||
g_randomizerState.mFileNum = dComIfGs_getDataNum();
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ void add_cosmetic_option(Pane& leftPane, Pane& rightPane, const std::string& key
|
||||
pane.add_child<StringButton>(StringButton::Props{
|
||||
.key = "Edit Hex Color",
|
||||
.getValue = [&option] {
|
||||
return option;
|
||||
return option.getValue();
|
||||
},
|
||||
.setValue = [&option](Rml::String str) {
|
||||
// Make lowercase
|
||||
@@ -103,7 +103,7 @@ void add_cosmetic_option(Pane& leftPane, Pane& rightPane, const std::string& key
|
||||
}
|
||||
|
||||
option.setValue(str);
|
||||
config::Save();
|
||||
config::save();
|
||||
},
|
||||
.maxLength = 6,
|
||||
});
|
||||
@@ -118,7 +118,7 @@ void add_cosmetic_option(Pane& leftPane, Pane& rightPane, const std::string& key
|
||||
if (key.starts_with("Midna's Hair")) {
|
||||
cosmetics::set_all_midna_hair_colors();
|
||||
}
|
||||
config::Save();
|
||||
config::save();
|
||||
});
|
||||
|
||||
pane.add_button(ControlledButton::Props{
|
||||
@@ -128,7 +128,7 @@ void add_cosmetic_option(Pane& leftPane, Pane& rightPane, const std::string& key
|
||||
std::uniform_int_distribution dist(0, 0xFFFFFF);
|
||||
std::string hexStr = randomizer::utility::str::intToHex(dist(rd), 6, false);
|
||||
option.setValue(hexStr);
|
||||
config::Save();
|
||||
config::save();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ void add_cosmetic_option(Pane& leftPane, Pane& rightPane, const std::string& key
|
||||
if (key.starts_with("Midna's Hair")) {
|
||||
cosmetics::set_all_midna_hair_colors();
|
||||
}
|
||||
config::Save();
|
||||
config::save();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -73,28 +73,6 @@ bool Modal::focus() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void Modal::add_action(ModalAction action) {
|
||||
auto actions = mDialog->QuerySelector(".modal-actions");
|
||||
auto btn = std::make_unique<Button>(actions, action.label);
|
||||
btn->root()->SetClass("modal-btn", true);
|
||||
btn->on_pressed([this, callback = std::move(action.onPressed)] {
|
||||
if (callback) {
|
||||
callback(*this);
|
||||
}
|
||||
});
|
||||
mButtons.push_back(std::move(btn));
|
||||
}
|
||||
|
||||
void Modal::set_body(const Rml::String& bodyRml) {
|
||||
auto body = mDialog->QuerySelector(".modal-body");
|
||||
body->SetInnerRML(bodyRml);
|
||||
}
|
||||
|
||||
void Modal::set_icon(const Rml::String& iconStr) {
|
||||
auto icon = mDialog->QuerySelector("icon");
|
||||
icon->SetClassNames({iconStr});
|
||||
}
|
||||
|
||||
void Modal::dismiss() {
|
||||
if (mProps.onDismiss) {
|
||||
mProps.onDismiss(*this);
|
||||
|
||||
@@ -29,10 +29,6 @@ public:
|
||||
void set_body(const Rml::String& bodyRml);
|
||||
void set_icon(const Rml::String& icon);
|
||||
|
||||
void add_action(ModalAction action);
|
||||
void set_body(const Rml::String& bodyRml);
|
||||
void set_icon(const Rml::String& icon);
|
||||
|
||||
protected:
|
||||
bool handle_nav_command(Rml::Event& event, NavCommand cmd) override;
|
||||
void dismiss();
|
||||
|
||||
Reference in New Issue
Block a user