Initialize class variables with default values in scene/ [2/2]

This commit is contained in:
Rafał Mikrut 2021-02-09 18:24:36 +01:00
parent df9c98e107
commit 7961a1dea3
171 changed files with 1007 additions and 1889 deletions

View file

@ -52,7 +52,7 @@ public:
private:
struct Item {
Ref<Texture2D> icon;
bool icon_transposed;
bool icon_transposed = false;
Rect2i icon_region;
Color icon_modulate;
Ref<Texture2D> tag_icon;
@ -62,10 +62,10 @@ private:
String language;
TextDirection text_direction = TEXT_DIRECTION_AUTO;
bool selectable;
bool selected;
bool disabled;
bool tooltip_enabled;
bool selectable = false;
bool selected = false;
bool disabled = false;
bool tooltip_enabled = false;
Variant metadata;
String tooltip;
Color custom_fg;
@ -79,44 +79,44 @@ private:
bool operator<(const Item &p_another) const { return text < p_another.text; }
};
int current;
int current = -1;
bool shape_changed;
bool shape_changed = true;
bool ensure_selected_visible;
bool same_column_width;
bool ensure_selected_visible = false;
bool same_column_width = false;
bool auto_height;
float auto_height_value;
bool auto_height = false;
float auto_height_value = 0.0;
Vector<Item> items;
Vector<int> separators;
SelectMode select_mode;
IconMode icon_mode;
SelectMode select_mode = SELECT_SINGLE;
IconMode icon_mode = ICON_MODE_LEFT;
VScrollBar *scroll_bar;
uint64_t search_time_msec;
uint64_t search_time_msec = 0;
String search_string;
int current_columns;
int fixed_column_width;
int max_text_lines;
int max_columns;
int current_columns = 1;
int fixed_column_width = 0;
int max_text_lines = 1;
int max_columns = 1;
Size2 fixed_icon_size;
Size2 max_item_size_cache;
int defer_select_single;
int defer_select_single = -1;
bool allow_rmb_select;
bool allow_rmb_select = false;
bool allow_reselect;
bool allow_reselect = false;
real_t icon_scale;
real_t icon_scale = 1.0;
bool do_autoscroll_to_bottom;
bool do_autoscroll_to_bottom = false;
Array _get_items() const;
void _set_items(const Array &p_items);