Get the scenario, town, and outdoor details dialogs updated for new stuff
- Advanced town details now offers edit buttons to edit the specials immediately Changes to dialog engine: - Fix tiny buttons stretching to fill label area - Fix LEDs stretching if label area is higher than LED button - Fix LEDs ignoring font setting
This commit is contained in:
@@ -2038,22 +2038,26 @@ static bool save_scen_details(cDialog& me) {
|
||||
cLedGroup& rating = dynamic_cast<cLedGroup&>(me["rating"]);
|
||||
scenario.rating = rating.getSelected()[4] - '1';
|
||||
}
|
||||
scenario.adjust_diff = dynamic_cast<cLed&>(me["adjust"]).getState() != led_red;
|
||||
for(i = 0; i < 3; i++)
|
||||
scenario.format.ver[i] = me["ver" + std::to_string(i + 1)].getTextAsNum();
|
||||
scenario.who_wrote[0] = me["who1"].getText().substr(0, 60);
|
||||
scenario.who_wrote[1] = me["who2"].getText().substr(0, 60);
|
||||
scenario.contact_info = me["contact"].getText().substr(0, 256);
|
||||
scenario.campaign_id = me["cpnid"].getText();
|
||||
return true;
|
||||
}
|
||||
|
||||
static void put_scen_details_in_dlog(cDialog& me) {
|
||||
dynamic_cast<cLedGroup&>(me["difficulty"]).setSelected("lvl" + std::to_string(scenario.difficulty + 1));
|
||||
dynamic_cast<cLedGroup&>(me["rating"]).setSelected("rate" + std::to_string(scenario.rating + 1));
|
||||
dynamic_cast<cLed&>(me["adjust"]).setState(scenario.adjust_diff ? led_red : led_off);
|
||||
for(int i = 0; i < 3; i++)
|
||||
me["ver" + std::to_string(i + 1)].setTextToNum(scenario.format.ver[i]);
|
||||
me["who1"].setText(scenario.who_wrote[0]);
|
||||
me["who2"].setText(scenario.who_wrote[1]);
|
||||
me["contact"].setText(scenario.contact_info);
|
||||
me["cpnid"].setText(scenario.campaign_id);
|
||||
}
|
||||
|
||||
static bool edit_scen_details_event_filter(cDialog& me, std::string, eKeyMod) {
|
||||
|
Reference in New Issue
Block a user