diff options
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/base_button.cpp | 4 | ||||
-rw-r--r-- | scene/gui/color_picker.cpp | 4 | ||||
-rw-r--r-- | scene/gui/control.cpp | 21 | ||||
-rw-r--r-- | scene/gui/file_dialog.cpp | 15 | ||||
-rw-r--r-- | scene/gui/graph_edit.cpp | 6 | ||||
-rw-r--r-- | scene/gui/graph_node.cpp | 4 | ||||
-rw-r--r-- | scene/gui/item_list.cpp | 3 | ||||
-rw-r--r-- | scene/gui/label.cpp | 3 | ||||
-rw-r--r-- | scene/gui/line_edit.cpp | 7 | ||||
-rw-r--r-- | scene/gui/menu_button.cpp | 2 | ||||
-rw-r--r-- | scene/gui/option_button.cpp | 2 | ||||
-rw-r--r-- | scene/gui/popup_menu.cpp | 15 | ||||
-rw-r--r-- | scene/gui/range.cpp | 1 | ||||
-rw-r--r-- | scene/gui/rich_text_label.cpp | 9 | ||||
-rw-r--r-- | scene/gui/scroll_bar.cpp | 8 | ||||
-rw-r--r-- | scene/gui/scroll_container.cpp | 6 | ||||
-rw-r--r-- | scene/gui/tabs.cpp | 1 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 88 | ||||
-rw-r--r-- | scene/gui/text_edit.h | 7 | ||||
-rw-r--r-- | scene/gui/tree.cpp | 24 | ||||
-rw-r--r-- | scene/gui/tree.h | 2 | ||||
-rw-r--r-- | scene/gui/video_player.cpp | 12 | ||||
-rw-r--r-- | scene/gui/video_player.h | 2 |
23 files changed, 190 insertions, 56 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index d765248cca..8b9469021c 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -504,12 +504,12 @@ void BaseButton::_bind_methods() { ClassDB::bind_method(D_METHOD("get_button_group"), &BaseButton::get_button_group); BIND_VMETHOD(MethodInfo("_pressed")); - BIND_VMETHOD(MethodInfo("_toggled", PropertyInfo(Variant::BOOL, "pressed"))); + BIND_VMETHOD(MethodInfo("_toggled", PropertyInfo(Variant::BOOL, "button_pressed"))); ADD_SIGNAL(MethodInfo("pressed")); ADD_SIGNAL(MethodInfo("button_up")); ADD_SIGNAL(MethodInfo("button_down")); - ADD_SIGNAL(MethodInfo("toggled", PropertyInfo(Variant::BOOL, "pressed"))); + ADD_SIGNAL(MethodInfo("toggled", PropertyInfo(Variant::BOOL, "button_pressed"))); ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "toggle_mode"), "set_toggle_mode", "is_toggle_mode"); ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed"); diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 08a39e9e79..30bcc48149 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -484,6 +484,10 @@ void ColorPicker::_bind_methods() { ClassDB::bind_method(D_METHOD("_preset_input"), &ColorPicker::_preset_input); ClassDB::bind_method(D_METHOD("_screen_input"), &ColorPicker::_screen_input); + ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_pick_color", "get_pick_color"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "edit_alpha"), "set_edit_alpha", "is_editing_alpha"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "raw_mode"), "set_raw_mode", "is_raw_mode"); + ADD_SIGNAL(MethodInfo("color_changed", PropertyInfo(Variant::COLOR, "color"))); } diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 979a65f455..d4ed0db6ea 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -1357,24 +1357,32 @@ float Control::_a2s(float p_val, float p_anchor, float p_range) const { } void Control::set_anchor(Margin p_margin, float p_anchor, bool p_keep_margin, bool p_push_opposite_anchor) { - bool pushed = false; + float parent_range = _get_parent_range((p_margin == MARGIN_LEFT || p_margin == MARGIN_RIGHT) ? 0 : 1); + float previous_margin_pos = data.margin[p_margin] + data.anchor[p_margin] * parent_range; + float previous_opposite_margin_pos = data.margin[(p_margin + 2) % 4] + data.anchor[(p_margin + 2) % 4] * parent_range; + data.anchor[p_margin] = CLAMP(p_anchor, 0.0, 1.0); if (((p_margin == MARGIN_LEFT || p_margin == MARGIN_TOP) && data.anchor[p_margin] > data.anchor[(p_margin + 2) % 4]) || ((p_margin == MARGIN_RIGHT || p_margin == MARGIN_BOTTOM) && data.anchor[p_margin] < data.anchor[(p_margin + 2) % 4])) { if (p_push_opposite_anchor) { data.anchor[(p_margin + 2) % 4] = data.anchor[p_margin]; - pushed = true; } else { data.anchor[p_margin] = data.anchor[(p_margin + 2) % 4]; } } - if (is_inside_tree()) { - if (p_keep_margin) { - _size_changed(); + if (!p_keep_margin) { + data.margin[p_margin] = _s2a(previous_margin_pos, data.anchor[p_margin], parent_range); + if (p_push_opposite_anchor) { + data.margin[(p_margin + 2) % 4] = _s2a(previous_opposite_margin_pos, data.anchor[(p_margin + 2) % 4], parent_range); } } + + if (is_inside_tree()) { + _size_changed(); + } + update(); _change_notify(); } @@ -2832,6 +2840,7 @@ void Control::_bind_methods() { ADD_GROUP("Rect", "rect_"); ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2, "rect_position", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_position", "get_position"); + ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2, "rect_global_position", PROPERTY_HINT_NONE, "", 0), "set_global_position", "get_global_position"); ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2, "rect_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_size", "get_size"); ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2, "rect_min_size"), "set_custom_minimum_size", "get_custom_minimum_size"); ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "rect_rotation", PROPERTY_HINT_RANGE, "-1080,1080,0.01"), "set_rotation_degrees", "get_rotation_degrees"); @@ -2849,9 +2858,11 @@ void Control::_bind_methods() { ADD_PROPERTYINZ(PropertyInfo(Variant::NODE_PATH, "focus_neighbour_bottom"), "set_focus_neighbour", "get_focus_neighbour", MARGIN_BOTTOM); ADD_PROPERTYNZ(PropertyInfo(Variant::NODE_PATH, "focus_next"), "set_focus_next", "get_focus_next"); ADD_PROPERTYNZ(PropertyInfo(Variant::NODE_PATH, "focus_previous"), "set_focus_previous", "get_focus_previous"); + ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "focus_mode", PROPERTY_HINT_ENUM, "None,Click,All"), "set_focus_mode", "get_focus_mode"); ADD_GROUP("Mouse", "mouse_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "mouse_filter", PROPERTY_HINT_ENUM, "Stop,Pass,Ignore"), "set_mouse_filter", "get_mouse_filter"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "mouse_default_cursor_shape", PROPERTY_HINT_ENUM, "Arrow,Ibeam,Pointing hand,Cross,Wait,Busy,Drag,Can drop,Forbidden,Vertical resize,Horizontal resize,Secondary diagonal resize,Main diagonal resize,Move,Vertial split,Horizontal split,Help"), "set_default_cursor_shape", "get_default_cursor_shape"); ADD_GROUP("Size Flags", "size_flags_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "size_flags_horizontal", PROPERTY_HINT_FLAGS, "Fill,Expand,Shrink Center,Shrink End"), "set_h_size_flags", "get_h_size_flags"); diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index c4b2685012..58717edbae 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -793,6 +793,15 @@ void FileDialog::_bind_methods() { ClassDB::bind_method(D_METHOD("invalidate"), &FileDialog::invalidate); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "mode_overrides_title"), "set_mode_overrides_title", "is_mode_overriding_title"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Open one,Open many,Open folder,Open any,Save"), "set_mode", "get_mode"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "access", PROPERTY_HINT_ENUM, "Resources,User data,File system"), "set_access", "get_access"); + ADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, "filters"), "set_filters", "get_filters"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_hidden_files"), "set_show_hidden_files", "is_showing_hidden_files"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_dir"), "set_current_dir", "get_current_dir"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_file"), "set_current_file", "get_current_file"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_path"), "set_current_path", "get_current_path"); + ADD_SIGNAL(MethodInfo("file_selected", PropertyInfo(Variant::STRING, "path"))); ADD_SIGNAL(MethodInfo("files_selected", PropertyInfo(Variant::POOL_STRING_ARRAY, "paths"))); ADD_SIGNAL(MethodInfo("dir_selected", PropertyInfo(Variant::STRING, "dir"))); @@ -806,12 +815,6 @@ void FileDialog::_bind_methods() { BIND_ENUM_CONSTANT(ACCESS_RESOURCES); BIND_ENUM_CONSTANT(ACCESS_USERDATA); BIND_ENUM_CONSTANT(ACCESS_FILESYSTEM); - - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "mode_overrides_title"), "set_mode_overrides_title", "is_mode_overriding_title"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Open one,Open many,Open folder,Open any,Save"), "set_mode", "get_mode"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "access", PROPERTY_HINT_ENUM, "Resources,User data,File system"), "set_access", "get_access"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, "filters"), "set_filters", "get_filters"); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_hidden_files"), "set_show_hidden_files", "is_showing_hidden_files"); } void FileDialog::set_show_hidden_files(bool p_show) { diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index b8451d2f10..1b5014367b 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -1180,6 +1180,12 @@ void GraphEdit::_bind_methods() { ClassDB::bind_method(D_METHOD("set_selected", "node"), &GraphEdit::set_selected); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "right_disconnects"), "set_right_disconnects", "is_right_disconnects_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scroll_offset"), "set_scroll_ofs", "get_scroll_ofs"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "snap_distance"), "set_snap", "get_snap"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_snap"), "set_use_snap", "is_using_snap"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "zoom"), "set_zoom", "get_zoom"); + ADD_SIGNAL(MethodInfo("connection_request", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING, "to"), PropertyInfo(Variant::INT, "to_slot"))); ADD_SIGNAL(MethodInfo("disconnection_request", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING, "to"), PropertyInfo(Variant::INT, "to_slot"))); ADD_SIGNAL(MethodInfo("popup_request", PropertyInfo(Variant::VECTOR2, "p_position"))); diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index c5d5da1219..24857d49fa 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -705,8 +705,12 @@ void GraphNode::_bind_methods() { ClassDB::bind_method(D_METHOD("get_overlay"), &GraphNode::get_overlay); ADD_PROPERTY(PropertyInfo(Variant::STRING, "title"), "set_title", "get_title"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_close"), "set_show_close_button", "is_close_button_visible"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "resizable"), "set_resizable", "is_resizable"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "selected"), "set_selected", "is_selected"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "comment"), "set_comment", "is_comment"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "overlay", PROPERTY_HINT_ENUM, "Disabled,Breakpoint,Position"), "set_overlay", "get_overlay"); ADD_SIGNAL(MethodInfo("offset_changed")); ADD_SIGNAL(MethodInfo("dragged", PropertyInfo(Variant::VECTOR2, "from"), PropertyInfo(Variant::VECTOR2, "to"))); diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 3b3d7164b6..77d3a34c66 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -1419,7 +1419,7 @@ void ItemList::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_items"), &ItemList::_set_items); ClassDB::bind_method(D_METHOD("_get_items"), &ItemList::_get_items); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_items", "_get_items"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_items", "_get_items"); ADD_PROPERTY(PropertyInfo(Variant::INT, "select_mode", PROPERTY_HINT_ENUM, "Single,Multi"), "set_select_mode", "get_select_mode"); ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "allow_rmb_select"), "set_allow_rmb_select", "get_allow_rmb_select"); @@ -1432,6 +1432,7 @@ void ItemList::_bind_methods() { ADD_GROUP("Icon", ""); ADD_PROPERTY(PropertyInfo(Variant::INT, "icon_mode", PROPERTY_HINT_ENUM, "Top,Left"), "set_icon_mode", "get_icon_mode"); ADD_PROPERTYNO(PropertyInfo(Variant::REAL, "icon_scale"), "set_icon_scale", "get_icon_scale"); + ADD_PROPERTYNO(PropertyInfo(Variant::REAL, "fixed_icon_size"), "set_fixed_icon_size", "get_fixed_icon_size"); BIND_ENUM_CONSTANT(ICON_MODE_TOP); BIND_ENUM_CONSTANT(ICON_MODE_LEFT); diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index 0a1d42c5e1..830f724b3c 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -564,6 +564,7 @@ void Label::set_visible_characters(int p_amount) { if (get_total_character_count() > 0) { percent_visible = (float)p_amount / (float)total_char_cache; } + _change_notify("percent_visible"); update(); } @@ -584,6 +585,7 @@ void Label::set_percent_visible(float p_percent) { visible_chars = get_total_character_count() * p_percent; percent_visible = p_percent; } + _change_notify("visible_chars"); update(); } @@ -665,6 +667,7 @@ void Label::_bind_methods() { ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "autowrap"), "set_autowrap", "has_autowrap"); ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "clip_text"), "set_clip_text", "is_clipping_text"); ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "uppercase"), "set_uppercase", "is_uppercase"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "visible_characters", PROPERTY_HINT_RANGE, "-1,128000,1", PROPERTY_USAGE_EDITOR), "set_visible_characters", "get_visible_characters"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible"); ADD_PROPERTY(PropertyInfo(Variant::INT, "lines_skipped", PROPERTY_HINT_RANGE, "0,999,1"), "set_lines_skipped", "get_lines_skipped"); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_lines_visible", PROPERTY_HINT_RANGE, "-1,999,1"), "set_max_lines_visible", "get_max_lines_visible"); diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 53f609723f..524a68a116 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -1413,8 +1413,8 @@ void LineEdit::_bind_methods() { ClassDB::bind_method(D_METHOD("set_context_menu_enabled", "enable"), &LineEdit::set_context_menu_enabled); ClassDB::bind_method(D_METHOD("is_context_menu_enabled"), &LineEdit::is_context_menu_enabled); - ADD_SIGNAL(MethodInfo("text_changed", PropertyInfo(Variant::STRING, "text"))); - ADD_SIGNAL(MethodInfo("text_entered", PropertyInfo(Variant::STRING, "text"))); + ADD_SIGNAL(MethodInfo("text_changed", PropertyInfo(Variant::STRING, "new_text"))); + ADD_SIGNAL(MethodInfo("text_entered", PropertyInfo(Variant::STRING, "new_text"))); BIND_ENUM_CONSTANT(ALIGN_LEFT); BIND_ENUM_CONSTANT(ALIGN_CENTER); @@ -1437,13 +1437,14 @@ void LineEdit::_bind_methods() { ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "secret"), "set_secret", "is_secret"); ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "expand_to_text_length"), "set_expand_to_text_length", "get_expand_to_text_length"); ADD_PROPERTY(PropertyInfo(Variant::INT, "focus_mode", PROPERTY_HINT_ENUM, "None,Click,All"), "set_focus_mode", "get_focus_mode"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "context_menu_enabled"), "set_context_menu_enabled", "is_context_menu_enabled"); ADD_GROUP("Placeholder", "placeholder_"); ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "placeholder_text"), "set_placeholder", "get_placeholder"); ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "placeholder_alpha", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_placeholder_alpha", "get_placeholder_alpha"); ADD_GROUP("Caret", "caret_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_blink"), "cursor_set_blink_enabled", "cursor_get_blink_enabled"); ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "caret_blink_speed", PROPERTY_HINT_RANGE, "0.1,10,0.1"), "cursor_set_blink_speed", "cursor_get_blink_speed"); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "context_menu_enabled"), "set_context_menu_enabled", "is_context_menu_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "caret_position"), "set_cursor_position", "get_cursor_position"); } LineEdit::LineEdit() { diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index d25bd00f37..2e74faa61d 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -89,7 +89,7 @@ void MenuButton::_bind_methods() { ClassDB::bind_method(D_METHOD("_get_items"), &MenuButton::_get_items); ClassDB::bind_method(D_METHOD("set_disable_shortcuts", "disabled"), &MenuButton::set_disable_shortcuts); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_items", "_get_items"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_items", "_get_items"); ADD_SIGNAL(MethodInfo("about_to_show")); } diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp index ba35e6cd19..1a46921561 100644 --- a/scene/gui/option_button.cpp +++ b/scene/gui/option_button.cpp @@ -319,7 +319,7 @@ void OptionButton::_bind_methods() { ClassDB::bind_method(D_METHOD("_get_items"), &OptionButton::_get_items); ADD_PROPERTY(PropertyInfo(Variant::INT, "selected"), "_select_int", "get_selected"); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_items", "_get_items"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_items", "_get_items"); ADD_SIGNAL(MethodInfo("item_selected", PropertyInfo(Variant::INT, "ID"))); } diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index d7987d4a19..89000fcde1 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -305,11 +305,15 @@ void PopupMenu::_gui_input(const Ref<InputEvent> &p_event) { case BUTTON_WHEEL_DOWN: { - _scroll(-b->get_factor(), b->get_position()); + if (get_global_position().y + get_size().y > get_viewport_rect().size.y) { + _scroll(-b->get_factor(), b->get_position()); + } } break; case BUTTON_WHEEL_UP: { - _scroll(b->get_factor(), b->get_position()); + if (get_global_position().y < 0) { + _scroll(b->get_factor(), b->get_position()); + } } break; case BUTTON_LEFT: { @@ -380,7 +384,9 @@ void PopupMenu::_gui_input(const Ref<InputEvent> &p_event) { Ref<InputEventPanGesture> pan_gesture = p_event; if (pan_gesture.is_valid()) { - _scroll(-pan_gesture->get_delta().y, pan_gesture->get_position()); + if (get_global_position().y + get_size().y > get_viewport_rect().size.y || get_global_position().y < 0) { + _scroll(-pan_gesture->get_delta().y, pan_gesture->get_position()); + } } } @@ -1217,9 +1223,10 @@ void PopupMenu::_bind_methods() { ClassDB::bind_method(D_METHOD("_submenu_timeout"), &PopupMenu::_submenu_timeout); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_items", "_get_items"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_items", "_get_items"); ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "hide_on_item_selection"), "set_hide_on_item_selection", "is_hide_on_item_selection"); ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "hide_on_checkable_item_selection"), "set_hide_on_checkable_item_selection", "is_hide_on_checkable_item_selection"); + ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "hide_on_state_item_selection"), "set_hide_on_state_item_selection", "is_hide_on_state_item_selection"); ADD_SIGNAL(MethodInfo("id_pressed", PropertyInfo(Variant::INT, "ID"))); ADD_SIGNAL(MethodInfo("index_pressed", PropertyInfo(Variant::INT, "index"))); diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index a74a577898..cd6c6bb65c 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -248,6 +248,7 @@ void Range::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "step"), "set_step", "get_step"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "page"), "set_page", "get_page"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "value"), "set_value", "get_value"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "ratio", PROPERTY_HINT_RANGE, "0,1,0.01", 0), "set_as_ratio", "get_as_ratio"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "exp_edit"), "set_exp_ratio", "is_ratio_exp"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rounded"), "set_use_rounded_values", "is_using_rounded_values"); } diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 49618d0138..a7419519ae 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -2045,6 +2045,15 @@ void RichTextLabel::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "visible_characters", PROPERTY_HINT_RANGE, "-1,128000,1"), "set_visible_characters", "get_visible_characters"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible"); + + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "meta_underlined"), "set_meta_underline", "is_meta_underlined"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "tab_size", PROPERTY_HINT_RANGE, "0,24,1"), "set_tab_size", "get_tab_size"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "text"), "set_text", "get_text"); + + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scroll_active"), "set_scroll_active", "is_scroll_active"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scroll_following"), "set_scroll_follow", "is_scroll_following"); + + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "selection_enabled"), "set_selection_enabled", "is_selection_enabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "override_selected_font_color"), "set_override_selected_font_color", "is_overriding_selected_font_color"); ADD_SIGNAL(MethodInfo("meta_clicked", PropertyInfo(Variant::NIL, "meta", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT))); diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index d54500bc51..95fcda2db3 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -323,14 +323,14 @@ void ScrollBar::_notification(int p_what) { if (drag_slave) { drag_slave->connect("gui_input", this, "_drag_slave_input"); - drag_slave->connect("tree_exited", this, "_drag_slave_exit", varray(), CONNECT_ONESHOT); + drag_slave->connect("tree_exiting", this, "_drag_slave_exit", varray(), CONNECT_ONESHOT); } } if (p_what == NOTIFICATION_EXIT_TREE) { if (drag_slave) { drag_slave->disconnect("gui_input", this, "_drag_slave_input"); - drag_slave->disconnect("tree_exited", this, "_drag_slave_exit"); + drag_slave->disconnect("tree_exiting", this, "_drag_slave_exit"); } drag_slave = NULL; @@ -655,7 +655,7 @@ void ScrollBar::set_drag_slave(const NodePath &p_path) { if (drag_slave) { drag_slave->disconnect("gui_input", this, "_drag_slave_input"); - drag_slave->disconnect("tree_exited", this, "_drag_slave_exit"); + drag_slave->disconnect("tree_exiting", this, "_drag_slave_exit"); } } @@ -671,7 +671,7 @@ void ScrollBar::set_drag_slave(const NodePath &p_path) { if (drag_slave) { drag_slave->connect("gui_input", this, "_drag_slave_input"); - drag_slave->connect("tree_exited", this, "_drag_slave_exit", varray(), CONNECT_ONESHOT); + drag_slave->connect("tree_exiting", this, "_drag_slave_exit", varray(), CONNECT_ONESHOT); } } } diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index 1e324a303e..413edca218 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -468,8 +468,10 @@ void ScrollContainer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_v_scroll"), &ScrollContainer::get_v_scroll); ADD_GROUP("Scroll", "scroll_"); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scroll_horizontal"), "set_enable_h_scroll", "is_h_scroll_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scroll_vertical"), "set_enable_v_scroll", "is_v_scroll_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scroll_horizontal_enabled"), "set_enable_h_scroll", "is_h_scroll_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "scroll_horizontal"), "set_h_scroll", "get_h_scroll"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scroll_vertical_enabled"), "set_enable_v_scroll", "is_v_scroll_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "scroll_vertical"), "set_v_scroll", "get_v_scroll"); }; ScrollContainer::ScrollContainer() { diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp index ba808566e1..f0e89877cd 100644 --- a/scene/gui/tabs.cpp +++ b/scene/gui/tabs.cpp @@ -851,6 +851,7 @@ void Tabs::_bind_methods() { ADD_SIGNAL(MethodInfo("tab_clicked", PropertyInfo(Variant::INT, "tab"))); ADD_PROPERTY(PropertyInfo(Variant::INT, "current_tab", PROPERTY_HINT_RANGE, "-1,4096,1", PROPERTY_USAGE_EDITOR), "set_current_tab", "get_current_tab"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "tab_align", PROPERTY_HINT_ENUM, "Left,Center,Right"), "set_tab_align", "get_tab_align"); ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "tab_close_display_policy", PROPERTY_HINT_ENUM, "Show Never,Show Active Only,Show Always"), "set_tab_close_display_policy", "get_tab_close_display_policy"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scrolling_enabled"), "set_scrolling_enabled", "get_scrolling_enabled"); diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index a3f59b54fc..d673f21077 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -883,7 +883,7 @@ void TextEdit::_notification(int p_what) { } // give visual indication of empty selected line - if (selection.active && line >= selection.from_line && line <= selection.to_line) { + if (selection.active && line >= selection.from_line && line <= selection.to_line && char_margin >= xmargin_beg) { int char_w = cache.font->get_char_size(' ').width; VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg + ofs_x, ofs_y, char_w, get_row_height()), cache.selection_color); } @@ -1025,6 +1025,21 @@ void TextEdit::_notification(int p_what) { const Color *col = keywords.custom_getptr(range, hash); + if (!col) { + col = member_keywords.custom_getptr(range, hash); + + if (col) { + for (int k = j - 1; k >= 0; k--) { + if (str[k] == '.') { + col = NULL; //member indexing not allowed + break; + } else if (str[k] > 32) { + break; + } + } + } + } + if (col) { in_keyword = true; @@ -4047,11 +4062,21 @@ void TextEdit::set_wrap(bool p_wrap) { wrap = p_wrap; } +bool TextEdit::is_wrapping() const { + + return wrap; +} + void TextEdit::set_max_chars(int p_max_chars) { max_chars = p_max_chars; } +int TextEdit::get_max_chars() const { + + return max_chars; +} + void TextEdit::_reset_caret_blink_timer() { if (caret_blink_enabled) { caret_blink_timer->stop(); @@ -4128,6 +4153,16 @@ void TextEdit::add_color_region(const String &p_begin_key, const String &p_end_k update(); } +void TextEdit::add_member_keyword(const String &p_keyword, const Color &p_color) { + member_keywords[p_keyword] = p_color; + update(); +} + +void TextEdit::clear_member_keywords() { + member_keywords.clear(); + update(); +} + void TextEdit::set_syntax_coloring(bool p_enabled) { syntax_coloring = p_enabled; @@ -4467,31 +4502,44 @@ bool TextEdit::search(const String &p_key, uint32_t p_search_flags, int p_from_l int pos_from = 0; int last_pos = -1; - while ((last_pos = (p_search_flags & SEARCH_MATCH_CASE) ? text_line.find(p_key, pos_from) : text_line.findn(p_key, pos_from)) != -1) { - if (p_search_flags & SEARCH_BACKWARDS) { + while (true) { - if (last_pos > from_column) - break; - pos = last_pos; + while ((last_pos = (p_search_flags & SEARCH_MATCH_CASE) ? text_line.find(p_key, pos_from) : text_line.findn(p_key, pos_from)) != -1) { - } else { + if (p_search_flags & SEARCH_BACKWARDS) { - if (last_pos >= from_column) { + if (last_pos > from_column) + break; pos = last_pos; - break; + + } else { + + if (last_pos >= from_column) { + pos = last_pos; + break; + } } + + pos_from = last_pos + p_key.length(); } - pos_from = last_pos + p_key.length(); - } + bool is_match = true; + + if (pos != -1 && (p_search_flags & SEARCH_WHOLE_WORDS)) { + //validate for whole words + if (pos > 0 && _is_text_char(text_line[pos - 1])) + is_match = false; + else if (pos + p_key.length() < text_line.length() && _is_text_char(text_line[pos + p_key.length()])) + is_match = false; + } + + if (is_match || last_pos == -1 || pos == -1) { + break; + } - if (pos != -1 && (p_search_flags & SEARCH_WHOLE_WORDS)) { - //validate for whole words - if (pos > 0 && _is_text_char(text_line[pos - 1])) - pos = -1; - else if (_is_text_char(text_line[pos + p_key.length()])) - pos = -1; + pos_from = pos + 1; + pos = -1; } if (pos != -1) @@ -5530,7 +5578,9 @@ void TextEdit::_bind_methods() { ClassDB::bind_method(D_METHOD("is_readonly"), &TextEdit::is_readonly); ClassDB::bind_method(D_METHOD("set_wrap", "enable"), &TextEdit::set_wrap); - ClassDB::bind_method(D_METHOD("set_max_chars", "amount"), &TextEdit::set_max_chars); + ClassDB::bind_method(D_METHOD("is_wrapping"), &TextEdit::is_wrapping); + // ClassDB::bind_method(D_METHOD("set_max_chars", "amount"), &TextEdit::set_max_chars); + // ClassDB::bind_method(D_METHOD("get_max_char"), &TextEdit::get_max_chars); ClassDB::bind_method(D_METHOD("set_context_menu_enabled", "enable"), &TextEdit::set_context_menu_enabled); ClassDB::bind_method(D_METHOD("is_context_menu_enabled"), &TextEdit::is_context_menu_enabled); @@ -5604,6 +5654,8 @@ void TextEdit::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_scrolling"), "set_smooth_scroll_enable", "is_smooth_scroll_enabled"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "v_scroll_speed"), "set_v_scroll_speed", "get_v_scroll_speed"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hiding_enabled"), "set_hiding_enabled", "is_hiding_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "wrap_lines"), "set_wrap", "is_wrapping"); + // ADD_PROPERTY(PropertyInfo(Variant::BOOL, "max_chars"), "set_max_chars", "get_max_chars"); ADD_GROUP("Caret", "caret_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_block_mode"), "cursor_set_block_mode", "cursor_is_block_mode"); diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index 88121a06f0..acbf41aa81 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -210,6 +210,7 @@ class TextEdit : public Control { //syntax coloring HashMap<String, Color> keywords; + HashMap<String, Color> member_keywords; Vector<ColorRegion> color_regions; @@ -491,7 +492,10 @@ public: bool is_readonly() const; void set_max_chars(int p_max_chars); + int get_max_chars() const; + void set_wrap(bool p_wrap); + bool is_wrapping() const; void clear(); @@ -543,6 +547,9 @@ public: void add_color_region(const String &p_begin_key = String(), const String &p_end_key = String(), const Color &p_color = Color(), bool p_line_only = false); void clear_colors(); + void add_member_keyword(const String &p_keyword, const Color &p_color); + void clear_member_keywords(); + int get_v_scroll() const; void set_v_scroll(int p_scroll); diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index fd5a47d875..8fec9fe97a 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -784,6 +784,10 @@ void TreeItem::_bind_methods() { ClassDB::bind_method(D_METHOD("set_disable_folding", "disable"), &TreeItem::set_disable_folding); ClassDB::bind_method(D_METHOD("is_folding_disabled"), &TreeItem::is_folding_disabled); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collapsed"), "set_collapsed", "is_collapsed"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disable_folding"), "set_disable_folding", "is_folding_disabled"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "custom_minimum_height", PROPERTY_HINT_RANGE, "0,1000,1"), "set_custom_minimum_height", "get_custom_minimum_height"); + BIND_ENUM_CONSTANT(CELL_MODE_STRING); BIND_ENUM_CONSTANT(CELL_MODE_CHECK); BIND_ENUM_CONSTANT(CELL_MODE_RANGE); @@ -3086,6 +3090,11 @@ void Tree::set_select_mode(SelectMode p_mode) { select_mode = p_mode; } +Tree::SelectMode Tree::get_select_mode() const { + + return select_mode; +} + void Tree::deselect_all() { TreeItem *item = get_next_selected(get_root()); @@ -3139,6 +3148,11 @@ void Tree::set_hide_root(bool p_enabled) { update(); } +bool Tree::is_root_hidden() const { + + return hide_root; +} + void Tree::set_column_min_width(int p_column, int p_min_width) { ERR_FAIL_INDEX(p_column, columns.size()); @@ -3759,11 +3773,13 @@ void Tree::_bind_methods() { ClassDB::bind_method(D_METHOD("get_column_width", "column"), &Tree::get_column_width); ClassDB::bind_method(D_METHOD("set_hide_root", "enable"), &Tree::set_hide_root); + ClassDB::bind_method(D_METHOD("is_root_hidden"), &Tree::is_root_hidden); ClassDB::bind_method(D_METHOD("get_next_selected", "from"), &Tree::_get_next_selected); ClassDB::bind_method(D_METHOD("get_selected"), &Tree::get_selected); ClassDB::bind_method(D_METHOD("get_selected_column"), &Tree::get_selected_column); ClassDB::bind_method(D_METHOD("get_pressed_button"), &Tree::get_pressed_button); ClassDB::bind_method(D_METHOD("set_select_mode", "mode"), &Tree::set_select_mode); + ClassDB::bind_method(D_METHOD("get_select_mode"), &Tree::get_select_mode); ClassDB::bind_method(D_METHOD("set_columns", "amount"), &Tree::set_columns); ClassDB::bind_method(D_METHOD("get_columns"), &Tree::get_columns); @@ -3797,6 +3813,14 @@ void Tree::_bind_methods() { ClassDB::bind_method(D_METHOD("set_allow_reselect", "allow"), &Tree::set_allow_reselect); ClassDB::bind_method(D_METHOD("get_allow_reselect"), &Tree::get_allow_reselect); + ADD_PROPERTY(PropertyInfo(Variant::INT, "columns"), "set_columns", "get_columns"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_reselect"), "set_allow_reselect", "get_allow_reselect"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_rmb_select"), "set_allow_rmb_select", "get_allow_rmb_select"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_folding"), "set_hide_folding", "is_folding_hidden"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_root"), "set_hide_root", "is_root_hidden"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "drop_mode_flags", PROPERTY_HINT_FLAGS, "On Item,Inbetween"), "set_drop_mode_flags", "get_drop_mode_flags"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "select_mode", PROPERTY_HINT_ENUM, "Single,Row,Multi"), "set_select_mode", "get_select_mode"); + ADD_SIGNAL(MethodInfo("item_selected")); ADD_SIGNAL(MethodInfo("cell_selected")); ADD_SIGNAL(MethodInfo("multi_selected", PropertyInfo(Variant::OBJECT, "item"), PropertyInfo(Variant::INT, "column"), PropertyInfo(Variant::BOOL, "selected"))); diff --git a/scene/gui/tree.h b/scene/gui/tree.h index ccacb44e6b..709ff73971 100644 --- a/scene/gui/tree.h +++ b/scene/gui/tree.h @@ -542,11 +542,13 @@ public: int get_column_width(int p_column) const; void set_hide_root(bool p_enabled); + bool is_root_hidden() const; TreeItem *get_next_selected(TreeItem *p_item); TreeItem *get_selected() const; int get_selected_column() const; int get_pressed_button() const; void set_select_mode(SelectMode p_mode); + SelectMode get_select_mode() const; void deselect_all(); bool is_anything_selected(); diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp index 953ebe84f6..4eee0126d8 100644 --- a/scene/gui/video_player.cpp +++ b/scene/gui/video_player.cpp @@ -38,11 +38,6 @@ int VideoPlayer::sp_get_channel_count() const { return playback->get_channels(); } -void VideoPlayer::sp_set_mix_rate(int p_rate) { - - server_mix_rate = p_rate; -} - bool VideoPlayer::mix(AudioFrame *p_buffer, int p_frames) { // Check the amount resampler can really handle. @@ -241,7 +236,7 @@ void VideoPlayer::set_stream(const Ref<VideoStream> &p_stream) { AudioServer::get_singleton()->lock(); if (channels > 0) - resampler.setup(channels, playback->get_mix_rate(), server_mix_rate, buffering_ms, 0); + resampler.setup(channels, playback->get_mix_rate(), AudioServer::get_singleton()->get_mix_rate(), buffering_ms, 0); else resampler.clear(); AudioServer::get_singleton()->unlock(); @@ -476,9 +471,13 @@ void VideoPlayer::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "VideoStream"), "set_stream", "get_stream"); //ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/loop"), "set_loop", "has_loop") ; ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_volume_db", "get_volume_db"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume", PROPERTY_HINT_EXP_RANGE, "0,15,0.01", 0), "set_volume", "get_volume"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "has_autoplay"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "paused"), "set_paused", "is_paused"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "expand"), "set_expand", "has_expand"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "buffering_msec", PROPERTY_HINT_RANGE, "10,1000"), "set_buffering_msec", "get_buffering_msec"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "stream_position", PROPERTY_HINT_RANGE, "0,1280000,0.1", 0), "set_stream_position", "get_stream_position"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus"); } @@ -494,7 +493,6 @@ VideoPlayer::VideoPlayer() { bus_index = 0; buffering_ms = 500; - server_mix_rate = 44100; // internal_stream.player=this; // stream_rid=AudioServer::get_singleton()->audio_stream_create(&internal_stream); diff --git a/scene/gui/video_player.h b/scene/gui/video_player.h index 7010c71ad9..5c379b5620 100644 --- a/scene/gui/video_player.h +++ b/scene/gui/video_player.h @@ -50,7 +50,6 @@ class VideoPlayer : public Control { Ref<VideoStream> stream; int sp_get_channel_count() const; - void sp_set_mix_rate(int p_rate); //notify the stream of the mix rate bool mix(AudioFrame *p_buffer, int p_frames); RID stream_rid; @@ -69,7 +68,6 @@ class VideoPlayer : public Control { bool expand; bool loops; int buffering_ms; - int server_mix_rate; int audio_track; int bus_index; |