4 class SettingsDialog : Window
7 background = activeBorder;
13 clientSize = { 436, 92 };
14 anchor = { horz = -83, vert = -104 };
16 Label docLabel { this, text = $"Documentation Path:", anchor = { left = 16, top = 16 }, labeledWindow = pathEditBox };
20 this, text = "...", font = { $"Tahoma", 8.25f, bold = true }, hotKey = f2;
21 anchor = { right = 20, top = 16 };
22 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
24 if(settingsFileDialog.Modal() == ok) // open the file dialog box, and wait for confirmation that all is okay.
26 pathEditBox.contents = settingsFileDialog.filePath; // display the selected directory in the edit box
32 FileDialog settingsFileDialog
34 type = selectDir, text = $"Select a path"; // set the file dialog box to choose a directory instead of a file.
39 this, text = $"Save", size = { 68, 21 }, position = { 224, 56 }, isDefault = true;
41 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
43 ideSettings.docDir = pathEditBox.contents; // Store the path entered into the edit box
44 settingsContainer.Save(); // write that path to the ini file
45 Destroy(DialogResult::ok); // close the window
52 this, text = $"Cancel", size = { 68, 21 }, position = { 304, 56 }, hotKey = escape;
54 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
56 Destroy(DialogResult::cancel); // close the window without making any changes
60 EditBox pathEditBox { this, size = { 214, 19 }, contents = ideSettings.docDir, anchor = { right = 41, top = 16 } };