Skip to content

Commit

Permalink
Don't write needs_select to menu item config unless true
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Oct 18, 2019
1 parent 14284e8 commit 49f4656
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/game_events/menu_item.cpp
Expand Up @@ -220,9 +220,12 @@ void wml_menu_item::to_config(config& cfg) const
cfg["id"] = item_id_;
cfg["image"] = image_;
cfg["description"] = description_;
cfg["needs_select"] = needs_select_;
cfg["synced"] = is_synced_;

if(needs_select_) {
cfg["needs_select"] = true;
}

if(use_hotkey_ && use_wml_menu_) {
cfg["use_hotkey"] = true;
}
Expand Down

0 comments on commit 49f4656

Please sign in to comment.