1 #pragma once 2 3 #include "lab/dialogs/lab_dialog.h" 4 5 6 class BackgroundDialog : public LabDialog { 7 public: 8 ~BackgroundDialog() override = default; 9 10 private: 11 // Called when this dialog is opened via the top toolbar 12 void open(Button* /*caller*/) override; 13 14 // Called when the dialog is closed close()15 void close() override { 16 if (dialogWindow != nullptr) { 17 dialogWindow->DeleteChildren(); 18 dialogWindow = nullptr; 19 } 20 } 21 22 // Called when the global state changes (e.g. other ship/weapon being selected) update(LabMode,int)23 void update(LabMode /*newLabMode*/, int /*classIndex*/) override { /*do nothing*/ } 24 25 // Returns the string to use for the top nav bar getTitle()26 SCP_string getTitle() override { return "Backgrounds"; } 27 28 // Returns true if it is safe to open this dialog safeToOpen(LabMode)29 bool safeToOpen(LabMode /*labMode*/) override { return true; } 30 31 private: 32 DialogWindow* dialogWindow = nullptr; 33 };