diff --git a/src/hci.cpp b/src/hci.cpp index fd1118edb7c..60510062433 100644 --- a/src/hci.cpp +++ b/src/hci.cpp @@ -3155,3 +3155,24 @@ bool intGetShouldShowRedundantDesign() { return includeRedundantDesigns; } + +void intShowInterface() +{ + intAddReticule(); + intShowPowerBar(); + intShowGroupSelectionMenu(); +} + +void intHideInterface(bool forceHidePowerbar) +{ + intRemoveReticule(); + if (forceHidePowerbar) + { + forceHidePowerBar(); + } + else + { + intHidePowerBar(); + } + intHideGroupSelectionMenu(); +} diff --git a/src/hci.h b/src/hci.h index 22ee3d5eedc..7e4f32fc17b 100644 --- a/src/hci.h +++ b/src/hci.h @@ -416,4 +416,7 @@ void intStartStructPosition(BASE_STATS *psStats); /* Remove the object widgets from the widget screen */ void intRemoveObject(); +void intShowInterface(); +void intHideInterface(bool forceHidePowerbar = false); + #endif // __INCLUDED_SRC_HCI_H__ diff --git a/src/wzapi.cpp b/src/wzapi.cpp index f96cc456f6b..dd5cbb82350 100644 --- a/src/wzapi.cpp +++ b/src/wzapi.cpp @@ -2812,9 +2812,7 @@ wzapi::no_return_value wzapi::showReticuleWidget(WZAPI_PARAMS(int buttonId)) //-- wzapi::no_return_value wzapi::showInterface(WZAPI_NO_PARAMS) { - intAddReticule(); - intShowPowerBar(); - intShowGroupSelectionMenu(); + intShowInterface(); return {}; } @@ -2824,9 +2822,7 @@ wzapi::no_return_value wzapi::showInterface(WZAPI_NO_PARAMS) //-- wzapi::no_return_value wzapi::hideInterface(WZAPI_NO_PARAMS) { - intRemoveReticule(); - intHidePowerBar(); - intHideGroupSelectionMenu(); + intHideInterface(); return {}; }