mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
overlay: helper modal dialog for picking option values (#561)
## Link to GitHub Issue or related Pull Request, if one exists ## Description of change Introduce a new modal dialog for picking out some of the options to improve UX. Implemented a few for now: 1. UI for picking ASIO drivers from a list (for -iidxasio, -sdvxasio, -asioconvert, etc) 2. Button to generate card numbers for -card0 and card1 3. Processor Affinity selector (very similar to what's in Windows Task Manager, list of checkboxes) 4. file selector (file open dialog for various file path overrides like log file) 5. folder selector (folder override) I wrote a selector for COM ports as well but how we use the value was inconsistent (\\\\.\\COMx vs. COMx) and didn't see a huge point in it so I didn't check it in. ## Testing
This commit is contained in:
@@ -13,6 +13,15 @@ enum class OptionType {
|
||||
Hex,
|
||||
};
|
||||
|
||||
enum class OptionPickerType {
|
||||
None,
|
||||
AsioDriver,
|
||||
EACard,
|
||||
CpuAffinity,
|
||||
FilePath,
|
||||
DirectoryPath,
|
||||
};
|
||||
|
||||
struct OptionDefinition {
|
||||
std::string title;
|
||||
// unique identifier used for flag matching but also stored in config files
|
||||
@@ -32,6 +41,10 @@ struct OptionDefinition {
|
||||
bool sensitive = false;
|
||||
std::vector<std::pair<std::string, std::string>> elements = {};
|
||||
bool disabled = false;
|
||||
OptionPickerType picker = OptionPickerType::None;
|
||||
|
||||
// for OptionPickerType::FilePath
|
||||
std::string file_extension = "";
|
||||
};
|
||||
|
||||
class Option {
|
||||
|
||||
Reference in New Issue
Block a user