From 97c99cc0ef0c3ba846531d5406935e8bc03c0102 Mon Sep 17 00:00:00 2001 From: osquallo Date: Thu, 16 Aug 2018 14:55:15 +0200 Subject: [PATCH] =?UTF-8?q?petit=20nettoyage=20de=20code=20comment=C3=A9?= =?UTF-8?q?=20obsolete.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/ui_window/ui_window.gd | 12 +----------- scenes/GUI/HUD/HUD.tscn | 1 - scenes/GUI/HUD/WindowControl.gd | 4 ---- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/addons/ui_window/ui_window.gd b/addons/ui_window/ui_window.gd index ea449b9..50056f1 100644 --- a/addons/ui_window/ui_window.gd +++ b/addons/ui_window/ui_window.gd @@ -54,9 +54,7 @@ func _enter_tree(): background.size_flags_horizontal = SIZE_EXPAND_FILL background.size_flags_vertical = SIZE_EXPAND_FILL -# background.rect_clip_content = true - -# background.region_rect = Rect2( 0, 0, 0, 0 ) + background.region_rect = Rect2( 0, 0, 0, 0 ) background.patch_margin_left = 4 background.patch_margin_top = 32 background.patch_margin_right = 4 @@ -327,12 +325,6 @@ func _input( event ): if event is InputEventMouseMotion and is_resizing: var delta = event.relative self.rect_size += delta -# -# var mouse_position = get_viewport().get_mouse_position() -# var size_modulo = Vector2( int(self.rect_size.x) % 2, int(self.rect_size.y) % 2 ) -# self.rect_size -= size_modulo -# get_viewport().warp_mouse( mouse_position - size_modulo ) - func check_if_clicked( event ): if not is_moving and event is InputEventMouseButton and event.is_pressed() and not event.is_echo() and event.button_index == 1 : @@ -350,8 +342,6 @@ func _on_Header_gui_input( event ): if event is InputEventMouseMotion and is_moving: var delta = event.relative self.rect_position += delta -# self.rect_position -= Vector2( int(self.rect_size.x) % 2, int(self.rect_size.y) % 2 ) -# get_viewport().warp_mouse( get_viewport().get_mouse_position() - Vector2( int(get_viewport().get_mouse_position().x) % 2, int(get_viewport().get_mouse_position().y) % 2 ) ) func _on_window_gui_input( event ): check_if_clicked( event ) diff --git a/scenes/GUI/HUD/HUD.tscn b/scenes/GUI/HUD/HUD.tscn index c1988bb..1097de6 100644 --- a/scenes/GUI/HUD/HUD.tscn +++ b/scenes/GUI/HUD/HUD.tscn @@ -140,7 +140,6 @@ _sections_unfolded = [ "Axis Stretch", "Grow Direction", "Material", "Mouse", "P [node name="VBoxContainer" type="VBoxContainer" parent="Windows/Test" index="1"] -editor/display_folded = true anchor_left = 0.0 anchor_top = 0.0 anchor_right = 0.0 diff --git a/scenes/GUI/HUD/WindowControl.gd b/scenes/GUI/HUD/WindowControl.gd index 96ee675..dadb711 100644 --- a/scenes/GUI/HUD/WindowControl.gd +++ b/scenes/GUI/HUD/WindowControl.gd @@ -155,7 +155,3 @@ func save_to_file( config_file ): func _on_window_gui_input( event ): check_if_clicked( event ) - -func _on_footer_gui_input( event ): -# check_if_clicked( event ) - pass \ No newline at end of file