mirror of
https://github.com/godotengine/godot.git
synced 2025-02-08 11:50:41 +00:00
Merge pull request #60798 from Calinou/doc-os-cmdline-args
This commit is contained in:
commit
958254ec3e
@ -175,6 +175,10 @@
|
|||||||
if argument.find("=") > -1:
|
if argument.find("=") > -1:
|
||||||
var key_value = argument.split("=")
|
var key_value = argument.split("=")
|
||||||
arguments[key_value[0].lstrip("--")] = key_value[1]
|
arguments[key_value[0].lstrip("--")] = key_value[1]
|
||||||
|
else:
|
||||||
|
# Options without an argument will be present in the dictionary,
|
||||||
|
# with the value set to an empty string.
|
||||||
|
arguments[argument.lstrip("--")] = ""
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var arguments = new Godot.Collections.Dictionary();
|
var arguments = new Godot.Collections.Dictionary();
|
||||||
@ -185,6 +189,12 @@
|
|||||||
string[] keyValue = argument.Split("=");
|
string[] keyValue = argument.Split("=");
|
||||||
arguments[keyValue[0].LStrip("--")] = keyValue[1];
|
arguments[keyValue[0].LStrip("--")] = keyValue[1];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Options without an argument will be present in the dictionary,
|
||||||
|
// with the value set to an empty string.
|
||||||
|
arguments[keyValue[0].LStrip("--")] = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
[/csharp]
|
[/csharp]
|
||||||
[/codeblocks]
|
[/codeblocks]
|
||||||
|
Loading…
Reference in New Issue
Block a user