mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Code simplifications
CanvasItemEditor: - p_result == ADD_MOVE is always true in this switch-clause - both parts of the if-else-clause do the same thing and simplified an affine_inverse call ControlEditorToolbar: - private function ControlEditorToolbar::_anchor_to_position is used nowhere. Looks like copy and paste from CanvasItemEditor::_anchor_to_position ScrollContainer: - screen_is_touchscreen is always true, because otherwise the function already returned TextLine: - both parts of the if-else-clause do the same thing and simplified return statement
This commit is contained in:
@@ -182,14 +182,12 @@ void ScrollContainer::gui_input(const Ref<InputEvent> &p_gui_input) {
|
||||
drag_accum = Vector2();
|
||||
last_drag_accum = Vector2();
|
||||
drag_from = Vector2(prev_h_scroll, prev_v_scroll);
|
||||
drag_touching = screen_is_touchscreen;
|
||||
drag_touching = true;
|
||||
drag_touching_deaccel = false;
|
||||
beyond_deadzone = false;
|
||||
time_since_motion = 0;
|
||||
if (drag_touching) {
|
||||
set_physics_process_internal(true);
|
||||
time_since_motion = 0;
|
||||
}
|
||||
set_physics_process_internal(true);
|
||||
time_since_motion = 0;
|
||||
|
||||
} else {
|
||||
if (drag_touching) {
|
||||
|
||||
Reference in New Issue
Block a user