MP Create: removed a few more cases of UI interaction in the plugins context
This commit is contained in:
parent
d27ff57682
commit
a015ca97fe
1 changed files with 8 additions and 8 deletions
|
@ -334,22 +334,22 @@ void tmp_create_game::pre_show(twindow& window)
|
|||
|
||||
#undef UPDATE_ATTRIBUTE
|
||||
|
||||
plugins_context_->set_callback("set_name", [&window](const config& cfg) {
|
||||
find_widget<ttext_box>(&window, "game_name", false).set_value(cfg["name"]); }, true);
|
||||
plugins_context_->set_callback("set_name", [this](const config& cfg) {
|
||||
config_engine_->set_game_name(cfg["name"]); }, true);
|
||||
|
||||
plugins_context_->set_callback("set_password", [&window](const config& cfg) {
|
||||
find_widget<ttext_box>(&window, "game_password", false).set_value(cfg["password"]); }, true);
|
||||
plugins_context_->set_callback("set_password", [this](const config& cfg) {
|
||||
config_engine_->set_game_password(cfg["password"]); }, true);
|
||||
|
||||
plugins_context_->set_callback("select_level", [this](const config& cfg) {
|
||||
selected_game_index_ = convert_to_game_filtered_index(cfg["index"].to_int());
|
||||
create_engine_.set_current_level(selected_game_index_);
|
||||
}, true);
|
||||
|
||||
plugins_context_->set_callback("select_type", [this, &window](const config& cfg) {
|
||||
display_games_of_type(window, ng::level::TYPE::string_to_enum(cfg["type"]), cfg["level"]); }, true);
|
||||
plugins_context_->set_callback("select_type", [this](const config& cfg) {
|
||||
create_engine_.set_current_level_type(ng::level::TYPE::string_to_enum(cfg["type"])); }, true);
|
||||
|
||||
plugins_context_->set_callback("select_era", [&window](const config& cfg) {
|
||||
find_widget<tmenu_button>(&window, "eras", false).set_value(cfg["index"].to_int()); }, true);
|
||||
plugins_context_->set_callback("select_era", [this](const config& cfg) {
|
||||
create_engine_.set_current_era_index(cfg["index"].to_int()); }, true);
|
||||
|
||||
plugins_context_->set_callback("select_mod", [this](const config& cfg) {
|
||||
on_mod_toggle(cfg["index"].to_int()); }, true);
|
||||
|
|
Loading…
Add table
Reference in a new issue