diff options
-rwxr-xr-x | doc/tools/doc_status.py | 32 | ||||
-rw-r--r-- | editor/editor_settings.cpp | 6 | ||||
-rw-r--r-- | scene/gui/menu_button.cpp | 2 | ||||
-rw-r--r-- | scene/gui/popup_menu.cpp | 10 |
4 files changed, 37 insertions, 13 deletions
diff --git a/doc/tools/doc_status.py b/doc/tools/doc_status.py index 629b5a032b..cc0733cab2 100755 --- a/doc/tools/doc_status.py +++ b/doc/tools/doc_status.py @@ -66,10 +66,23 @@ table_columns = [ "methods", "constants", "members", - "signals", "theme_items", + "signals", + "operators", + "constructors", +] +table_column_names = [ + "Name", + "Brief Desc.", + "Desc.", + "Methods", + "Constants", + "Members", + "Theme Items", + "Signals", + "Operators", + "Constructors", ] -table_column_names = ["Name", "Brief Desc.", "Desc.", "Methods", "Constants", "Members", "Signals", "Theme Items"] colors = { "name": [36], # cyan "part_big_problem": [4, 31], # underline, red @@ -82,7 +95,7 @@ colors = { "state_on": [1, 35], # bold, magenta/plum "bold": [1], # bold } -overall_progress_description_weigth = 10 +overall_progress_description_weight = 10 ################################################################################ @@ -180,6 +193,8 @@ class ClassStatus: "members": ClassStatusProgress(), "theme_items": ClassStatusProgress(), "signals": ClassStatusProgress(), + "operators": ClassStatusProgress(), + "constructors": ClassStatusProgress(), } def __add__(self, other): @@ -218,12 +233,12 @@ class ClassStatus: output["description"] = ok_string if self.has_description else missing_string description_progress = ClassStatusProgress( - (self.has_brief_description + self.has_description) * overall_progress_description_weigth, - 2 * overall_progress_description_weigth, + (self.has_brief_description + self.has_description) * overall_progress_description_weight, + 2 * overall_progress_description_weight, ) items_progress = ClassStatusProgress() - for k in ["methods", "constants", "members", "signals", "theme_items"]: + for k in ["methods", "constants", "members", "theme_items", "signals", "constructors", "operators"]: items_progress += self.progresses[k] output[k] = self.progresses[k].to_configured_colored_string() @@ -260,7 +275,7 @@ class ClassStatus: elif tag.tag == "description": status.has_description = len(tag.text.strip()) > 0 - elif tag.tag in ["methods", "signals"]: + elif tag.tag in ["methods", "signals", "operators", "constructors"]: for sub_tag in list(tag): descr = sub_tag.find("description") status.progresses[tag.tag].increment(len(descr.text.strip()) > 0) @@ -272,9 +287,6 @@ class ClassStatus: elif tag.tag in ["tutorials"]: pass # Ignore those tags for now - elif tag.tag in ["theme_items"]: - pass # Ignore those tags, since they seem to lack description at all - else: print(tag.tag, tag.attrib) diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 02c78eb2a8..bb0a2ed7c1 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -431,7 +431,11 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _initial_set("interface/editor/hide_console_window", false); _initial_set("interface/editor/mouse_extra_buttons_navigate_history", true); _initial_set("interface/editor/save_each_scene_on_quit", true); // Regression - EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/show_internal_errors_in_toast_notifications", 0, "Auto,Enabled,Disabled") +#ifdef DEV_ENABLED + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/show_internal_errors_in_toast_notifications", 0, "Auto (Enabled),Enabled,Disabled") +#else + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/show_internal_errors_in_toast_notifications", 0, "Auto (Disabled),Enabled,Disabled") +#endif // Inspector EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "interface/inspector/max_array_dictionary_items_per_page", 20, "10,100,1") diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index 5420f9c5a5..f7805136f9 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -184,7 +184,7 @@ void MenuButton::_get_property_list(List<PropertyInfo> *p_list) const { pi.usage &= ~(!popup->is_item_checked(i) ? PROPERTY_USAGE_STORAGE : 0); p_list->push_back(pi); - pi = PropertyInfo(Variant::INT, vformat("popup/item_%d/id", i), PROPERTY_HINT_RANGE, "1,10,1,or_greater"); + pi = PropertyInfo(Variant::INT, vformat("popup/item_%d/id", i), PROPERTY_HINT_RANGE, "0,10,1,or_greater"); p_list->push_back(pi); pi = PropertyInfo(Variant::BOOL, vformat("popup/item_%d/disabled", i)); diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index e47b7280b9..f4d45fe1fa 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -1275,7 +1275,15 @@ int PopupMenu::get_current_index() const { void PopupMenu::set_item_count(int p_count) { ERR_FAIL_COND(p_count < 0); + int prev_size = items.size(); items.resize(p_count); + + if (prev_size < p_count) { + for (int i = prev_size; i < p_count; i++) { + items.write[i].id = i; + } + } + control->update(); child_controls_changed(); notify_property_list_changed(); @@ -1658,7 +1666,7 @@ void PopupMenu::_get_property_list(List<PropertyInfo> *p_list) const { pi.usage &= ~(!is_item_checked(i) ? PROPERTY_USAGE_STORAGE : 0); p_list->push_back(pi); - pi = PropertyInfo(Variant::INT, vformat("item_%d/id", i), PROPERTY_HINT_RANGE, "1,10,1,or_greater"); + pi = PropertyInfo(Variant::INT, vformat("item_%d/id", i), PROPERTY_HINT_RANGE, "0,10,1,or_greater"); p_list->push_back(pi); pi = PropertyInfo(Variant::BOOL, vformat("item_%d/disabled", i)); |