summaryrefslogtreecommitdiff
path: root/editor/run_settings_dialog.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-03-05 16:44:50 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-03-05 16:44:50 +0100
commit5dbf1809c6e3e905b94b8764e99491e608122261 (patch)
tree5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /editor/run_settings_dialog.cpp
parent45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff)
A Whole New World (clang-format edition)
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
Diffstat (limited to 'editor/run_settings_dialog.cpp')
-rw-r--r--editor/run_settings_dialog.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/editor/run_settings_dialog.cpp b/editor/run_settings_dialog.cpp
index 4d69c7ad84..35cbb6c410 100644
--- a/editor/run_settings_dialog.cpp
+++ b/editor/run_settings_dialog.cpp
@@ -28,14 +28,12 @@
/*************************************************************************/
#include "run_settings_dialog.h"
-
void RunSettingsDialog::popup_run_settings() {
- popup_centered(Size2( 300, 150 ));
+ popup_centered(Size2(300, 150));
}
-void RunSettingsDialog::set_custom_arguments(const String& p_arguments) {
-
+void RunSettingsDialog::set_custom_arguments(const String &p_arguments) {
arguments->set_text(p_arguments);
}
@@ -44,16 +42,15 @@ String RunSettingsDialog::get_custom_arguments() const {
return arguments->get_text();
}
-
void RunSettingsDialog::_bind_methods() {
- ClassDB::bind_method("_run_mode_changed",&RunSettingsDialog::_run_mode_changed);
+ ClassDB::bind_method("_run_mode_changed", &RunSettingsDialog::_run_mode_changed);
//ClassDB::bind_method("_browse_selected_file",&RunSettingsDialog::_browse_selected_file);
}
void RunSettingsDialog::_run_mode_changed(int idx) {
- if (idx==0)
+ if (idx == 0)
arguments->set_editable(false);
else
arguments->set_editable(true);
@@ -74,17 +71,17 @@ RunSettingsDialog::RunSettingsDialog() {
/* SNAP DIALOG */
- VBoxContainer *vbc = memnew( VBoxContainer );
+ VBoxContainer *vbc = memnew(VBoxContainer);
add_child(vbc);
//set_child_rect(vbc);
- run_mode = memnew( OptionButton );
- vbc->add_margin_child(TTR("Run Mode:"),run_mode);
+ run_mode = memnew(OptionButton);
+ vbc->add_margin_child(TTR("Run Mode:"), run_mode);
run_mode->add_item(TTR("Current Scene"));
run_mode->add_item(TTR("Main Scene"));
- run_mode->connect("item_selected",this,"_run_mode_changed");
- arguments = memnew( LineEdit );
- vbc->add_margin_child(TTR("Main Scene Arguments:"),arguments);
+ run_mode->connect("item_selected", this, "_run_mode_changed");
+ arguments = memnew(LineEdit);
+ vbc->add_margin_child(TTR("Main Scene Arguments:"), arguments);
arguments->set_editable(false);
get_ok()->set_text(TTR("Close"));
@@ -93,6 +90,4 @@ RunSettingsDialog::RunSettingsDialog() {
arguments->set_text("-l $scene");
set_title(TTR("Scene Run Settings"));
-
-
}