summaryrefslogtreecommitdiffstats
path: root/editor/run_instances_dialog.h
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-07-27 13:26:29 +0200
committerkobewi <kobewi4e@gmail.com>2024-02-13 17:38:45 +0100
commit1b2c7bfe7763feb4d3922508739b1ed34888dd3a (patch)
tree8d9b7ac37099fb9281db14876529091253573bae /editor/run_instances_dialog.h
parentdfe226b93346c208787728eceecc2c64d81a9553 (diff)
downloadredot-engine-1b2c7bfe7763feb4d3922508739b1ed34888dd3a.tar.gz
Allow to set custom feature tags for testing
Diffstat (limited to 'editor/run_instances_dialog.h')
-rw-r--r--editor/run_instances_dialog.h34
1 files changed, 27 insertions, 7 deletions
diff --git a/editor/run_instances_dialog.h b/editor/run_instances_dialog.h
index cc4cd6eb5b..8e0007dc8e 100644
--- a/editor/run_instances_dialog.h
+++ b/editor/run_instances_dialog.h
@@ -37,24 +37,41 @@ class CheckBox;
class LineEdit;
class SpinBox;
class Timer;
-class VBoxContainer;
+class Tree;
+class TreeItem;
class RunInstancesDialog : public AcceptDialog {
GDCLASS(RunInstancesDialog, AcceptDialog);
-private:
- static RunInstancesDialog *singleton;
+ enum Columns {
+ COLUMN_OVERRIDE_ARGS,
+ COLUMN_LAUNCH_ARGUMENTS,
+ COLUMN_OVERRIDE_FEATURES,
+ COLUMN_FEATURE_TAGS,
+ };
+
+ struct InstanceData {
+ TreeItem *item = nullptr;
+
+ bool overrides_run_args() const;
+ String get_launch_arguments() const;
+ bool overrides_features() const;
+ String get_feature_tags() const;
+ };
+
+ inline static RunInstancesDialog *singleton = nullptr;
+
+ TypedArray<Dictionary> stored_data;
+ Vector<InstanceData> instances_data;
Timer *main_apply_timer = nullptr;
Timer *instance_apply_timer = nullptr;
LineEdit *main_args_edit = nullptr;
+ LineEdit *main_features_edit = nullptr;
SpinBox *instance_count = nullptr;
CheckBox *enable_multiple_instances_checkbox = nullptr;
- VBoxContainer *argument_container = nullptr;
-
- Array override_list;
- PackedStringArray argument_list;
+ Tree *instance_tree = nullptr;
void _fetch_main_args();
// These 2 methods are necessary due to callable_mp() not supporting default arguments.
@@ -62,14 +79,17 @@ private:
void _start_instance_timer();
void _refresh_argument_count();
+ void _create_instance(InstanceData &p_instance, const Dictionary &p_data, int p_idx);
void _save_main_args();
void _save_arguments();
// Separates command line arguments without splitting up quoted strings.
Vector<String> _split_cmdline_args(const String &p_arg_string) const;
public:
+ void popup_dialog();
int get_instance_count() const;
void get_argument_list_for_instance(int p_idx, List<String> &r_list) const;
+ void apply_custom_features(int p_instance_idx);
static RunInstancesDialog *get_singleton() { return singleton; }
RunInstancesDialog();