add some more detail to the focus strings for buildings

develop
Myk Taylor 2023-06-29 18:14:15 -07:00
parent 18a9a7d1fa
commit acd03486a9
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 6 additions and 0 deletions

@ -216,6 +216,11 @@ DEFINE_GET_FOCUS_STRING_HANDLER(dwarfmode)
newFocusString = baseFocus; newFocusString = baseFocus;
newFocusString += "/ViewSheets"; newFocusString += "/ViewSheets";
newFocusString += "/" + enum_item_key(game->main_interface.view_sheets.active_sheet); newFocusString += "/" + enum_item_key(game->main_interface.view_sheets.active_sheet);
if (game->main_interface.view_sheets.active_sheet == df::view_sheet_type::BUILDING) {
auto bld = df::building::find(game->main_interface.view_sheets.viewing_bldid);
if (bld)
newFocusString += '/' + enum_item_key(bld->getType());
}
focusStrings.push_back(newFocusString); focusStrings.push_back(newFocusString);
} }
@ -377,6 +382,7 @@ DEFINE_GET_FOCUS_STRING_HANDLER(dwarfmode)
if (game->main_interface.unit_selector.open) { if (game->main_interface.unit_selector.open) {
newFocusString = baseFocus; newFocusString = baseFocus;
newFocusString += "/UnitSelector"; newFocusString += "/UnitSelector";
newFocusString += '/' + enum_item_key(game->main_interface.unit_selector.context);
focusStrings.push_back(newFocusString); focusStrings.push_back(newFocusString);
} }
if (game->main_interface.announcement_alert.open) { if (game->main_interface.announcement_alert.open) {