You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-01 16:38:31 +00:00
Rename CanvasItem.update() to queue_redraw()
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on. Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency. Just a few comments have also been changed to say "redraw". In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
This commit is contained in:
@@ -77,7 +77,7 @@ void BaseButton::gui_input(const Ref<InputEvent> &p_event) {
|
||||
bool last_press_inside = status.pressing_inside;
|
||||
status.pressing_inside = has_point(mouse_motion->get_position());
|
||||
if (last_press_inside != status.pressing_inside) {
|
||||
update();
|
||||
queue_redraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -87,32 +87,32 @@ void BaseButton::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_MOUSE_ENTER: {
|
||||
status.hovering = true;
|
||||
update();
|
||||
queue_redraw();
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_MOUSE_EXIT: {
|
||||
status.hovering = false;
|
||||
update();
|
||||
queue_redraw();
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_DRAG_BEGIN:
|
||||
case NOTIFICATION_SCROLL_BEGIN: {
|
||||
if (status.press_attempt) {
|
||||
status.press_attempt = false;
|
||||
update();
|
||||
queue_redraw();
|
||||
}
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_FOCUS_ENTER: {
|
||||
update();
|
||||
queue_redraw();
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_FOCUS_EXIT: {
|
||||
if (status.press_attempt) {
|
||||
status.press_attempt = false;
|
||||
update();
|
||||
queue_redraw();
|
||||
} else if (status.hovering) {
|
||||
update();
|
||||
queue_redraw();
|
||||
}
|
||||
} break;
|
||||
|
||||
@@ -188,7 +188,7 @@ void BaseButton::on_action_event(Ref<InputEvent> p_event) {
|
||||
emit_signal(SNAME("button_up"));
|
||||
}
|
||||
|
||||
update();
|
||||
queue_redraw();
|
||||
}
|
||||
|
||||
void BaseButton::pressed() {
|
||||
@@ -210,7 +210,7 @@ void BaseButton::set_disabled(bool p_disabled) {
|
||||
status.press_attempt = false;
|
||||
status.pressing_inside = false;
|
||||
}
|
||||
update();
|
||||
queue_redraw();
|
||||
}
|
||||
|
||||
bool BaseButton::is_disabled() const {
|
||||
@@ -234,7 +234,7 @@ void BaseButton::set_pressed(bool p_pressed) {
|
||||
}
|
||||
_toggled(status.pressed);
|
||||
|
||||
update();
|
||||
queue_redraw();
|
||||
}
|
||||
|
||||
void BaseButton::set_pressed_no_signal(bool p_pressed) {
|
||||
@@ -246,7 +246,7 @@ void BaseButton::set_pressed_no_signal(bool p_pressed) {
|
||||
}
|
||||
status.pressed = p_pressed;
|
||||
|
||||
update();
|
||||
queue_redraw();
|
||||
}
|
||||
|
||||
bool BaseButton::is_pressing() const {
|
||||
@@ -385,7 +385,7 @@ void BaseButton::set_button_group(const Ref<ButtonGroup> &p_group) {
|
||||
button_group->buttons.insert(this);
|
||||
}
|
||||
|
||||
update(); //checkbox changes to radio if set a buttongroup
|
||||
queue_redraw(); //checkbox changes to radio if set a buttongroup
|
||||
}
|
||||
|
||||
Ref<ButtonGroup> BaseButton::get_button_group() const {
|
||||
|
||||
Reference in New Issue
Block a user