mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Make sure stylebox is valid in EditorSpinSlider before using it
This commit is contained in:
parent
f32c042f3e
commit
0d3e85c665
2 changed files with 173 additions and 160 deletions
|
|
@ -195,11 +195,11 @@ void EditorSpinSlider::_update_value_input_stylebox() {
|
||||||
if (!value_input) {
|
if (!value_input) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a left margin to the stylebox to make the number align with the Label
|
// Add a left margin to the stylebox to make the number align with the Label
|
||||||
// when it's edited. The LineEdit "focus" stylebox uses the "normal" stylebox's
|
// when it's edited. The LineEdit "focus" stylebox uses the "normal" stylebox's
|
||||||
// default margins.
|
// default margins.
|
||||||
Ref<StyleBoxFlat> stylebox =
|
Ref<StyleBox> stylebox = get_theme_stylebox(SNAME("normal"), SNAME("LineEdit"))->duplicate();
|
||||||
EditorNode::get_singleton()->get_theme_base()->get_theme_stylebox(SNAME("normal"), SNAME("LineEdit"))->duplicate();
|
|
||||||
// EditorSpinSliders with a label have more space on the left, so add an
|
// EditorSpinSliders with a label have more space on the left, so add an
|
||||||
// higher margin to match the location where the text begins.
|
// higher margin to match the location where the text begins.
|
||||||
// The margin values below were determined by empirical testing.
|
// The margin values below were determined by empirical testing.
|
||||||
|
|
@ -210,188 +210,197 @@ void EditorSpinSlider::_update_value_input_stylebox() {
|
||||||
stylebox->set_default_margin(SIDE_LEFT, (get_label() != String() ? 23 : 16) * EDSCALE);
|
stylebox->set_default_margin(SIDE_LEFT, (get_label() != String() ? 23 : 16) * EDSCALE);
|
||||||
stylebox->set_default_margin(SIDE_RIGHT, 0);
|
stylebox->set_default_margin(SIDE_RIGHT, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
value_input->add_theme_style_override("normal", stylebox);
|
value_input->add_theme_style_override("normal", stylebox);
|
||||||
}
|
}
|
||||||
void EditorSpinSlider::_notification(int p_what) {
|
|
||||||
if (p_what == NOTIFICATION_WM_WINDOW_FOCUS_OUT ||
|
void EditorSpinSlider::_draw_spin_slider() {
|
||||||
p_what == NOTIFICATION_WM_WINDOW_FOCUS_IN ||
|
updown_offset = -1;
|
||||||
p_what == NOTIFICATION_EXIT_TREE) {
|
|
||||||
if (grabbing_spinner) {
|
RID ci = get_canvas_item();
|
||||||
grabber->hide();
|
bool rtl = is_layout_rtl();
|
||||||
Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
|
Vector2 size = get_size();
|
||||||
grabbing_spinner = false;
|
|
||||||
grabbing_spinner_attempt = false;
|
Ref<StyleBox> sb = get_theme_stylebox(SNAME("normal"), SNAME("LineEdit"));
|
||||||
}
|
if (!flat) {
|
||||||
|
draw_style_box(sb, Rect2(Vector2(), size));
|
||||||
|
}
|
||||||
|
Ref<Font> font = get_theme_font(SNAME("font"), SNAME("LineEdit"));
|
||||||
|
int font_size = get_theme_font_size(SNAME("font_size"), SNAME("LineEdit"));
|
||||||
|
int sep_base = 4 * EDSCALE;
|
||||||
|
int sep = sep_base + sb->get_offset().x; //make it have the same margin on both sides, looks better
|
||||||
|
|
||||||
|
int label_width = font->get_string_size(label, font_size).width;
|
||||||
|
int number_width = size.width - sb->get_minimum_size().width - label_width - sep;
|
||||||
|
|
||||||
|
Ref<Texture2D> updown = get_theme_icon(SNAME("updown"), SNAME("SpinBox"));
|
||||||
|
|
||||||
|
if (get_step() == 1) {
|
||||||
|
number_width -= updown->get_width();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_what == NOTIFICATION_READY || p_what == NOTIFICATION_THEME_CHANGED) {
|
String numstr = get_text_value();
|
||||||
_update_value_input_stylebox();
|
|
||||||
|
int vofs = (size.height - font->get_height(font_size)) / 2 + font->get_ascent(font_size);
|
||||||
|
|
||||||
|
Color fc = get_theme_color(SNAME("font_color"), SNAME("LineEdit"));
|
||||||
|
Color lc;
|
||||||
|
if (use_custom_label_color) {
|
||||||
|
lc = custom_label_color;
|
||||||
|
} else {
|
||||||
|
lc = fc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_what == NOTIFICATION_DRAW) {
|
if (flat && label != String()) {
|
||||||
updown_offset = -1;
|
Color label_bg_color = get_theme_color(SNAME("dark_color_3"), SNAME("Editor"));
|
||||||
|
|
||||||
RID ci = get_canvas_item();
|
|
||||||
bool rtl = is_layout_rtl();
|
|
||||||
Vector2 size = get_size();
|
|
||||||
|
|
||||||
Ref<StyleBox> sb = get_theme_stylebox(SNAME("normal"), SNAME("LineEdit"));
|
|
||||||
if (!flat) {
|
|
||||||
draw_style_box(sb, Rect2(Vector2(), size));
|
|
||||||
}
|
|
||||||
Ref<Font> font = get_theme_font(SNAME("font"), SNAME("LineEdit"));
|
|
||||||
int font_size = get_theme_font_size(SNAME("font_size"), SNAME("LineEdit"));
|
|
||||||
int sep_base = 4 * EDSCALE;
|
|
||||||
int sep = sep_base + sb->get_offset().x; //make it have the same margin on both sides, looks better
|
|
||||||
|
|
||||||
int label_width = font->get_string_size(label, font_size).width;
|
|
||||||
int number_width = size.width - sb->get_minimum_size().width - label_width - sep;
|
|
||||||
|
|
||||||
Ref<Texture2D> updown = get_theme_icon(SNAME("updown"), SNAME("SpinBox"));
|
|
||||||
|
|
||||||
if (get_step() == 1) {
|
|
||||||
number_width -= updown->get_width();
|
|
||||||
}
|
|
||||||
|
|
||||||
String numstr = get_text_value();
|
|
||||||
|
|
||||||
int vofs = (size.height - font->get_height(font_size)) / 2 + font->get_ascent(font_size);
|
|
||||||
|
|
||||||
Color fc = get_theme_color(SNAME("font_color"), SNAME("LineEdit"));
|
|
||||||
Color lc;
|
|
||||||
if (use_custom_label_color) {
|
|
||||||
lc = custom_label_color;
|
|
||||||
} else {
|
|
||||||
lc = fc;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flat && label != String()) {
|
|
||||||
Color label_bg_color = get_theme_color(SNAME("dark_color_3"), SNAME("Editor"));
|
|
||||||
if (rtl) {
|
|
||||||
draw_rect(Rect2(Vector2(size.width - (sb->get_offset().x * 2 + label_width), 0), Vector2(sb->get_offset().x * 2 + label_width, size.height)), label_bg_color);
|
|
||||||
} else {
|
|
||||||
draw_rect(Rect2(Vector2(), Vector2(sb->get_offset().x * 2 + label_width, size.height)), label_bg_color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (has_focus()) {
|
|
||||||
Ref<StyleBox> focus = get_theme_stylebox(SNAME("focus"), SNAME("LineEdit"));
|
|
||||||
draw_style_box(focus, Rect2(Vector2(), size));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rtl) {
|
if (rtl) {
|
||||||
draw_string(font, Vector2(Math::round(size.width - sb->get_offset().x - label_width), vofs), label, HALIGN_RIGHT, -1, font_size, lc * Color(1, 1, 1, 0.5));
|
draw_rect(Rect2(Vector2(size.width - (sb->get_offset().x * 2 + label_width), 0), Vector2(sb->get_offset().x * 2 + label_width, size.height)), label_bg_color);
|
||||||
} else {
|
} else {
|
||||||
draw_string(font, Vector2(Math::round(sb->get_offset().x), vofs), label, HALIGN_LEFT, -1, font_size, lc * Color(1, 1, 1, 0.5));
|
draw_rect(Rect2(Vector2(), Vector2(sb->get_offset().x * 2 + label_width, size.height)), label_bg_color);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int suffix_start = numstr.length();
|
if (has_focus()) {
|
||||||
RID num_rid = TS->create_shaped_text();
|
Ref<StyleBox> focus = get_theme_stylebox(SNAME("focus"), SNAME("LineEdit"));
|
||||||
TS->shaped_text_add_string(num_rid, numstr + U"\u2009" + suffix, font->get_rids(), font_size);
|
draw_style_box(focus, Rect2(Vector2(), size));
|
||||||
|
}
|
||||||
|
|
||||||
float text_start = rtl ? Math::round(sb->get_offset().x) : Math::round(sb->get_offset().x + label_width + sep);
|
if (rtl) {
|
||||||
Vector2 text_ofs = rtl ? Vector2(text_start + (number_width - TS->shaped_text_get_width(num_rid)), vofs) : Vector2(text_start, vofs);
|
draw_string(font, Vector2(Math::round(size.width - sb->get_offset().x - label_width), vofs), label, HALIGN_RIGHT, -1, font_size, lc * Color(1, 1, 1, 0.5));
|
||||||
const Vector<TextServer::Glyph> visual = TS->shaped_text_get_glyphs(num_rid);
|
} else {
|
||||||
int v_size = visual.size();
|
draw_string(font, Vector2(Math::round(sb->get_offset().x), vofs), label, HALIGN_LEFT, -1, font_size, lc * Color(1, 1, 1, 0.5));
|
||||||
const TextServer::Glyph *glyphs = visual.ptr();
|
}
|
||||||
for (int i = 0; i < v_size; i++) {
|
|
||||||
for (int j = 0; j < glyphs[i].repeat; j++) {
|
int suffix_start = numstr.length();
|
||||||
if (text_ofs.x >= text_start && (text_ofs.x + glyphs[i].advance) <= (text_start + number_width)) {
|
RID num_rid = TS->create_shaped_text();
|
||||||
Color color = fc;
|
TS->shaped_text_add_string(num_rid, numstr + U"\u2009" + suffix, font->get_rids(), font_size);
|
||||||
if (glyphs[i].start >= suffix_start) {
|
|
||||||
color.a *= 0.4;
|
float text_start = rtl ? Math::round(sb->get_offset().x) : Math::round(sb->get_offset().x + label_width + sep);
|
||||||
}
|
Vector2 text_ofs = rtl ? Vector2(text_start + (number_width - TS->shaped_text_get_width(num_rid)), vofs) : Vector2(text_start, vofs);
|
||||||
if (glyphs[i].font_rid != RID()) {
|
const Vector<TextServer::Glyph> visual = TS->shaped_text_get_glyphs(num_rid);
|
||||||
TS->font_draw_glyph(glyphs[i].font_rid, ci, glyphs[i].font_size, text_ofs + Vector2(glyphs[i].x_off, glyphs[i].y_off), glyphs[i].index, color);
|
int v_size = visual.size();
|
||||||
} else if ((glyphs[i].flags & TextServer::GRAPHEME_IS_VIRTUAL) != TextServer::GRAPHEME_IS_VIRTUAL) {
|
const TextServer::Glyph *glyphs = visual.ptr();
|
||||||
TS->draw_hex_code_box(ci, glyphs[i].font_size, text_ofs + Vector2(glyphs[i].x_off, glyphs[i].y_off), glyphs[i].index, color);
|
for (int i = 0; i < v_size; i++) {
|
||||||
}
|
for (int j = 0; j < glyphs[i].repeat; j++) {
|
||||||
|
if (text_ofs.x >= text_start && (text_ofs.x + glyphs[i].advance) <= (text_start + number_width)) {
|
||||||
|
Color color = fc;
|
||||||
|
if (glyphs[i].start >= suffix_start) {
|
||||||
|
color.a *= 0.4;
|
||||||
|
}
|
||||||
|
if (glyphs[i].font_rid != RID()) {
|
||||||
|
TS->font_draw_glyph(glyphs[i].font_rid, ci, glyphs[i].font_size, text_ofs + Vector2(glyphs[i].x_off, glyphs[i].y_off), glyphs[i].index, color);
|
||||||
|
} else if ((glyphs[i].flags & TextServer::GRAPHEME_IS_VIRTUAL) != TextServer::GRAPHEME_IS_VIRTUAL) {
|
||||||
|
TS->draw_hex_code_box(ci, glyphs[i].font_size, text_ofs + Vector2(glyphs[i].x_off, glyphs[i].y_off), glyphs[i].index, color);
|
||||||
}
|
}
|
||||||
text_ofs.x += glyphs[i].advance;
|
|
||||||
}
|
}
|
||||||
|
text_ofs.x += glyphs[i].advance;
|
||||||
}
|
}
|
||||||
TS->free(num_rid);
|
}
|
||||||
|
TS->free(num_rid);
|
||||||
|
|
||||||
if (get_step() == 1) {
|
if (get_step() == 1) {
|
||||||
Ref<Texture2D> updown2 = get_theme_icon(SNAME("updown"), SNAME("SpinBox"));
|
Ref<Texture2D> updown2 = get_theme_icon(SNAME("updown"), SNAME("SpinBox"));
|
||||||
int updown_vofs = (size.height - updown2->get_height()) / 2;
|
int updown_vofs = (size.height - updown2->get_height()) / 2;
|
||||||
if (rtl) {
|
if (rtl) {
|
||||||
updown_offset = sb->get_margin(SIDE_LEFT);
|
updown_offset = sb->get_margin(SIDE_LEFT);
|
||||||
|
} else {
|
||||||
|
updown_offset = size.width - sb->get_margin(SIDE_RIGHT) - updown2->get_width();
|
||||||
|
}
|
||||||
|
Color c(1, 1, 1);
|
||||||
|
if (hover_updown) {
|
||||||
|
c *= Color(1.2, 1.2, 1.2);
|
||||||
|
}
|
||||||
|
draw_texture(updown2, Vector2(updown_offset, updown_vofs), c);
|
||||||
|
if (grabber->is_visible()) {
|
||||||
|
grabber->hide();
|
||||||
|
}
|
||||||
|
} else if (!hide_slider) {
|
||||||
|
int grabber_w = 4 * EDSCALE;
|
||||||
|
int width = size.width - sb->get_minimum_size().width - grabber_w;
|
||||||
|
int ofs = sb->get_offset().x;
|
||||||
|
int svofs = (size.height + vofs) / 2 - 1;
|
||||||
|
Color c = fc;
|
||||||
|
c.a = 0.2;
|
||||||
|
|
||||||
|
draw_rect(Rect2(ofs, svofs + 1, width, 2 * EDSCALE), c);
|
||||||
|
int gofs = get_as_ratio() * width;
|
||||||
|
c.a = 0.9;
|
||||||
|
Rect2 grabber_rect = Rect2(ofs + gofs, svofs + 1, grabber_w, 2 * EDSCALE);
|
||||||
|
draw_rect(grabber_rect, c);
|
||||||
|
|
||||||
|
grabbing_spinner_mouse_pos = get_global_position() + grabber_rect.position + grabber_rect.size * 0.5;
|
||||||
|
|
||||||
|
bool display_grabber = (mouse_over_spin || mouse_over_grabber) && !grabbing_spinner && !(value_input_popup && value_input_popup->is_visible());
|
||||||
|
if (grabber->is_visible() != display_grabber) {
|
||||||
|
if (display_grabber) {
|
||||||
|
grabber->show();
|
||||||
} else {
|
} else {
|
||||||
updown_offset = size.width - sb->get_margin(SIDE_RIGHT) - updown2->get_width();
|
|
||||||
}
|
|
||||||
Color c(1, 1, 1);
|
|
||||||
if (hover_updown) {
|
|
||||||
c *= Color(1.2, 1.2, 1.2);
|
|
||||||
}
|
|
||||||
draw_texture(updown2, Vector2(updown_offset, updown_vofs), c);
|
|
||||||
if (grabber->is_visible()) {
|
|
||||||
grabber->hide();
|
grabber->hide();
|
||||||
}
|
}
|
||||||
} else if (!hide_slider) {
|
}
|
||||||
int grabber_w = 4 * EDSCALE;
|
|
||||||
int width = size.width - sb->get_minimum_size().width - grabber_w;
|
|
||||||
int ofs = sb->get_offset().x;
|
|
||||||
int svofs = (size.height + vofs) / 2 - 1;
|
|
||||||
Color c = fc;
|
|
||||||
c.a = 0.2;
|
|
||||||
|
|
||||||
draw_rect(Rect2(ofs, svofs + 1, width, 2 * EDSCALE), c);
|
if (display_grabber) {
|
||||||
int gofs = get_as_ratio() * width;
|
Ref<Texture2D> grabber_tex;
|
||||||
c.a = 0.9;
|
if (mouse_over_grabber) {
|
||||||
Rect2 grabber_rect = Rect2(ofs + gofs, svofs + 1, grabber_w, 2 * EDSCALE);
|
grabber_tex = get_theme_icon(SNAME("grabber_highlight"), SNAME("HSlider"));
|
||||||
draw_rect(grabber_rect, c);
|
} else {
|
||||||
|
grabber_tex = get_theme_icon(SNAME("grabber"), SNAME("HSlider"));
|
||||||
grabbing_spinner_mouse_pos = get_global_position() + grabber_rect.position + grabber_rect.size * 0.5;
|
|
||||||
|
|
||||||
bool display_grabber = (mouse_over_spin || mouse_over_grabber) && !grabbing_spinner && !(value_input_popup && value_input_popup->is_visible());
|
|
||||||
if (grabber->is_visible() != display_grabber) {
|
|
||||||
if (display_grabber) {
|
|
||||||
grabber->show();
|
|
||||||
} else {
|
|
||||||
grabber->hide();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (display_grabber) {
|
if (grabber->get_texture() != grabber_tex) {
|
||||||
Ref<Texture2D> grabber_tex;
|
grabber->set_texture(grabber_tex);
|
||||||
if (mouse_over_grabber) {
|
|
||||||
grabber_tex = get_theme_icon(SNAME("grabber_highlight"), SNAME("HSlider"));
|
|
||||||
} else {
|
|
||||||
grabber_tex = get_theme_icon(SNAME("grabber"), SNAME("HSlider"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (grabber->get_texture() != grabber_tex) {
|
|
||||||
grabber->set_texture(grabber_tex);
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector2 scale = get_global_transform_with_canvas().get_scale();
|
|
||||||
grabber->set_scale(scale);
|
|
||||||
grabber->set_size(Size2(0, 0));
|
|
||||||
grabber->set_position(get_global_position() + (grabber_rect.position + grabber_rect.size * 0.5 - grabber->get_size() * 0.5) * scale);
|
|
||||||
|
|
||||||
if (mousewheel_over_grabber) {
|
|
||||||
Input::get_singleton()->warp_mouse_position(grabber->get_position() + grabber_rect.size);
|
|
||||||
}
|
|
||||||
|
|
||||||
grabber_range = width;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p_what == NOTIFICATION_MOUSE_ENTER) {
|
Vector2 scale = get_global_transform_with_canvas().get_scale();
|
||||||
mouse_over_spin = true;
|
grabber->set_scale(scale);
|
||||||
update();
|
grabber->set_size(Size2(0, 0));
|
||||||
}
|
grabber->set_position(get_global_position() + (grabber_rect.position + grabber_rect.size * 0.5 - grabber->get_size() * 0.5) * scale);
|
||||||
if (p_what == NOTIFICATION_MOUSE_EXIT) {
|
|
||||||
mouse_over_spin = false;
|
if (mousewheel_over_grabber) {
|
||||||
update();
|
Input::get_singleton()->warp_mouse_position(grabber->get_position() + grabber_rect.size);
|
||||||
}
|
}
|
||||||
if (p_what == NOTIFICATION_FOCUS_ENTER) {
|
|
||||||
if ((Input::get_singleton()->is_action_pressed("ui_focus_next") || Input::get_singleton()->is_action_pressed("ui_focus_prev")) && !value_input_just_closed) {
|
grabber_range = width;
|
||||||
_focus_entered();
|
|
||||||
}
|
}
|
||||||
value_input_just_closed = false;
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void EditorSpinSlider::_notification(int p_what) {
|
||||||
|
switch (p_what) {
|
||||||
|
case NOTIFICATION_ENTER_TREE:
|
||||||
|
case NOTIFICATION_THEME_CHANGED:
|
||||||
|
_update_value_input_stylebox();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NOTIFICATION_DRAW:
|
||||||
|
_draw_spin_slider();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NOTIFICATION_WM_WINDOW_FOCUS_IN:
|
||||||
|
case NOTIFICATION_WM_WINDOW_FOCUS_OUT:
|
||||||
|
case NOTIFICATION_EXIT_TREE:
|
||||||
|
if (grabbing_spinner) {
|
||||||
|
grabber->hide();
|
||||||
|
Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
|
||||||
|
grabbing_spinner = false;
|
||||||
|
grabbing_spinner_attempt = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NOTIFICATION_MOUSE_ENTER:
|
||||||
|
mouse_over_spin = true;
|
||||||
|
update();
|
||||||
|
break;
|
||||||
|
case NOTIFICATION_MOUSE_EXIT:
|
||||||
|
mouse_over_spin = false;
|
||||||
|
update();
|
||||||
|
break;
|
||||||
|
case NOTIFICATION_FOCUS_ENTER:
|
||||||
|
if ((Input::get_singleton()->is_action_pressed("ui_focus_next") || Input::get_singleton()->is_action_pressed("ui_focus_prev")) && !value_input_just_closed) {
|
||||||
|
_focus_entered();
|
||||||
|
}
|
||||||
|
value_input_just_closed = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -567,8 +576,10 @@ void EditorSpinSlider::_ensure_input_popup() {
|
||||||
if (value_input_popup) {
|
if (value_input_popup) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
value_input_popup = memnew(Popup);
|
value_input_popup = memnew(Popup);
|
||||||
add_child(value_input_popup);
|
add_child(value_input_popup);
|
||||||
|
|
||||||
value_input = memnew(LineEdit);
|
value_input = memnew(LineEdit);
|
||||||
value_input_popup->add_child(value_input);
|
value_input_popup->add_child(value_input);
|
||||||
value_input_popup->set_wrap_controls(true);
|
value_input_popup->set_wrap_controls(true);
|
||||||
|
|
@ -576,6 +587,7 @@ void EditorSpinSlider::_ensure_input_popup() {
|
||||||
value_input_popup->connect("popup_hide", callable_mp(this, &EditorSpinSlider::_value_input_closed));
|
value_input_popup->connect("popup_hide", callable_mp(this, &EditorSpinSlider::_value_input_closed));
|
||||||
value_input->connect("text_submitted", callable_mp(this, &EditorSpinSlider::_value_input_submitted));
|
value_input->connect("text_submitted", callable_mp(this, &EditorSpinSlider::_value_input_submitted));
|
||||||
value_input->connect("focus_exited", callable_mp(this, &EditorSpinSlider::_value_focus_exited));
|
value_input->connect("focus_exited", callable_mp(this, &EditorSpinSlider::_value_focus_exited));
|
||||||
|
|
||||||
if (is_inside_tree()) {
|
if (is_inside_tree()) {
|
||||||
_update_value_input_stylebox();
|
_update_value_input_stylebox();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ class EditorSpinSlider : public Range {
|
||||||
|
|
||||||
void _update_value_input_stylebox();
|
void _update_value_input_stylebox();
|
||||||
void _ensure_input_popup();
|
void _ensure_input_popup();
|
||||||
|
void _draw_spin_slider();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void _notification(int p_what);
|
void _notification(int p_what);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue