Various code and documentation improvements

This commit is contained in:
kobewi 2022-03-05 21:22:38 +01:00
parent ff65d33e8c
commit bc3aff9b46
9 changed files with 20 additions and 21 deletions

View file

@ -82,7 +82,7 @@
Returns [code]true[/code] if the scene file has nodes.
</description>
</method>
<method name="get_state">
<method name="get_state" qualifiers="const">
<return type="SceneState" />
<description>
Returns the [code]SceneState[/code] representing the scene file contents.

View file

@ -114,7 +114,7 @@
True if the interaction with particle attractors is enabled.
</member>
<member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" default="0.0">
Collision bouncyness.
Collision bounciness.
</member>
<member name="collision_enabled" type="bool" setter="set_collision_enabled" getter="is_collision_enabled" default="false">
True if collisions are enabled for this particle system.

View file

@ -21,7 +21,7 @@
<return type="void" />
<argument index="0" name="time_sec" type="float" default="-1" />
<description>
Starts the timer. Sets [code]wait_time[/code] to [code]time_sec[/code] if [code]time_sec &gt; 0[/code]. This also resets the remaining time to [code]wait_time[/code].
Starts the timer. Sets [member wait_time] to [code]time_sec[/code] if [code]time_sec &gt; 0[/code]. This also resets the remaining time to [member wait_time].
[b]Note:[/b] This method will not resume a paused timer. See [member paused].
</description>
</method>

View file

@ -767,7 +767,6 @@ bool DynamicFontImportSettings::_char_update(int32_t p_char) {
selected_chars.insert(p_char);
return true;
}
label_glyphs->set_text(TTR("Preloaded glyphs: ") + itos(selected_glyphs.size()));
}
void DynamicFontImportSettings::_range_update(int32_t p_start, int32_t p_end) {

View file

@ -117,7 +117,7 @@ void PluginConfigDialog::_on_required_text_changed(const String &) {
if (name_edit->get_text().is_empty()) {
is_valid = false;
name_validation->set_texture(invalid_icon);
name_validation->set_tooltip(TTR("Plugin name cannot not be blank."));
name_validation->set_tooltip(TTR("Plugin name cannot be blank."));
}
if (script_edit->get_text().get_extension() != ext) {
is_valid = false;
@ -127,7 +127,7 @@ void PluginConfigDialog::_on_required_text_changed(const String &) {
if (script_edit->get_text().get_basename().is_empty()) {
is_valid = false;
script_validation->set_texture(invalid_icon);
script_validation->set_tooltip(TTR("Script name cannot not be blank."));
script_validation->set_tooltip(TTR("Script name cannot be blank."));
}
if (subfolder_edit->get_text().is_empty()) {
is_valid = false;

View file

@ -6920,19 +6920,19 @@ void Node3DEditor::_add_environment_to_scene(bool p_already_added_sun) {
}
void Node3DEditor::_update_theme() {
tool_button[Node3DEditor::TOOL_MODE_SELECT]->set_icon(get_theme_icon(SNAME("ToolSelect"), SNAME("EditorIcons")));
tool_button[Node3DEditor::TOOL_MODE_MOVE]->set_icon(get_theme_icon(SNAME("ToolMove"), SNAME("EditorIcons")));
tool_button[Node3DEditor::TOOL_MODE_ROTATE]->set_icon(get_theme_icon(SNAME("ToolRotate"), SNAME("EditorIcons")));
tool_button[Node3DEditor::TOOL_MODE_SCALE]->set_icon(get_theme_icon(SNAME("ToolScale"), SNAME("EditorIcons")));
tool_button[Node3DEditor::TOOL_MODE_LIST_SELECT]->set_icon(get_theme_icon(SNAME("ListSelect"), SNAME("EditorIcons")));
tool_button[Node3DEditor::TOOL_LOCK_SELECTED]->set_icon(get_theme_icon(SNAME("Lock"), SNAME("EditorIcons")));
tool_button[Node3DEditor::TOOL_UNLOCK_SELECTED]->set_icon(get_theme_icon(SNAME("Unlock"), SNAME("EditorIcons")));
tool_button[Node3DEditor::TOOL_GROUP_SELECTED]->set_icon(get_theme_icon(SNAME("Group"), SNAME("EditorIcons")));
tool_button[Node3DEditor::TOOL_UNGROUP_SELECTED]->set_icon(get_theme_icon(SNAME("Ungroup"), SNAME("EditorIcons")));
tool_button[TOOL_MODE_SELECT]->set_icon(get_theme_icon(SNAME("ToolSelect"), SNAME("EditorIcons")));
tool_button[TOOL_MODE_MOVE]->set_icon(get_theme_icon(SNAME("ToolMove"), SNAME("EditorIcons")));
tool_button[TOOL_MODE_ROTATE]->set_icon(get_theme_icon(SNAME("ToolRotate"), SNAME("EditorIcons")));
tool_button[TOOL_MODE_SCALE]->set_icon(get_theme_icon(SNAME("ToolScale"), SNAME("EditorIcons")));
tool_button[TOOL_MODE_LIST_SELECT]->set_icon(get_theme_icon(SNAME("ListSelect"), SNAME("EditorIcons")));
tool_button[TOOL_LOCK_SELECTED]->set_icon(get_theme_icon(SNAME("Lock"), SNAME("EditorIcons")));
tool_button[TOOL_UNLOCK_SELECTED]->set_icon(get_theme_icon(SNAME("Unlock"), SNAME("EditorIcons")));
tool_button[TOOL_GROUP_SELECTED]->set_icon(get_theme_icon(SNAME("Group"), SNAME("EditorIcons")));
tool_button[TOOL_UNGROUP_SELECTED]->set_icon(get_theme_icon(SNAME("Ungroup"), SNAME("EditorIcons")));
tool_option_button[Node3DEditor::TOOL_OPT_LOCAL_COORDS]->set_icon(get_theme_icon(SNAME("Object"), SNAME("EditorIcons")));
tool_option_button[Node3DEditor::TOOL_OPT_USE_SNAP]->set_icon(get_theme_icon(SNAME("Snap"), SNAME("EditorIcons")));
tool_option_button[Node3DEditor::TOOL_OPT_OVERRIDE_CAMERA]->set_icon(get_theme_icon(SNAME("Camera3D"), SNAME("EditorIcons")));
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_icon(get_theme_icon(SNAME("Object"), SNAME("EditorIcons")));
tool_option_button[TOOL_OPT_USE_SNAP]->set_icon(get_theme_icon(SNAME("Snap"), SNAME("EditorIcons")));
tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->set_icon(get_theme_icon(SNAME("Camera3D"), SNAME("EditorIcons")));
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), get_theme_icon(SNAME("Panels1"), SNAME("EditorIcons")));
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), get_theme_icon(SNAME("Panels2"), SNAME("EditorIcons")));

View file

@ -486,7 +486,7 @@ bool SceneTree::process(double p_time) {
}
E->get()->set_time_left(time_left);
if (time_left < 0) {
if (time_left <= 0) {
E->get()->emit_signal(SNAME("timeout"));
timers.erase(E);
}

View file

@ -1653,7 +1653,7 @@ void PackedScene::recreate_state() {
#endif
}
Ref<SceneState> PackedScene::get_state() {
Ref<SceneState> PackedScene::get_state() const {
return state;
}

View file

@ -228,7 +228,7 @@ public:
virtual void set_last_modified_time(uint64_t p_time) override { state->set_last_modified_time(p_time); }
#endif
Ref<SceneState> get_state();
Ref<SceneState> get_state() const;
PackedScene();
};