Browse code

Add wxWidgets-based configuration dialog boxes.

* Removes the configuration dialog boxes that used my DialogBuilder.
* Move default configuration values to be inlined within the headers.
* Moved 2SF's and GSF's XSFConfig classes to their own headers to accommodate the new wxWidgets dialog boxes.
* Make it so NCSF's SoundView dialog can be toggled on or off from the configuration dialog box.

Naram Qashat authored on 2021/04/04 12:46:14
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,39 @@
1
+/*
2
+ * xSF - 2SF configuration
3
+ * By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
4
+ *
5
+ * Partially based on the vio*sf framework
6
+ */
7
+
8
+#pragma once
9
+
10
+#include <bitset>
11
+#include <string>
12
+#include "windowsh_wrapper.h"
13
+#include "XSFConfig.h"
14
+
15
+class wxWindow;
16
+class XSFConfigDialog;
17
+class XSFPlayer;
18
+
19
+class XSFConfig_2SF : public XSFConfig
20
+{
21
+protected:
22
+	static constexpr unsigned initInterpolation = 2;
23
+	inline static const std::string initMutes = "0000000000000000";
24
+
25
+	friend class XSFConfig;
26
+	unsigned interpolation;
27
+	std::bitset<16> mutes;
28
+
29
+	XSFConfig_2SF();
30
+	void LoadSpecificConfig() override;
31
+	void SaveSpecificConfig() override;
32
+	void InitializeSpecificConfigDialog(XSFConfigDialog *dialog) override;
33
+	void ResetSpecificConfigDefaults(XSFConfigDialog *dialog) override;
34
+	void SaveSpecificConfigDialog(XSFConfigDialog *dialog) override;
35
+	void CopySpecificConfigToMemory(XSFPlayer *xSFPlayer, bool preLoad) override;
36
+public:
37
+	void About(HWND parent) override;
38
+	XSFConfigDialog *CreateDialogBox(wxWindow *window, const std::string &title) override;
39
+};