Merge pull request #32357 from YeldhamDev/connections_dialog_format
Format arguments in connections dialog in GDScript style
This commit is contained in:
commit
15a377f6e8
1 changed files with 33 additions and 35 deletions
|
@ -108,7 +108,7 @@ public:
|
|||
};
|
||||
|
||||
/*
|
||||
Signal automatically called by parent dialog.
|
||||
* Signal automatically called by parent dialog.
|
||||
*/
|
||||
void ConnectDialog::ok_pressed() {
|
||||
|
||||
|
@ -134,7 +134,7 @@ void ConnectDialog::_cancel_pressed() {
|
|||
}
|
||||
|
||||
/*
|
||||
Called each time a target node is selected within the target node tree.
|
||||
* Called each time a target node is selected within the target node tree.
|
||||
*/
|
||||
void ConnectDialog::_tree_node_selected() {
|
||||
|
||||
|
@ -148,7 +148,7 @@ void ConnectDialog::_tree_node_selected() {
|
|||
}
|
||||
|
||||
/*
|
||||
Adds a new parameter bind to connection.
|
||||
* Adds a new parameter bind to connection.
|
||||
*/
|
||||
void ConnectDialog::_add_bind() {
|
||||
|
||||
|
@ -184,7 +184,7 @@ void ConnectDialog::_add_bind() {
|
|||
}
|
||||
|
||||
/*
|
||||
Remove parameter bind from connection.
|
||||
* Remove parameter bind from connection.
|
||||
*/
|
||||
void ConnectDialog::_remove_bind() {
|
||||
|
||||
|
@ -265,7 +265,7 @@ bool ConnectDialog::get_oneshot() const {
|
|||
}
|
||||
|
||||
/*
|
||||
Returns true if ConnectDialog is being used to edit an existing connection.
|
||||
* Returns true if ConnectDialog is being used to edit an existing connection.
|
||||
*/
|
||||
bool ConnectDialog::is_editing() const {
|
||||
|
||||
|
@ -273,9 +273,9 @@ bool ConnectDialog::is_editing() const {
|
|||
}
|
||||
|
||||
/*
|
||||
Initialize ConnectDialog and populate fields with expected data.
|
||||
If creating a connection from scratch, sensible defaults are used.
|
||||
If editing an existing connection, previous data is retained.
|
||||
* Initialize ConnectDialog and populate fields with expected data.
|
||||
* If creating a connection from scratch, sensible defaults are used.
|
||||
* If editing an existing connection, previous data is retained.
|
||||
*/
|
||||
void ConnectDialog::init(Connection c, bool bEdit) {
|
||||
|
||||
|
@ -482,8 +482,8 @@ struct _ConnectionsDockMethodInfoSort {
|
|||
};
|
||||
|
||||
/*
|
||||
Post-ConnectDialog callback for creating/editing connections.
|
||||
Creates or edits connections based on state of the ConnectDialog when "Connect" is pressed.
|
||||
* Post-ConnectDialog callback for creating/editing connections.
|
||||
* Creates or edits connections based on state of the ConnectDialog when "Connect" is pressed.
|
||||
*/
|
||||
void ConnectionsDock::_make_or_edit_connection() {
|
||||
|
||||
|
@ -552,7 +552,7 @@ void ConnectionsDock::_make_or_edit_connection() {
|
|||
}
|
||||
|
||||
/*
|
||||
Creates single connection w/ undo-redo functionality.
|
||||
* Creates single connection w/ undo-redo functionality.
|
||||
*/
|
||||
void ConnectionsDock::_connect(Connection cToMake) {
|
||||
|
||||
|
@ -575,7 +575,7 @@ void ConnectionsDock::_connect(Connection cToMake) {
|
|||
}
|
||||
|
||||
/*
|
||||
Break single connection w/ undo-redo functionality.
|
||||
* Break single connection w/ undo-redo functionality.
|
||||
*/
|
||||
void ConnectionsDock::_disconnect(TreeItem &item) {
|
||||
|
||||
|
@ -595,8 +595,8 @@ void ConnectionsDock::_disconnect(TreeItem &item) {
|
|||
}
|
||||
|
||||
/*
|
||||
Break all connections of currently selected signal.
|
||||
Can undo-redo as a single action.
|
||||
* Break all connections of currently selected signal.
|
||||
* Can undo-redo as a single action.
|
||||
*/
|
||||
void ConnectionsDock::_disconnect_all() {
|
||||
|
||||
|
@ -659,7 +659,7 @@ bool ConnectionsDock::_is_item_signal(TreeItem &item) {
|
|||
}
|
||||
|
||||
/*
|
||||
Open connection dialog with TreeItem data to CREATE a brand-new connection.
|
||||
* Open connection dialog with TreeItem data to CREATE a brand-new connection.
|
||||
*/
|
||||
void ConnectionsDock::_open_connection_dialog(TreeItem &item) {
|
||||
|
||||
|
@ -700,7 +700,7 @@ void ConnectionsDock::_open_connection_dialog(TreeItem &item) {
|
|||
}
|
||||
|
||||
/*
|
||||
Open connection dialog with Connection data to EDIT an existing connection.
|
||||
* Open connection dialog with Connection data to EDIT an existing connection.
|
||||
*/
|
||||
void ConnectionsDock::_open_connection_dialog(Connection cToEdit) {
|
||||
|
||||
|
@ -715,7 +715,7 @@ void ConnectionsDock::_open_connection_dialog(Connection cToEdit) {
|
|||
}
|
||||
|
||||
/*
|
||||
Open slot method location in script editor.
|
||||
* Open slot method location in script editor.
|
||||
*/
|
||||
void ConnectionsDock::_go_to_script(TreeItem &item) {
|
||||
|
||||
|
@ -914,7 +914,6 @@ void ConnectionsDock::update_tree() {
|
|||
String signaldesc = "(";
|
||||
PoolStringArray argnames;
|
||||
if (mi.arguments.size()) {
|
||||
signaldesc += " ";
|
||||
for (int i = 0; i < mi.arguments.size(); i++) {
|
||||
|
||||
PropertyInfo &pi = mi.arguments[i];
|
||||
|
@ -927,10 +926,9 @@ void ConnectionsDock::update_tree() {
|
|||
} else if (pi.type != Variant::NIL) {
|
||||
tname = Variant::get_type_name(pi.type);
|
||||
}
|
||||
signaldesc += tname + " " + (pi.name == "" ? String("arg " + itos(i)) : pi.name);
|
||||
signaldesc += (pi.name == "" ? String("arg " + itos(i)) : pi.name) + ": " + tname;
|
||||
argnames.push_back(pi.name + ":" + tname);
|
||||
}
|
||||
signaldesc += " ";
|
||||
}
|
||||
signaldesc += ")";
|
||||
|
||||
|
|
Loading…
Reference in a new issue