@@ -1112,32 +1112,34 @@ namespace embark_assist {
11121112
11131113 ViewscreenFindUi::ViewscreenFindUi () {
11141114 }
1115+ }
1116+ }
11151117
1116- // ===============================================================================
1117-
1118- void init (DFHack::Plugin *plugin_self, embark_assist::defs::find_callbacks find_callback, uint16_t max_inorganic) {
1119- if (!state) { // First call. Have to do the setup
1120- ui_setup (find_callback, max_inorganic);
1121- }
1122- Screen::show (new ViewscreenFindUi (), plugin_self);
1123- }
1118+ // ===============================================================================
1119+ // Exported operations
1120+ // ===============================================================================
11241121
1125- // ===============================================================================
1122+ void embark_assist::finder_ui::init (DFHack::Plugin *plugin_self, embark_assist::defs::find_callbacks find_callback, uint16_t max_inorganic) {
1123+ if (!embark_assist::finder_ui::state) { // First call. Have to do the setup
1124+ embark_assist::finder_ui::ui_setup (find_callback, max_inorganic);
1125+ }
1126+ Screen::show (new ViewscreenFindUi (), plugin_self);
1127+ }
11261128
1127- void activate () {
1128- }
1129+ // ===============================================================================
11291130
1130- // ===============================================================================
1131+ void embark_assist::finder_ui::activate () {
1132+ }
11311133
1132- void shutdown () {
1133- if (embark_assist::finder_ui::state) {
1134- for (uint16_t i = 0 ; i < state->ui .size (); i++) {
1135- delete state->ui [i];
1136- }
1134+ // ===============================================================================
11371135
1138- delete state;
1139- state = nullptr ;
1140- }
1136+ void embark_assist::finder_ui::shutdown () {
1137+ if (embark_assist::finder_ui::state) {
1138+ for (uint16_t i = 0 ; i < embark_assist::finder_ui::state->ui .size (); i++) {
1139+ delete embark_assist::finder_ui::state->ui [i];
11411140 }
1141+
1142+ delete embark_assist::finder_ui::state;
1143+ embark_assist::finder_ui::state = nullptr ;
11421144 }
1143- }
1145+ }
0 commit comments