From 94a740be6ebda0b402486f784fa8c1706defb33b Mon Sep 17 00:00:00 2001 From: Feo Wu Date: Thu, 9 May 2024 14:06:37 +0800 Subject: [PATCH] feat: scalable UI (#176) * feat: scalable UI * fix auto dpi detection * fix typo and magic number * fix logger tag ui * update about ui * fix system report --- .../common/lynx_window2/lynx_window_2.gd | 18 +- .../common/lynx_window2/lynx_window_2.tscn | 147 +++++-------- addons/panku_console/common/panku_button.gd | 39 ++++ addons/panku_console/common/panku_button.tscn | 42 ++++ addons/panku_console/console.tscn | 4 +- addons/panku_console/modules/about/about.gd | 24 +-- addons/panku_console/modules/about/about.tscn | 196 ++++++++++++++++-- .../panku_console/modules/about/url_button.gd | 9 + .../modules/about/url_button.tscn | 17 ++ .../exporter/joystick_button.gd | 26 ++- .../data_controller/exporter/row_bool.tscn | 32 +-- .../data_controller/exporter/row_button.tscn | 4 + .../data_controller/exporter/row_comment.tscn | 49 ++--- .../data_controller/exporter/row_float.tscn | 19 +- .../exporter/row_group_button.tscn | 14 +- .../data_controller/exporter/row_int.tscn | 30 ++- .../data_controller/exporter/row_ui_bool.gd | 30 ++- .../exporter/row_ui_comment.gd | 44 +--- .../data_controller/exporter/row_ui_float.gd | 6 +- .../data_controller/exporter/row_ui_int.gd | 4 +- .../data_controller/exporter/row_ui_vec2.gd | 6 +- .../data_controller/exporter/row_vec_2.tscn | 19 +- .../expression_monitor/expression_item.tscn | 15 +- .../expression_monitor/monitor_group_ui.gd | 22 +- .../expression_monitor/monitor_group_ui.tscn | 55 +++-- .../expression_monitor/monitor_groups_ui.gd | 3 +- .../expression_monitor/monitor_groups_ui.tscn | 1 + .../modules/general_settings/module.gd | 38 ++++ .../modules/general_settings/opt.gd | 14 ++ .../console_logs/console_logs.gd | 3 +- .../console_logs/console_logs.tscn | 23 +- .../console_ui/help_bar.tscn | 21 +- .../console_ui/panku_console_ui.gd | 7 +- .../console_ui/panku_console_ui.tscn | 75 +++---- .../console_ui/remote_control_node.gd | 15 ++ .../console_ui/side_button.gd | 3 - .../console_ui/side_button.tscn | 9 - .../console_ui/side_buttons_controller.gd | 16 +- .../interactive_shell/hints_list/hint.tscn | 33 +-- .../input_field/input_area.gd | 2 +- .../input_field/input_area.tscn | 21 +- .../interactive_shell/mini_repl_2.tscn | 18 +- .../modules/interactive_shell/module.gd | 22 +- .../modules/interactive_shell/opt.gd | 8 +- .../keyboard_shortcuts/exp_key_mapper_2.tscn | 23 +- .../modules/native_logger/log_overlay.tscn | 5 +- .../modules/native_logger/log_view_tag.tscn | 21 +- .../modules/native_logger/logger_view.tscn | 6 +- .../modules/native_logger/module.gd | 3 +- .../modules/native_logger/opt.gd | 34 +-- .../modules/screen_notifier/resident_logs.gd | 3 + .../screen_notifier/resident_logs.tscn | 8 +- .../modules/system_report/env.gd | 7 +- .../panku_console/res/font/default_bold.tres | 4 - addons/panku_console/res/icons2/add.svg | 2 +- .../res/icons2/arrow-down-svgrepo-com.svg | 2 +- .../res/icons2/arrow-up-md-svgrepo-com.svg | 2 +- ...elete-remove-trash-garbage-svgrepo-com.svg | 2 +- .../res/icons2/check-svgrepo-com.svg | 2 +- .../res/icons2/checkbox_checked.svg | 2 +- .../res/icons2/checkbox_unchecked.svg | 2 +- .../res/icons2/chevron_right.svg | 2 +- addons/panku_console/res/icons2/close.svg | 2 +- .../panku_console/res/icons2/expand_more.svg | 2 +- addons/panku_console/res/icons2/eye.svg | 2 +- .../res/icons2/fold-svgrepo-com.svg | 2 +- addons/panku_console/res/icons2/gear.svg | 2 +- addons/panku_console/res/icons2/history.svg | 2 +- addons/panku_console/res/icons2/info2.svg | 2 +- addons/panku_console/res/icons2/keyboard.svg | 2 +- addons/panku_console/res/icons2/menu.svg | 2 +- addons/panku_console/res/icons2/open_with.svg | 2 +- .../res/icons2/pause-1010-svgrepo-com.svg | 2 +- .../res/icons2/play-1001-svgrepo-com.svg | 2 +- .../res/icons2/pop-out-svgrepo-com.svg | 2 +- addons/panku_console/res/icons2/question.svg | 2 +- addons/panku_console/res/icons2/remove.svg | 2 +- .../res/icons2/rename-svgrepo-com.svg | 4 +- addons/panku_console/res/icons2/reply.svg | 2 +- .../panku_console/res/icons2/swap_horiz.svg | 2 +- .../res/panku_console_theme.tres | 18 +- 81 files changed, 793 insertions(+), 596 deletions(-) create mode 100644 addons/panku_console/common/panku_button.gd create mode 100644 addons/panku_console/common/panku_button.tscn create mode 100644 addons/panku_console/modules/about/url_button.gd create mode 100644 addons/panku_console/modules/about/url_button.tscn create mode 100644 addons/panku_console/modules/interactive_shell/console_ui/remote_control_node.gd delete mode 100644 addons/panku_console/modules/interactive_shell/console_ui/side_button.gd delete mode 100644 addons/panku_console/modules/interactive_shell/console_ui/side_button.tscn delete mode 100644 addons/panku_console/res/font/default_bold.tres diff --git a/addons/panku_console/common/lynx_window2/lynx_window_2.gd b/addons/panku_console/common/lynx_window2/lynx_window_2.gd index 45fd555..85d711d 100644 --- a/addons/panku_console/common/lynx_window2/lynx_window_2.gd +++ b/addons/panku_console/common/lynx_window2/lynx_window_2.gd @@ -7,14 +7,14 @@ signal window_closed const lynx_window_shader_material:ShaderMaterial = preload("./lynx_window_shader_material.tres") @export var _window_title_container:HBoxContainer -@export var _title_btn:Button -@export var _close_btn:Button -@export var _options_btn:Button +@export var _title_btn:PankuButton +@export var _close_btn:PankuButton +@export var _options_btn:PankuButton @export var _resize_btn:Button @export var _shadow_focus:Panel @export var _shadow:NinePatchRect @export var _container:Panel -@export var _pop_btn:Button +@export var _pop_btn:PankuButton @export var no_resize := false @export var no_resize_x := false @@ -164,12 +164,15 @@ func set_window_title_text(text:String): if _os_window and _os_window.visible: _os_window.title = text else: - _title_btn.text = text + _title_btn.text = " " + text func get_normal_window_size(): if _folded: return _size_before_folded return size +func get_title_bar_height(): + return _window_title_container.size.y + func _ready(): custom_minimum_size = _window_title_container.get_minimum_size() @@ -203,7 +206,7 @@ func _ready(): hide() ) - _title_btn.gui_input.connect( + _title_btn.button.gui_input.connect( func(e): if e is InputEventMouseButton and !e.pressed: if e.button_index != MOUSE_BUTTON_NONE: @@ -278,7 +281,7 @@ func _process(delta: float) -> void: if window_rect.end.y > screen_rect.end.y: target_position.y = screen_rect.end.y - window_rect.size.y if window_rect.end.y > screen_rect.end.y + window_rect.size.y / 2: - target_position.y = screen_rect.end.y - 25 + target_position.y = screen_rect.end.y - get_title_bar_height() if window_rect.position.x < 0: target_position.x = 0 if window_rect.end.x > screen_rect.end.x: @@ -292,7 +295,6 @@ func _process(delta: float) -> void: _size_animation = false size = interp(size, _target_size, anim_interp_speed, delta) - # Framerate-independent interpolation. func interp(from, to, lambda: float, delta: float): return lerp(from, to, 1.0 - exp(-lambda * delta)) diff --git a/addons/panku_console/common/lynx_window2/lynx_window_2.tscn b/addons/panku_console/common/lynx_window2/lynx_window_2.tscn index 1429640..9f5fa99 100644 --- a/addons/panku_console/common/lynx_window2/lynx_window_2.tscn +++ b/addons/panku_console/common/lynx_window2/lynx_window_2.tscn @@ -1,17 +1,17 @@ -[gd_scene load_steps=26 format=3 uid="uid://s88loppa6gja"] +[gd_scene load_steps=19 format=3 uid="uid://s88loppa6gja"] [ext_resource type="Material" uid="uid://dyipeqsa8lcpc" path="res://addons/panku_console/common/lynx_window2/lynx_window_shader_material.tres" id="1_tvp6i"] [ext_resource type="Script" path="res://addons/panku_console/common/lynx_window2/lynx_window_2.gd" id="2_1ul5o"] -[ext_resource type="FontVariation" uid="uid://d2b8bo6ytpt2i" path="res://addons/panku_console/res/font/default_bold.tres" id="3_oes5e"] +[ext_resource type="Theme" uid="uid://bk18yfu0d77wk" path="res://addons/panku_console/res/panku_console_theme.tres" id="2_3fhqk"] [ext_resource type="Texture2D" uid="uid://dosm26riekruh" path="res://addons/panku_console/res/icons2/menu.svg" id="4_4dlyn"] +[ext_resource type="PackedScene" uid="uid://drn5t13m088fb" path="res://addons/panku_console/common/panku_button.tscn" id="4_dnesi"] [ext_resource type="Texture2D" uid="uid://gav3m4qtvgje" path="res://addons/panku_console/res/icons2/pop-out-svgrepo-com.svg" id="4_im81u"] [ext_resource type="Texture2D" uid="uid://8g5afcuanbl6" path="res://addons/panku_console/res/icons2/close.svg" id="5_l4qpm"] [ext_resource type="Texture2D" uid="uid://dvr12fl5prm78" path="res://addons/panku_console/res/effect/square_shadow.png" id="6_mfp1h"] [ext_resource type="Texture2D" uid="uid://ciu5jiw4xmkq0" path="res://addons/panku_console/res/icons2/resize-svgrepo-com.svg" id="7_duwqn"] [ext_resource type="Script" path="res://addons/panku_console/common/lynx_window2/border.gd" id="8_gj3ji"] -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7nef7"] -content_margin_left = 8.0 +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hv45g"] draw_center = false border_width_left = 1 border_width_top = 1 @@ -19,61 +19,6 @@ border_width_right = 1 border_width_bottom = 1 border_color = Color(1, 1, 1, 0.25098) -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3qtq3"] -content_margin_left = 8.0 -bg_color = Color(1, 1, 1, 0.12549) -border_width_left = 1 -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(1, 1, 1, 0.501961) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_iby4n"] -content_margin_left = 8.0 -bg_color = Color(1, 1, 1, 0.12549) -border_width_left = 1 -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(1, 1, 1, 0.501961) - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_sskw3"] - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_l6qrt"] -draw_center = false -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(1, 1, 1, 0.25098) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qf6ov"] -bg_color = Color(0, 1, 0, 0.25098) -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(1, 1, 1, 0.501961) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8fhjd"] -bg_color = Color(0, 1, 0, 0.501961) -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(1, 1, 1, 0.501961) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_y5x25"] -bg_color = Color(1, 0, 0, 0.25098) -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(1, 1, 1, 0.501961) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_28jhg"] -bg_color = Color(1, 0, 0, 0.501961) -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(1, 1, 1, 0.501961) - [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6i67d"] content_margin_left = 8.0 content_margin_top = 8.0 @@ -108,18 +53,20 @@ border_color = Color(1, 1, 1, 1) [node name="LynxWindow2" type="ColorRect" node_paths=PackedStringArray("_window_title_container", "_title_btn", "_close_btn", "_options_btn", "_resize_btn", "_shadow_focus", "_shadow", "_container", "_pop_btn")] material = ExtResource("1_tvp6i") +clip_contents = true offset_right = 413.0 offset_bottom = 305.0 +theme = ExtResource("2_3fhqk") script = ExtResource("2_1ul5o") _window_title_container = NodePath("VBoxContainer/Up") -_title_btn = NodePath("VBoxContainer/Up/Button") -_close_btn = NodePath("VBoxContainer/Up/Button2") -_options_btn = NodePath("VBoxContainer/Up/Button3") +_title_btn = NodePath("VBoxContainer/Up/TitleButton") +_close_btn = NodePath("VBoxContainer/Up/CloseButton") +_options_btn = NodePath("VBoxContainer/Up/MenuButton") _resize_btn = NodePath("Button") _shadow_focus = NodePath("Shadow2") _shadow = NodePath("Shadow") _container = NodePath("VBoxContainer/Down") -_pop_btn = NodePath("VBoxContainer/Up/Button4") +_pop_btn = NodePath("VBoxContainer/Up/PopupButton") [node name="VBoxContainer" type="VBoxContainer" parent="."] layout_mode = 1 @@ -134,49 +81,46 @@ theme_override_constants/separation = 0 layout_mode = 2 theme_override_constants/separation = 0 -[node name="Button" type="Button" parent="VBoxContainer/Up"] +[node name="TitleButton" parent="VBoxContainer/Up" instance=ExtResource("4_dnesi")] layout_mode = 2 size_flags_horizontal = 3 -theme_override_fonts/font = ExtResource("3_oes5e") -theme_override_font_sizes/font_size = 14 -theme_override_styles/normal = SubResource("StyleBoxFlat_7nef7") -theme_override_styles/hover = SubResource("StyleBoxFlat_3qtq3") -theme_override_styles/pressed = SubResource("StyleBoxFlat_iby4n") -theme_override_styles/focus = SubResource("StyleBoxEmpty_sskw3") +theme_override_styles/panel = SubResource("StyleBoxFlat_hv45g") + +[node name="TextureRect" parent="VBoxContainer/Up/TitleButton/HBoxContainer" index="0"] +texture = null + +[node name="Label" parent="VBoxContainer/Up/TitleButton/HBoxContainer" index="1"] text = "Window Title" -alignment = 0 -text_overrun_behavior = 1 -[node name="Button4" type="Button" parent="VBoxContainer/Up"] +[node name="PopupButton" parent="VBoxContainer/Up" instance=ExtResource("4_dnesi")] layout_mode = 2 -tooltip_text = "Independent Window" -theme_override_styles/normal = SubResource("StyleBoxFlat_l6qrt") -theme_override_styles/hover = SubResource("StyleBoxFlat_qf6ov") -theme_override_styles/pressed = SubResource("StyleBoxFlat_8fhjd") -theme_override_styles/focus = SubResource("StyleBoxEmpty_sskw3") -icon = ExtResource("4_im81u") -alignment = 0 -icon_alignment = 1 - -[node name="Button3" type="Button" parent="VBoxContainer/Up"] +theme_override_styles/panel = SubResource("StyleBoxFlat_hv45g") + +[node name="TextureRect" parent="VBoxContainer/Up/PopupButton/HBoxContainer" index="0"] +texture = ExtResource("4_im81u") + +[node name="Label" parent="VBoxContainer/Up/PopupButton/HBoxContainer" index="1"] +visible = false + +[node name="MenuButton" parent="VBoxContainer/Up" instance=ExtResource("4_dnesi")] layout_mode = 2 -tooltip_text = "Context Menu" -theme_override_styles/normal = SubResource("StyleBoxFlat_l6qrt") -theme_override_styles/hover = SubResource("StyleBoxFlat_qf6ov") -theme_override_styles/pressed = SubResource("StyleBoxFlat_8fhjd") -theme_override_styles/focus = SubResource("StyleBoxEmpty_sskw3") -icon = ExtResource("4_4dlyn") -alignment = 0 - -[node name="Button2" type="Button" parent="VBoxContainer/Up"] +theme_override_styles/panel = SubResource("StyleBoxFlat_hv45g") + +[node name="TextureRect" parent="VBoxContainer/Up/MenuButton/HBoxContainer" index="0"] +texture = ExtResource("4_4dlyn") + +[node name="Label" parent="VBoxContainer/Up/MenuButton/HBoxContainer" index="1"] +visible = false + +[node name="CloseButton" parent="VBoxContainer/Up" instance=ExtResource("4_dnesi")] layout_mode = 2 -tooltip_text = "Close" -theme_override_styles/normal = SubResource("StyleBoxFlat_l6qrt") -theme_override_styles/hover = SubResource("StyleBoxFlat_y5x25") -theme_override_styles/pressed = SubResource("StyleBoxFlat_28jhg") -theme_override_styles/focus = SubResource("StyleBoxEmpty_sskw3") -icon = ExtResource("5_l4qpm") -alignment = 0 +theme_override_styles/panel = SubResource("StyleBoxFlat_hv45g") + +[node name="TextureRect" parent="VBoxContainer/Up/CloseButton/HBoxContainer" index="0"] +texture = ExtResource("5_l4qpm") + +[node name="Label" parent="VBoxContainer/Up/CloseButton/HBoxContainer" index="1"] +visible = false [node name="Down" type="Panel" parent="VBoxContainer"] layout_mode = 2 @@ -245,3 +189,8 @@ grow_vertical = 2 mouse_filter = 2 theme_override_styles/panel = SubResource("StyleBoxFlat_uldta") script = ExtResource("8_gj3ji") + +[editable path="VBoxContainer/Up/TitleButton"] +[editable path="VBoxContainer/Up/PopupButton"] +[editable path="VBoxContainer/Up/MenuButton"] +[editable path="VBoxContainer/Up/CloseButton"] diff --git a/addons/panku_console/common/panku_button.gd b/addons/panku_console/common/panku_button.gd new file mode 100644 index 0000000..7414df6 --- /dev/null +++ b/addons/panku_console/common/panku_button.gd @@ -0,0 +1,39 @@ +class_name PankuButton extends Control + +signal pressed +signal button_down +signal button_up + +@export +var button:Button + +@export +var trect:TextureRect + +@export +var label:Label + +var icon: + set(v): + trect.texture = v + get: + return trect.texture + +var text: + set(v): + label.text = v + get: + return label.text + +func _ready(): + + button.pressed.connect( + func(): + pressed.emit() + ) + button.button_down.connect( + func(): button_down.emit() + ) + button.button_up.connect( + func(): button_up.emit() + ) diff --git a/addons/panku_console/common/panku_button.tscn b/addons/panku_console/common/panku_button.tscn new file mode 100644 index 0000000..e404fdc --- /dev/null +++ b/addons/panku_console/common/panku_button.tscn @@ -0,0 +1,42 @@ +[gd_scene load_steps=5 format=3 uid="uid://drn5t13m088fb"] + +[ext_resource type="Script" path="res://addons/panku_console/common/panku_button.gd" id="1_7kf5f"] +[ext_resource type="Texture2D" uid="uid://dchvk7qgfe37m" path="res://addons/panku_console/res/icons2/fold-svgrepo-com.svg" id="2_su653"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_v3kpx"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cwnaw"] +content_margin_top = 4.0 +content_margin_bottom = 4.0 + +[node name="PankuButton" type="PanelContainer" node_paths=PackedStringArray("button", "trect", "label")] +editor_description = "Godot's Button can't handle scaling icons properly as descripted in https://github.com/godotengine/godot-proposals/issues/660, so I have to make a new one." +self_modulate = Color(1, 1, 1, 0) +offset_right = 112.0 +offset_bottom = 31.0 +mouse_filter = 2 +theme_override_styles/panel = SubResource("StyleBoxEmpty_v3kpx") +script = ExtResource("1_7kf5f") +button = NodePath("Button") +trect = NodePath("HBoxContainer/TextureRect") +label = NodePath("HBoxContainer/Label") + +[node name="Button" type="Button" parent="."] +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="."] +layout_mode = 2 +mouse_filter = 2 +theme_override_constants/separation = 0 + +[node name="TextureRect" type="TextureRect" parent="HBoxContainer"] +layout_mode = 2 +mouse_filter = 2 +texture = ExtResource("2_su653") +expand_mode = 2 + +[node name="Label" type="Label" parent="HBoxContainer"] +layout_mode = 2 +size_flags_vertical = 1 +theme_override_styles/normal = SubResource("StyleBoxEmpty_cwnaw") +vertical_alignment = 1 diff --git a/addons/panku_console/console.tscn b/addons/panku_console/console.tscn index fd1ce7a..2506b02 100644 --- a/addons/panku_console/console.tscn +++ b/addons/panku_console/console.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=3 format=3 uid="uid://cyftuo4syatlv"] +[gd_scene load_steps=4 format=3 uid="uid://cyftuo4syatlv"] [ext_resource type="Script" path="res://addons/panku_console/console.gd" id="1_dohs1"] +[ext_resource type="Theme" uid="uid://bk18yfu0d77wk" path="res://addons/panku_console/res/panku_console_theme.tres" id="2_wxhx6"] [ext_resource type="Script" path="res://addons/panku_console/common/lynx_window2/lynx_windows_manager_2.gd" id="10_f7qaq"] [node name="Console" type="CanvasLayer"] @@ -17,4 +18,5 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 mouse_filter = 2 +theme = ExtResource("2_wxhx6") script = ExtResource("10_f7qaq") diff --git a/addons/panku_console/modules/about/about.gd b/addons/panku_console/modules/about/about.gd index da33351..79b01f9 100644 --- a/addons/panku_console/modules/about/about.gd +++ b/addons/panku_console/modules/about/about.gd @@ -2,26 +2,18 @@ extends Control var _module:PankuModule -@onready var intro := $SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/Label -@onready var project_page_button := $SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer/Button -@onready var check_update_button := $SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer/Button2 +@export var intro:Label +@export var project_page_button:Button +@export var check_update_button:Button # Called when the node enters the scene tree for the first time. func _ready(): - intro.text += "Version: " + PankuUtils.get_plugin_version() + "\n" - var sha = PankuUtils.get_commit_sha_short() - intro.text += "Commit: " + (sha if sha != "" else "Unknown") + "\n" - intro.text += "Godot Engine: " + Engine.get_version_info().string + "\n" + var version:String = PankuUtils.get_plugin_version() + var sha:String = PankuUtils.get_commit_sha_short() + if sha == "": sha = "Unknown" - intro.text += "\nPanku Console is a community driven project under MIT license, thanks to everyone who have contributed to this project:\n" - intro.text += "(Contact me if you don't see your name)\n\n" - intro.text += "Ark2000 (Feo Wu)\n" - intro.text += "scriptsengineer (Rafael Correa)\n" - intro.text += "mieldepoche\n" - intro.text += "Eggbertx\n" - intro.text += "univeous\n" - intro.text += "CheapMeow\n" - intro.text += "winston-yallow (Winston)\n" + intro.text = intro.text.replace("", version) + intro.text = intro.text.replace("", sha) project_page_button.pressed.connect( func(): diff --git a/addons/panku_console/modules/about/about.tscn b/addons/panku_console/modules/about/about.tscn index 8e9fc93..ecd50f3 100644 --- a/addons/panku_console/modules/about/about.tscn +++ b/addons/panku_console/modules/about/about.tscn @@ -1,17 +1,39 @@ -[gd_scene load_steps=5 format=3 uid="uid://cgwg3foes57mq"] +[gd_scene load_steps=10 format=3 uid="uid://cgwg3foes57mq"] [ext_resource type="Script" path="res://addons/panku_console/modules/about/about.gd" id="1_kpix3"] [ext_resource type="PackedScene" uid="uid://dyq4rjkkjs55d" path="res://addons/panku_console/common/smooth_scroll/smooth_scroll.tscn" id="2_sev6e"] [ext_resource type="Texture2D" uid="uid://rkxm4c3bbf34" path="res://addons/panku_console/logo.svg" id="3_eycho"] +[ext_resource type="PackedScene" uid="uid://cxmplwhfv5l88" path="res://addons/panku_console/modules/about/url_button.tscn" id="4_cqu2c"] -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_x88v0"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_knn3o"] content_margin_left = 8.0 content_margin_top = 8.0 content_margin_right = 8.0 content_margin_bottom = 8.0 -bg_color = Color(0.6, 0.6, 0.6, 0) +bg_color = Color(0, 0, 0, 0.270588) -[node name="about" type="Control"] +[sub_resource type="FontVariation" id="FontVariation_v70xy"] +variation_embolden = 0.5 + +[sub_resource type="FontVariation" id="FontVariation_wgi7f"] +variation_embolden = 0.5 + +[sub_resource type="SystemFont" id="SystemFont_6on77"] +font_names = PackedStringArray("Monospace") + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cqcex"] +content_margin_left = 4.0 +content_margin_top = 4.0 +content_margin_right = 4.0 +content_margin_bottom = 4.0 +bg_color = Color(0, 0, 0, 0.25098) +corner_radius_top_left = 4 +corner_radius_top_right = 4 +corner_radius_bottom_right = 4 +corner_radius_bottom_left = 4 + +[node name="about" type="Control" node_paths=PackedStringArray("intro", "project_page_button", "check_update_button")] +clip_contents = true layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 @@ -19,47 +41,175 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_kpix3") +intro = NodePath("VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/PanelContainer/HBoxContainer/Label") +project_page_button = NodePath("VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer/ProjectPageButton") +check_update_button = NodePath("VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer/CheckUpdateButton") -[node name="TextureRect" type="TextureRect" parent="."] -modulate = Color(1, 1, 1, 0.12549) +[node name="VBoxContainer" type="VBoxContainer" parent="."] layout_mode = 1 -anchors_preset = 15 +anchors_preset = -1 anchor_right = 1.0 anchor_bottom = 1.0 +offset_left = 8.0 +offset_top = 8.0 +offset_right = -8.0 +offset_bottom = -8.0 grow_horizontal = 2 grow_vertical = 2 -texture = ExtResource("3_eycho") -expand_mode = 1 -stretch_mode = 6 -[node name="SmoothScrollContainer" parent="." instance=ExtResource("2_sev6e")] -layout_mode = 1 +[node name="SmoothScrollContainer" parent="VBoxContainer" instance=ExtResource("2_sev6e")] +layout_mode = 2 +size_flags_vertical = 3 follow_content = false -[node name="VBoxContainer" type="VBoxContainer" parent="SmoothScrollContainer/HBoxContainer/Control" index="0"] +[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control" index="0"] layout_mode = 1 -anchors_preset = 15 +anchors_preset = 10 anchor_right = 1.0 -anchor_bottom = 1.0 +offset_bottom = 995.0 grow_horizontal = 2 -grow_vertical = 2 -[node name="Label" type="Label" parent="SmoothScrollContainer/HBoxContainer/Control/VBoxContainer"] +[node name="PanelContainer" type="PanelContainer" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer"] layout_mode = 2 -theme_override_styles/normal = SubResource("StyleBoxFlat_x88v0") -autowrap_mode = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_knn3o") -[node name="HBoxContainer" type="HBoxContainer" parent="SmoothScrollContainer/HBoxContainer/Control/VBoxContainer"] +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/PanelContainer"] layout_mode = 2 +alignment = 1 -[node name="Button" type="Button" parent="SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"] +[node name="TextureRect" type="TextureRect" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/PanelContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("3_eycho") +expand_mode = 2 + +[node name="Label" type="Label" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/PanelContainer/HBoxContainer"] +layout_mode = 2 +text = "Panku Console [] +© 2022-present Panku Console contributors. +© 2022 Ark2000. +" + +[node name="Label" type="Label" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer"] +layout_mode = 2 +text = "Panku Console is a feature-packed real-time debugging toolkit for Godot Engine." +clip_text = true + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer"] +layout_mode = 2 + +[node name="ProjectPageButton" type="Button" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"] layout_mode = 2 size_flags_horizontal = 3 +theme_override_fonts/font = SubResource("FontVariation_v70xy") text = "Project Page" -[node name="Button2" type="Button" parent="SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"] +[node name="CheckUpdateButton" type="Button" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"] layout_mode = 2 size_flags_horizontal = 3 +theme_override_fonts/font = SubResource("FontVariation_v70xy") text = "Check Update" -[editable path="SmoothScrollContainer"] +[node name="HSeparator" type="HSeparator" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer"] +layout_mode = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer"] +layout_mode = 2 + +[node name="Label" type="Label" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_fonts/font = SubResource("FontVariation_wgi7f") +text = "Project Manager" + +[node name="Button" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/VBoxContainer" instance=ExtResource("4_cqu2c")] +layout_mode = 2 +text = "Feo Wu (Ark2000)" +url = "https://github.com/Ark2000" + +[node name="Label2" type="Label" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_fonts/font = SubResource("FontVariation_wgi7f") +text = "Contributors" + +[node name="Button2" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/VBoxContainer" instance=ExtResource("4_cqu2c")] +layout_mode = 2 +text = "Feo Wu (Ark2000)" +url = "https://github.com/Ark2000" + +[node name="Button3" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/VBoxContainer" instance=ExtResource("4_cqu2c")] +layout_mode = 2 +text = "Rafael Correa (scriptsengineer)" +url = "https://github.com/scriptsengineer" + +[node name="Button4" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/VBoxContainer" instance=ExtResource("4_cqu2c")] +layout_mode = 2 +text = "worron" +url = "https://github.com/worron" + +[node name="Button5" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/VBoxContainer" instance=ExtResource("4_cqu2c")] +layout_mode = 2 +text = "mieldepoche" +url = "https://github.com/mieldepoche" + +[node name="Button6" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/VBoxContainer" instance=ExtResource("4_cqu2c")] +layout_mode = 2 +text = "Eggbertx" +url = "https://github.com/Eggbertx" + +[node name="Button7" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/VBoxContainer" instance=ExtResource("4_cqu2c")] +layout_mode = 2 +text = "univeous" +url = "https://github.com/univeous" + +[node name="Button8" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/VBoxContainer" instance=ExtResource("4_cqu2c")] +layout_mode = 2 +text = "CheapMeow" +url = "https://github.com/CheapMeow" + +[node name="Button9" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/VBoxContainer" instance=ExtResource("4_cqu2c")] +layout_mode = 2 +text = "winston-yallow (Winston)" +url = "https://github.com/winston-yallow" + +[node name="Label3" type="Label" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_fonts/font = SubResource("FontVariation_wgi7f") +text = "Icons" + +[node name="Button10" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/VBoxContainer" instance=ExtResource("4_cqu2c")] +layout_mode = 2 +text = "SVG Repo" +url = "https://www.svgrepo.com/page/licensing/" + +[node name="Label4" type="Label" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_fonts/font = SubResource("FontVariation_wgi7f") +text = "License" + +[node name="Label5" type="Label" parent="VBoxContainer/SmoothScrollContainer/HBoxContainer/Control/VBoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_fonts/font = SubResource("SystemFont_6on77") +theme_override_styles/normal = SubResource("StyleBoxFlat_cqcex") +text = "The MIT License (MIT) + +Copyright (c) 2022-present Panku Console contributors. +Copyright (c) 2022 Ark2000 + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the \"Software\"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." +clip_text = true + +[editable path="VBoxContainer/SmoothScrollContainer"] diff --git a/addons/panku_console/modules/about/url_button.gd b/addons/panku_console/modules/about/url_button.gd new file mode 100644 index 0000000..97a4e1a --- /dev/null +++ b/addons/panku_console/modules/about/url_button.gd @@ -0,0 +1,9 @@ +extends Button + +@export var url:String + +func _ready(): + pressed.connect( + func(): + OS.shell_open(url) + ) diff --git a/addons/panku_console/modules/about/url_button.tscn b/addons/panku_console/modules/about/url_button.tscn new file mode 100644 index 0000000..72236a3 --- /dev/null +++ b/addons/panku_console/modules/about/url_button.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=3 format=3 uid="uid://cxmplwhfv5l88"] + +[ext_resource type="Script" path="res://addons/panku_console/modules/about/url_button.gd" id="1_01blg"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ivnlg"] +content_margin_left = 8.0 +bg_color = Color(0, 0, 0, 0.243137) +corner_radius_top_left = 4 +corner_radius_top_right = 4 +corner_radius_bottom_right = 4 +corner_radius_bottom_left = 4 + +[node name="Button" type="Button"] +theme_override_styles/normal = SubResource("StyleBoxFlat_ivnlg") +text = "Button Text" +alignment = 0 +script = ExtResource("1_01blg") diff --git a/addons/panku_console/modules/data_controller/exporter/joystick_button.gd b/addons/panku_console/modules/data_controller/exporter/joystick_button.gd index 880aa72..7512881 100644 --- a/addons/panku_console/modules/data_controller/exporter/joystick_button.gd +++ b/addons/panku_console/modules/data_controller/exporter/joystick_button.gd @@ -1,17 +1,21 @@ -extends Button +extends PankuButton signal value_changed(delta:Vector2) var prev_mouse_mode var prev_mouse_pos -func _gui_input(e:InputEvent): - if e is InputEventMouseButton and e.button_index == MOUSE_BUTTON_LEFT and e.pressed: - prev_mouse_mode = DisplayServer.mouse_get_mode() - prev_mouse_pos = get_viewport().get_mouse_position() - DisplayServer.mouse_set_mode(DisplayServer.MOUSE_MODE_CAPTURED) - if e is InputEventMouseMotion and e.button_mask != MOUSE_BUTTON_NONE: - value_changed.emit(e.relative) - if e is InputEventMouseButton and e.button_index == MOUSE_BUTTON_LEFT and !e.pressed: - DisplayServer.mouse_set_mode(prev_mouse_mode) - DisplayServer.warp_mouse(prev_mouse_pos) +func _ready(): + super._ready() + button.gui_input.connect( + func(e:InputEvent): + if e is InputEventMouseButton and e.button_index == MOUSE_BUTTON_LEFT and e.pressed: + prev_mouse_mode = DisplayServer.mouse_get_mode() + prev_mouse_pos = get_viewport().get_mouse_position() + DisplayServer.mouse_set_mode(DisplayServer.MOUSE_MODE_CAPTURED) + if e is InputEventMouseMotion and e.button_mask != MOUSE_BUTTON_NONE: + value_changed.emit(e.relative) + if e is InputEventMouseButton and e.button_index == MOUSE_BUTTON_LEFT and !e.pressed: + DisplayServer.mouse_set_mode(prev_mouse_mode) + DisplayServer.warp_mouse(prev_mouse_pos) + ) diff --git a/addons/panku_console/modules/data_controller/exporter/row_bool.tscn b/addons/panku_console/modules/data_controller/exporter/row_bool.tscn index 05c96f7..de55943 100644 --- a/addons/panku_console/modules/data_controller/exporter/row_bool.tscn +++ b/addons/panku_console/modules/data_controller/exporter/row_bool.tscn @@ -3,35 +3,23 @@ [ext_resource type="Script" path="res://addons/panku_console/modules/data_controller/exporter/row_ui_bool.gd" id="1_n4ai0"] [ext_resource type="Theme" uid="uid://bk18yfu0d77wk" path="res://addons/panku_console/res/panku_console_theme.tres" id="1_u58sr"] -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xi8jw"] +[sub_resource type="SystemFont" id="SystemFont_l1ss8"] +font_names = PackedStringArray("Monospace") +font_weight = 900 -[node name="RowBool" type="HBoxContainer" node_paths=PackedStringArray("check_box", "label", "label_btn")] +[node name="RowBool" type="HBoxContainer" node_paths=PackedStringArray("label_btn")] theme = ExtResource("1_u58sr") script = ExtResource("1_n4ai0") -check_box = NodePath("CheckBox") -label = NodePath("Label") -label_btn = NodePath("Label/Button") +label_btn = NodePath("Button") [node name="VName" type="Label" parent="."] custom_minimum_size = Vector2(80, 0) layout_mode = 2 text = "value3" - -[node name="CheckBox" type="CheckBox" parent="."] -layout_mode = 2 -theme_override_styles/focus = SubResource("StyleBoxEmpty_xi8jw") -flat = true - -[node name="Label" type="Label" parent="."] -layout_mode = 2 -text = "Off" vertical_alignment = 1 -[node name="Button" type="Button" parent="Label"] -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -flat = true +[node name="Button" type="Button" parent="."] +layout_mode = 2 +theme_override_fonts/font = SubResource("SystemFont_l1ss8") +toggle_mode = true +text = "[OFF] / ON" diff --git a/addons/panku_console/modules/data_controller/exporter/row_button.tscn b/addons/panku_console/modules/data_controller/exporter/row_button.tscn index 24deab7..c7a1bf3 100644 --- a/addons/panku_console/modules/data_controller/exporter/row_button.tscn +++ b/addons/panku_console/modules/data_controller/exporter/row_button.tscn @@ -3,5 +3,9 @@ [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_07gid"] [node name="RowButton" type="Button"] +offset_right = 80.0 +offset_bottom = 31.0 +size_flags_horizontal = 3 +focus_mode = 0 theme_override_styles/focus = SubResource("StyleBoxEmpty_07gid") text = "Generate" diff --git a/addons/panku_console/modules/data_controller/exporter/row_comment.tscn b/addons/panku_console/modules/data_controller/exporter/row_comment.tscn index f064329..a146b69 100644 --- a/addons/panku_console/modules/data_controller/exporter/row_comment.tscn +++ b/addons/panku_console/modules/data_controller/exporter/row_comment.tscn @@ -1,43 +1,30 @@ [gd_scene load_steps=5 format=3 uid="uid://cxnpwuiumbs85"] [ext_resource type="Script" path="res://addons/panku_console/modules/data_controller/exporter/row_ui_comment.gd" id="1_dvooy"] -[ext_resource type="Texture2D" uid="uid://dxvodkcmn4pa8" path="res://addons/panku_console/res/icons2/info.svg" id="2_4ydeb"] +[ext_resource type="Theme" uid="uid://bk18yfu0d77wk" path="res://addons/panku_console/res/panku_console_theme.tres" id="1_wu8ma"] +[ext_resource type="PackedScene" uid="uid://drn5t13m088fb" path="res://addons/panku_console/common/panku_button.tscn" id="3_wi42w"] +[ext_resource type="Texture2D" uid="uid://b6jt0ggmuoyeb" path="res://addons/panku_console/res/icons2/info2.svg" id="4_o8r6v"] -[sub_resource type="FontVariation" id="FontVariation_aaho5"] -variation_transform = Transform2D(1, 0.28, 0, 1, 0, 0) - -[sub_resource type="LabelSettings" id="LabelSettings_3tgnd"] -font = SubResource("FontVariation_aaho5") -font_size = 14 -font_color = Color(0.784314, 0.784314, 0.784314, 1) - -[node name="RowComment" type="HBoxContainer" node_paths=PackedStringArray("container", "label")] +[node name="RowComment" type="HBoxContainer" node_paths=PackedStringArray("label")] custom_minimum_size = Vector2(20, 20) -offset_right = 226.0 -offset_bottom = 20.0 +offset_right = 148.0 +offset_bottom = 31.0 size_flags_horizontal = 3 +theme = ExtResource("1_wu8ma") script = ExtResource("1_dvooy") -container = NodePath("Control") -label = NodePath("Control/Label") +label = NodePath("PankuButton/HBoxContainer/Label") -[node name="TextureRect" type="TextureRect" parent="."] -custom_minimum_size = Vector2(20, 20) +[node name="PankuButton" parent="." instance=ExtResource("3_wi42w")] layout_mode = 2 -texture = ExtResource("2_4ydeb") -expand_mode = 1 -stretch_mode = 5 +size_flags_horizontal = 3 -[node name="Control" type="Control" parent="."] -clip_contents = true -layout_mode = 2 +[node name="TextureRect" parent="PankuButton/HBoxContainer" index="0"] +texture = ExtResource("4_o8r6v") + +[node name="Label" parent="PankuButton/HBoxContainer" index="1"] +modulate = Color(0.598845, 0.764704, 0.931026, 0.529412) size_flags_horizontal = 3 +text = "Comment" +clip_text = true -[node name="Label" type="Label" parent="Control"] -layout_mode = 1 -anchors_preset = 9 -anchor_bottom = 1.0 -offset_right = 1.0 -grow_vertical = 2 -text = "aaa" -label_settings = SubResource("LabelSettings_3tgnd") -vertical_alignment = 1 +[editable path="PankuButton"] diff --git a/addons/panku_console/modules/data_controller/exporter/row_float.tscn b/addons/panku_console/modules/data_controller/exporter/row_float.tscn index e99e9b2..e878d70 100644 --- a/addons/panku_console/modules/data_controller/exporter/row_float.tscn +++ b/addons/panku_console/modules/data_controller/exporter/row_float.tscn @@ -1,13 +1,14 @@ -[gd_scene load_steps=4 format=3 uid="uid://bneg4nt6ryuuj"] +[gd_scene load_steps=5 format=3 uid="uid://bneg4nt6ryuuj"] [ext_resource type="Script" path="res://addons/panku_console/modules/data_controller/exporter/row_ui_float.gd" id="1_8dioj"] +[ext_resource type="PackedScene" uid="uid://drn5t13m088fb" path="res://addons/panku_console/common/panku_button.tscn" id="2_5rj7f"] [ext_resource type="Texture2D" uid="uid://bc2g8vv0x3d8y" path="res://addons/panku_console/res/icons2/swap_horiz.svg" id="2_lyxit"] [ext_resource type="Script" path="res://addons/panku_console/modules/data_controller/exporter/joystick_button.gd" id="3_ee2gx"] [node name="RowFloat" type="HBoxContainer" node_paths=PackedStringArray("line_edit", "joystick_button")] script = ExtResource("1_8dioj") line_edit = NodePath("LineEdit") -joystick_button = NodePath("Button") +joystick_button = NodePath("PankuButton") [node name="VName" type="Label" parent="."] custom_minimum_size = Vector2(80, 0) @@ -19,10 +20,14 @@ layout_mode = 2 size_flags_horizontal = 3 text = "433.24" -[node name="Button" type="Button" parent="."] -texture_filter = 4 -custom_minimum_size = Vector2(20, 0) +[node name="PankuButton" parent="." instance=ExtResource("2_5rj7f")] layout_mode = 2 -icon = ExtResource("2_lyxit") -expand_icon = true script = ExtResource("3_ee2gx") + +[node name="TextureRect" parent="PankuButton/HBoxContainer" index="0"] +texture = ExtResource("2_lyxit") + +[node name="Label" parent="PankuButton/HBoxContainer" index="1"] +text = "" + +[editable path="PankuButton"] diff --git a/addons/panku_console/modules/data_controller/exporter/row_group_button.tscn b/addons/panku_console/modules/data_controller/exporter/row_group_button.tscn index 73f0889..43a7db9 100644 --- a/addons/panku_console/modules/data_controller/exporter/row_group_button.tscn +++ b/addons/panku_console/modules/data_controller/exporter/row_group_button.tscn @@ -1,18 +1,8 @@ -[gd_scene load_steps=7 format=3 uid="uid://78evbpdhqe4b"] +[gd_scene load_steps=5 format=3 uid="uid://78evbpdhqe4b"] [ext_resource type="Texture2D" uid="uid://ws58gucuygx1" path="res://addons/panku_console/res/icons2/chevron_right.svg" id="1_sddod"] [ext_resource type="Script" path="res://addons/panku_console/modules/data_controller/exporter/row_group_button.gd" id="2_7jdni"] -[sub_resource type="SystemFont" id="SystemFont_bascj"] -font_names = PackedStringArray("Sans-Serif") -subpixel_positioning = 0 - -[sub_resource type="FontVariation" id="FontVariation_laq2y"] -base_font = SubResource("SystemFont_bascj") -variation_embolden = 1.0 -spacing_top = 4 -spacing_bottom = 4 - [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_gpngf"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wmca1"] @@ -27,8 +17,6 @@ border_color = Color(0, 0.596078, 0.85098, 0.25098) custom_minimum_size = Vector2(0, 20) offset_right = 169.0 offset_bottom = 27.0 -theme_override_fonts/font = SubResource("FontVariation_laq2y") -theme_override_font_sizes/font_size = 16 theme_override_styles/focus = SubResource("StyleBoxEmpty_gpngf") toggle_mode = true text = "Group_1" diff --git a/addons/panku_console/modules/data_controller/exporter/row_int.tscn b/addons/panku_console/modules/data_controller/exporter/row_int.tscn index 2378570..1e8f858 100644 --- a/addons/panku_console/modules/data_controller/exporter/row_int.tscn +++ b/addons/panku_console/modules/data_controller/exporter/row_int.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=4 format=3 uid="uid://cnsnrihcgjsa"] +[gd_scene load_steps=5 format=3 uid="uid://cnsnrihcgjsa"] [ext_resource type="Script" path="res://addons/panku_console/modules/data_controller/exporter/row_ui_int.gd" id="1_gi50r"] +[ext_resource type="PackedScene" uid="uid://drn5t13m088fb" path="res://addons/panku_console/common/panku_button.tscn" id="2_cfn1u"] [ext_resource type="Texture2D" uid="uid://dnexm7u6lq3km" path="res://addons/panku_console/res/icons2/remove.svg" id="2_ityxl"] [ext_resource type="Texture2D" uid="uid://dprpfr0l5xvmu" path="res://addons/panku_console/res/icons2/add.svg" id="3_3vcaq"] @@ -15,21 +16,28 @@ custom_minimum_size = Vector2(80, 0) layout_mode = 2 text = "value3" -[node name="Button" type="Button" parent="."] -texture_filter = 4 -custom_minimum_size = Vector2(20, 0) +[node name="Button" parent="." instance=ExtResource("2_cfn1u")] layout_mode = 2 -icon = ExtResource("2_ityxl") -expand_icon = true + +[node name="TextureRect" parent="Button/HBoxContainer" index="0"] +texture = ExtResource("2_ityxl") + +[node name="Label" parent="Button/HBoxContainer" index="1"] +text = "" [node name="LineEdit" type="LineEdit" parent="."] layout_mode = 2 size_flags_horizontal = 3 text = "12345" -[node name="Button2" type="Button" parent="."] -texture_filter = 4 -custom_minimum_size = Vector2(20, 0) +[node name="Button2" parent="." instance=ExtResource("2_cfn1u")] layout_mode = 2 -icon = ExtResource("3_3vcaq") -expand_icon = true + +[node name="TextureRect" parent="Button2/HBoxContainer" index="0"] +texture = ExtResource("3_3vcaq") + +[node name="Label" parent="Button2/HBoxContainer" index="1"] +text = "" + +[editable path="Button"] +[editable path="Button2"] diff --git a/addons/panku_console/modules/data_controller/exporter/row_ui_bool.gd b/addons/panku_console/modules/data_controller/exporter/row_ui_bool.gd index f3178ae..04a4e59 100644 --- a/addons/panku_console/modules/data_controller/exporter/row_ui_bool.gd +++ b/addons/panku_console/modules/data_controller/exporter/row_ui_bool.gd @@ -1,22 +1,32 @@ extends "./row_ui.gd" -@export var check_box:CheckBox -@export var label:Label @export var label_btn:Button func get_ui_val() -> bool: - return check_box.button_pressed + return label_btn.button_pressed func update_ui(val:bool): - check_box.button_pressed = val - label.text = "ON" if val else "OFF" + label_btn.button_pressed = val + if val: + label_btn.text = "[x] ON" + set_font_color(label_btn, Color("#3ab38f")) + else: + label_btn.text = "[ ] OFF" + set_font_color(label_btn, Color("#b25566")) + +# wtf +static func set_font_color(node, color): + node.set("theme_override_colors/font_color", color) + node.set("theme_override_colors/font_pressed_color", color) + node.set("theme_override_colors/font_hover_color", color) + node.set("theme_override_colors/font_focus_color", color) + node.set("theme_override_colors/font_disabled_color", color) + node.set("theme_override_colors/font_hover_pressed_color", color) + node.set("theme_override_colors/font_outline_color", color) func _ready(): - check_box.toggled.connect( + update_ui(false) + label_btn.toggled.connect( func(_s): ui_val_changed.emit(get_ui_val()) ) - label_btn.pressed.connect( - func(): - check_box.button_pressed = !check_box.button_pressed - ) diff --git a/addons/panku_console/modules/data_controller/exporter/row_ui_comment.gd b/addons/panku_console/modules/data_controller/exporter/row_ui_comment.gd index 6fb18f8..365e023 100644 --- a/addons/panku_console/modules/data_controller/exporter/row_ui_comment.gd +++ b/addons/panku_console/modules/data_controller/exporter/row_ui_comment.gd @@ -1,43 +1,9 @@ extends HBoxContainer -@export var container:Control @export var label:Label -var state := "s1" -var t := 0.0 -var d := 0.0 - -func _process(delta:float) -> void: - d = label.size.x - container.size.x - t -= delta - call(state, delta) - -func s1(_delta:float): - if d > 0: - t = 1.0 - state = "s2" - -func s2(_delta:float): - if d <= 0: - state = "s1" - return - if t <= 0: - state = "s3" - label.position.x = 0 - -func s3(delta:float): - if d <= 0: - state = "s1" - label.position.x = 0 - return - if label.position.x + d < 0.1: - t = 1.0 - state = "s4" - return - label.position.x -= delta * 30.0 - label.position.x = max(-d, label.position.x) - -func s4(_delta:float): - if d <= 0 or t <= 0: - state = "s1" - label.position.x = 0 +func _ready(): + $PankuButton.pressed.connect( + func(): + Panku.notify(label.text) + ) diff --git a/addons/panku_console/modules/data_controller/exporter/row_ui_float.gd b/addons/panku_console/modules/data_controller/exporter/row_ui_float.gd index 74fe287..9e62d0d 100644 --- a/addons/panku_console/modules/data_controller/exporter/row_ui_float.gd +++ b/addons/panku_console/modules/data_controller/exporter/row_ui_float.gd @@ -1,9 +1,7 @@ extends "./row_ui.gd" -const JoystickButton = preload("./joystick_button.gd") - @export var line_edit:LineEdit -@export var joystick_button:Button +@export var joystick_button:PankuButton func get_ui_val(): return line_edit.text.to_float() @@ -23,7 +21,7 @@ func _ready(): func(): ui_val_changed.emit(get_ui_val()) ) - var j_button:JoystickButton = joystick_button + var j_button = joystick_button j_button.value_changed.connect( func(delta:Vector2): update_ui(get_ui_val() + delta.x) diff --git a/addons/panku_console/modules/data_controller/exporter/row_ui_int.gd b/addons/panku_console/modules/data_controller/exporter/row_ui_int.gd index 95fd5b9..bed1d9a 100644 --- a/addons/panku_console/modules/data_controller/exporter/row_ui_int.gd +++ b/addons/panku_console/modules/data_controller/exporter/row_ui_int.gd @@ -1,8 +1,8 @@ extends "./row_ui.gd" @export var line_edit:LineEdit -@export var button_inc:Button -@export var button_dec:Button +@export var button_inc:PankuButton +@export var button_dec:PankuButton func get_ui_val(): return line_edit.text.to_int() diff --git a/addons/panku_console/modules/data_controller/exporter/row_ui_vec2.gd b/addons/panku_console/modules/data_controller/exporter/row_ui_vec2.gd index 5f8aae3..82c6bb9 100644 --- a/addons/panku_console/modules/data_controller/exporter/row_ui_vec2.gd +++ b/addons/panku_console/modules/data_controller/exporter/row_ui_vec2.gd @@ -1,10 +1,8 @@ extends "./row_ui.gd" -const JoystickButton = preload("./joystick_button.gd") - @export var line_edit_x:LineEdit @export var line_edit_y:LineEdit -@export var joystick_button:Button +@export var joystick_button:PankuButton func get_ui_val(): return Vector2( @@ -34,7 +32,7 @@ func _ready(): line_edit_y.focus_exited.connect( func(): ui_val_changed.emit(get_ui_val()) ) - var j_button:JoystickButton = joystick_button + var j_button = joystick_button j_button.value_changed.connect( func(delta:Vector2): update_ui(get_ui_val() + delta) diff --git a/addons/panku_console/modules/data_controller/exporter/row_vec_2.tscn b/addons/panku_console/modules/data_controller/exporter/row_vec_2.tscn index 868d869..84a5b03 100644 --- a/addons/panku_console/modules/data_controller/exporter/row_vec_2.tscn +++ b/addons/panku_console/modules/data_controller/exporter/row_vec_2.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=4 format=3 uid="uid://cj0urmvj2rtas"] +[gd_scene load_steps=5 format=3 uid="uid://cj0urmvj2rtas"] [ext_resource type="Script" path="res://addons/panku_console/modules/data_controller/exporter/row_ui_vec2.gd" id="1_s5o20"] +[ext_resource type="PackedScene" uid="uid://drn5t13m088fb" path="res://addons/panku_console/common/panku_button.tscn" id="2_4ivrv"] [ext_resource type="Texture2D" uid="uid://b22jdciwq07ic" path="res://addons/panku_console/res/icons2/open_with.svg" id="2_8vcdr"] [ext_resource type="Script" path="res://addons/panku_console/modules/data_controller/exporter/joystick_button.gd" id="3_bw70a"] @@ -8,7 +9,7 @@ script = ExtResource("1_s5o20") line_edit_x = NodePath("LineEdit") line_edit_y = NodePath("LineEdit2") -joystick_button = NodePath("JoystickButton") +joystick_button = NodePath("PankuButton") [node name="VName" type="Label" parent="."] custom_minimum_size = Vector2(80, 0) @@ -31,10 +32,14 @@ text = "y" layout_mode = 2 size_flags_horizontal = 3 -[node name="JoystickButton" type="Button" parent="."] -texture_filter = 4 -custom_minimum_size = Vector2(20, 0) +[node name="PankuButton" parent="." instance=ExtResource("2_4ivrv")] layout_mode = 2 -icon = ExtResource("2_8vcdr") -expand_icon = true script = ExtResource("3_bw70a") + +[node name="TextureRect" parent="PankuButton/HBoxContainer" index="0"] +texture = ExtResource("2_8vcdr") + +[node name="Label" parent="PankuButton/HBoxContainer" index="1"] +text = "" + +[editable path="PankuButton"] diff --git a/addons/panku_console/modules/expression_monitor/expression_item.tscn b/addons/panku_console/modules/expression_monitor/expression_item.tscn index ba2f90d..21d307c 100644 --- a/addons/panku_console/modules/expression_monitor/expression_item.tscn +++ b/addons/panku_console/modules/expression_monitor/expression_item.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=3 format=3 uid="uid://om8bp40jo1e"] +[gd_scene load_steps=4 format=3 uid="uid://om8bp40jo1e"] [ext_resource type="Script" path="res://addons/panku_console/modules/expression_monitor/expression_item.gd" id="1_dnu23"] -[ext_resource type="Texture2D" uid="uid://ttbgv1vr1xsc" path="res://addons/panku_console/res/icons2/close_20x.svg" id="1_reta7"] +[ext_resource type="Texture2D" uid="uid://8g5afcuanbl6" path="res://addons/panku_console/res/icons2/close.svg" id="2_bc3ds"] +[ext_resource type="PackedScene" uid="uid://drn5t13m088fb" path="res://addons/panku_console/common/panku_button.tscn" id="3_n03xa"] [node name="VBoxContainer" type="VBoxContainer" node_paths=PackedStringArray("x_btn", "ledit", "label")] anchors_preset = 10 @@ -10,16 +11,18 @@ offset_bottom = 31.0 grow_horizontal = 2 size_flags_horizontal = 3 script = ExtResource("1_dnu23") -x_btn = NodePath("expression_item/Button") +x_btn = NodePath("expression_item/PankuButton/Button") ledit = NodePath("expression_item/LineEdit") label = NodePath("HBoxContainer/Label") [node name="expression_item" type="HBoxContainer" parent="."] layout_mode = 2 -[node name="Button" type="Button" parent="expression_item"] +[node name="PankuButton" parent="expression_item" instance=ExtResource("3_n03xa")] layout_mode = 2 -icon = ExtResource("1_reta7") + +[node name="TextureRect" parent="expression_item/PankuButton/HBoxContainer" index="0"] +texture = ExtResource("2_bc3ds") [node name="LineEdit" type="LineEdit" parent="expression_item"] layout_mode = 2 @@ -39,3 +42,5 @@ color = Color(0.239216, 0.533333, 0.886275, 0.752941) layout_mode = 2 size_flags_horizontal = 3 autowrap_mode = 1 + +[editable path="expression_item/PankuButton"] diff --git a/addons/panku_console/modules/expression_monitor/monitor_group_ui.gd b/addons/panku_console/modules/expression_monitor/monitor_group_ui.gd index ac559d6..ed14634 100644 --- a/addons/panku_console/modules/expression_monitor/monitor_group_ui.gd +++ b/addons/panku_console/modules/expression_monitor/monitor_group_ui.gd @@ -11,17 +11,17 @@ const collapse_icon:Texture2D = preload("res://addons/panku_console/res/icons2/e @onready var group_toggle_button:Button = $GroupManager/ToggleButton @onready var rename_line_edit:LineEdit = $GroupManager/RenameLineEdit -@onready var state_control_button:Button = $GroupManager/StateControlButton -@onready var rename_button:Button = $GroupManager/RenameButton -@onready var confirm_rename_button:Button = $GroupManager/ConfirmRenameButton -@onready var cancel_rename_button:Button = $GroupManager/CancelRenameButton -@onready var move_up_button:Button = $GroupManager/MoveUpButton -@onready var move_down_button:Button = $GroupManager/MoveDownButton +@onready var state_control_button:PankuButton = $GroupManager/StateControlButton +@onready var rename_button:PankuButton = $GroupManager/RenameButton +@onready var confirm_rename_button:PankuButton = $GroupManager/ConfirmRenameButton +@onready var cancel_rename_button:PankuButton = $GroupManager/CancelRenameButton +@onready var move_up_button:PankuButton = $GroupManager/MoveUpButton +@onready var move_down_button:PankuButton = $GroupManager/MoveDownButton @onready var exp_body_container:Control = $PanelContainer @onready var exp_container:Control = $PanelContainer/VBoxContainer/ExpressionContainer @onready var add_exp_button:Button = $PanelContainer/VBoxContainer/AddNewExpressionButton -@onready var remove_this_group_button:Button = $GroupManager/RemoveButton +@onready var remove_this_group_button:PankuButton = $GroupManager/RemoveButton @onready var normal_ui_group:Array = [ group_toggle_button, @@ -57,9 +57,9 @@ func _ready(): exp_container.add_child(exp_item) ) - state_control_button.toggle_mode = true - state_control_button.button_pressed = false - state_control_button.toggled.connect( + state_control_button.button.toggle_mode = true + state_control_button.button.button_pressed = false + state_control_button.button.toggled.connect( func(button_pressed:bool): state_control_button.icon = pause_icon if button_pressed else play_icon ) @@ -104,7 +104,7 @@ func _ready(): func get_expressions(show_hidden := false) -> Array: # optimization? var exps = [] - if state_control_button.button_pressed or show_hidden: + if state_control_button.button.button_pressed or show_hidden: for child in exp_container.get_children(): exps.append(child.get_expr()) return exps diff --git a/addons/panku_console/modules/expression_monitor/monitor_group_ui.tscn b/addons/panku_console/modules/expression_monitor/monitor_group_ui.tscn index 460a292..bceed67 100644 --- a/addons/panku_console/modules/expression_monitor/monitor_group_ui.tscn +++ b/addons/panku_console/modules/expression_monitor/monitor_group_ui.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=16 format=3 uid="uid://dlnkho5p7p2aq"] +[gd_scene load_steps=17 format=3 uid="uid://dlnkho5p7p2aq"] [ext_resource type="Theme" uid="uid://bk18yfu0d77wk" path="res://addons/panku_console/res/panku_console_theme.tres" id="1_5nvur"] [ext_resource type="Script" path="res://addons/panku_console/modules/expression_monitor/monitor_group_ui.gd" id="1_b5egi"] @@ -8,6 +8,7 @@ [ext_resource type="Texture2D" uid="uid://8g5afcuanbl6" path="res://addons/panku_console/res/icons2/close.svg" id="4_2d3kd"] [ext_resource type="Texture2D" uid="uid://brf6iwx4r6bdd" path="res://addons/panku_console/res/icons2/rename-svgrepo-com.svg" id="4_3tm8i"] [ext_resource type="Gradient" uid="uid://nr65cgweqh8n" path="res://addons/panku_console/res/green_gradient_1d.tres" id="4_gsqii"] +[ext_resource type="PackedScene" uid="uid://drn5t13m088fb" path="res://addons/panku_console/common/panku_button.tscn" id="5_6smru"] [ext_resource type="Texture2D" uid="uid://d0k813mm5y0d5" path="res://addons/panku_console/res/icons2/arrow-up-md-svgrepo-com.svg" id="5_xed2e"] [ext_resource type="Texture2D" uid="uid://cdxbns8lyctqp" path="res://addons/panku_console/res/icons2/arrow-down-svgrepo-com.svg" id="6_168yw"] [ext_resource type="PackedScene" uid="uid://om8bp40jo1e" path="res://addons/panku_console/modules/expression_monitor/expression_item.tscn" id="9_2py4a"] @@ -46,6 +47,7 @@ text = "Default Group" icon = ExtResource("1_k5xby") flat = true alignment = 0 +expand_icon = true [node name="TextureRect" type="TextureRect" parent="GroupManager/ToggleButton"] show_behind_parent = true @@ -65,37 +67,51 @@ layout_mode = 2 size_flags_horizontal = 3 text = "Default Group" -[node name="StateControlButton" type="Button" parent="GroupManager"] +[node name="StateControlButton" parent="GroupManager" instance=ExtResource("5_6smru")] layout_mode = 2 -icon = ExtResource("2_wnb5s") -[node name="RenameButton" type="Button" parent="GroupManager"] +[node name="TextureRect" parent="GroupManager/StateControlButton/HBoxContainer" index="0"] +texture = ExtResource("2_wnb5s") + +[node name="RenameButton" parent="GroupManager" instance=ExtResource("5_6smru")] layout_mode = 2 -icon = ExtResource("4_3tm8i") -[node name="ConfirmRenameButton" type="Button" parent="GroupManager"] +[node name="TextureRect" parent="GroupManager/RenameButton/HBoxContainer" index="0"] +texture = ExtResource("4_3tm8i") + +[node name="ConfirmRenameButton" parent="GroupManager" instance=ExtResource("5_6smru")] visible = false layout_mode = 2 -icon = ExtResource("3_h1h1v") -[node name="CancelRenameButton" type="Button" parent="GroupManager"] +[node name="TextureRect" parent="GroupManager/ConfirmRenameButton/HBoxContainer" index="0"] +texture = ExtResource("3_h1h1v") + +[node name="CancelRenameButton" parent="GroupManager" instance=ExtResource("5_6smru")] visible = false layout_mode = 2 -icon = ExtResource("4_2d3kd") -[node name="MoveUpButton" type="Button" parent="GroupManager"] +[node name="TextureRect" parent="GroupManager/CancelRenameButton/HBoxContainer" index="0"] +texture = ExtResource("4_2d3kd") + +[node name="MoveUpButton" parent="GroupManager" instance=ExtResource("5_6smru")] visible = false layout_mode = 2 -icon = ExtResource("5_xed2e") -[node name="MoveDownButton" type="Button" parent="GroupManager"] +[node name="TextureRect" parent="GroupManager/MoveUpButton/HBoxContainer" index="0"] +texture = ExtResource("5_xed2e") + +[node name="MoveDownButton" parent="GroupManager" instance=ExtResource("5_6smru")] visible = false layout_mode = 2 -icon = ExtResource("6_168yw") -[node name="RemoveButton" type="Button" parent="GroupManager"] +[node name="TextureRect" parent="GroupManager/MoveDownButton/HBoxContainer" index="0"] +texture = ExtResource("6_168yw") + +[node name="RemoveButton" parent="GroupManager" instance=ExtResource("5_6smru")] layout_mode = 2 -icon = ExtResource("10_jdwtu") + +[node name="TextureRect" parent="GroupManager/RemoveButton/HBoxContainer" index="0"] +texture = ExtResource("10_jdwtu") [node name="PanelContainer" type="PanelContainer" parent="."] layout_mode = 2 @@ -118,3 +134,12 @@ layout_mode = 2 text = "Add New Expression" icon = ExtResource("10_l2ajq") alignment = 0 +expand_icon = true + +[editable path="GroupManager/StateControlButton"] +[editable path="GroupManager/RenameButton"] +[editable path="GroupManager/ConfirmRenameButton"] +[editable path="GroupManager/CancelRenameButton"] +[editable path="GroupManager/MoveUpButton"] +[editable path="GroupManager/MoveDownButton"] +[editable path="GroupManager/RemoveButton"] diff --git a/addons/panku_console/modules/expression_monitor/monitor_groups_ui.gd b/addons/panku_console/modules/expression_monitor/monitor_groups_ui.gd index f59418f..c7349e4 100644 --- a/addons/panku_console/modules/expression_monitor/monitor_groups_ui.gd +++ b/addons/panku_console/modules/expression_monitor/monitor_groups_ui.gd @@ -46,6 +46,5 @@ func load_persistent_data(data:Array): for child in groups_container.get_children(): child.queue_free() for group_data in data: - var group_ui = group_prefab.instantiate() - groups_container.add_child(group_ui) + var group_ui = add_group() group_ui.load_persistent_data(group_data) diff --git a/addons/panku_console/modules/expression_monitor/monitor_groups_ui.tscn b/addons/panku_console/modules/expression_monitor/monitor_groups_ui.tscn index 39e9eee..3f67e27 100644 --- a/addons/panku_console/modules/expression_monitor/monitor_groups_ui.tscn +++ b/addons/panku_console/modules/expression_monitor/monitor_groups_ui.tscn @@ -28,3 +28,4 @@ layout_mode = 2 text = "Add New Group" icon = ExtResource("4_utrvo") alignment = 0 +expand_icon = true diff --git a/addons/panku_console/modules/general_settings/module.gd b/addons/panku_console/modules/general_settings/module.gd index c71d4f0..4d15ea7 100644 --- a/addons/panku_console/modules/general_settings/module.gd +++ b/addons/panku_console/modules/general_settings/module.gd @@ -17,12 +17,50 @@ func open_settings_window(): window = null ) +# Taken from https://github.com/godotengine/godot/blob/master/editor/editor_settings.cpp#L1539 +static func get_auto_display_scale() -> float: + var flag := false + match OS.get_name(): + "macOS": + flag = true + "Linux", "FreeBSD", "NetBSD", "OpenBSD", "BSD": + if DisplayServer.get_name() == "Wayland": + flag = true + "Android": + flag = true + "iOS": + flag = true + if flag: + return DisplayServer.screen_get_max_scale() + + var screen := DisplayServer.window_get_current_screen() + + if (DisplayServer.screen_get_size(screen) == Vector2i()): + # Invalid screen size, skip. + return 1.0 + + # Use the smallest dimension to use a correct display scale on portrait displays. + var smallest_dimension = min(DisplayServer.screen_get_size().x, DisplayServer.screen_get_size().y) + if DisplayServer.screen_get_dpi(screen) >= 192 and smallest_dimension >= 1400: + # hiDPI display. + return 2.0 + elif smallest_dimension >= 1700: + # Likely a hiDPI display, but we aren't certain due to the returned DPI. + # Use an intermediate scale to handle this situation. + return 1.5 + elif smallest_dimension <= 800: + # Small loDPI display. Use a smaller display scale so that editor elements fit more easily. + # Icons won't look great, but this is better than having editor elements overflow from its window. + return 0.75 + return 1.0 + func init_module(): # load settings get_module_opt().window_blur_effect = load_module_data("window_blur_effect", true) get_module_opt().window_base_color = load_module_data("window_base_color", Color("#000c1880")) get_module_opt().enable_os_window = load_module_data("enable_os_window", false) get_module_opt().os_window_bg_color = load_module_data("os_window_bg_color", Color(0, 0, 0, 0)) + get_module_opt().global_font_size = load_module_data("global_font_size", int(16 * get_auto_display_scale())) func quit_module(): super.quit_module() diff --git a/addons/panku_console/modules/general_settings/opt.gd b/addons/panku_console/modules/general_settings/opt.gd index 11907f2..348b1d5 100644 --- a/addons/panku_console/modules/general_settings/opt.gd +++ b/addons/panku_console/modules/general_settings/opt.gd @@ -25,6 +25,20 @@ extends ModuleOptions _module.core.windows_manager.set_os_window_bg_color(v) get: return _module.core.windows_manager.os_window_bg_color + +@export var global_font_size:int: + set(v): + Panku.windows_manager.theme.default_font_size = v + get: + return Panku.windows_manager.theme.default_font_size + +@export var export_comment_auto_global_font_size = ( + "Adjust global font size automatically according to your device DPI" +) + +@export var export_button_auto_global_font_size := "Auto Global Font Size" +func auto_global_font_size(): + global_font_size = int(16 * _module.get_auto_display_scale()) @export var export_button_report_bugs := "Report Bugs" func report_bugs(): diff --git a/addons/panku_console/modules/interactive_shell/console_logs/console_logs.gd b/addons/panku_console/modules/interactive_shell/console_logs/console_logs.gd index 7183c05..5010582 100644 --- a/addons/panku_console/modules/interactive_shell/console_logs/console_logs.gd +++ b/addons/panku_console/modules/interactive_shell/console_logs/console_logs.gd @@ -25,4 +25,5 @@ func set_font_size(sz:int): rlabel.set("theme_override_font_sizes/mono_font_size", sz) func get_font_size() -> int: - return rlabel.get("theme_override_font_sizes/normal_font_size") + #return rlabel.get("theme_override_font_sizes/normal_font_size") + return 12 diff --git a/addons/panku_console/modules/interactive_shell/console_logs/console_logs.tscn b/addons/panku_console/modules/interactive_shell/console_logs/console_logs.tscn index ddda1be..41232a5 100644 --- a/addons/panku_console/modules/interactive_shell/console_logs/console_logs.tscn +++ b/addons/panku_console/modules/interactive_shell/console_logs/console_logs.tscn @@ -1,25 +1,14 @@ -[gd_scene load_steps=7 format=3 uid="uid://nynkaa0igrh5"] +[gd_scene load_steps=4 format=3 uid="uid://nynkaa0igrh5"] [ext_resource type="Script" path="res://addons/panku_console/modules/interactive_shell/console_logs/console_logs.gd" id="1_3r4hk"] +[ext_resource type="Theme" uid="uid://bk18yfu0d77wk" path="res://addons/panku_console/res/panku_console_theme.tres" id="1_b2qej"] [ext_resource type="Script" path="res://addons/panku_console/common/smooth_scroll/smooth_scroll.gd" id="2_46ya8"] -[sub_resource type="SystemFont" id="SystemFont_gfwak"] -font_names = PackedStringArray("Consolas", "Monospace") -multichannel_signed_distance_field = true - -[sub_resource type="SystemFont" id="SystemFont_oh6n8"] -font_names = PackedStringArray("Consolas", "Monospace") -font_weight = 700 -multichannel_signed_distance_field = true - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_g8eap"] - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_52ub2"] - [node name="ConsoleLogs" type="MarginContainer" node_paths=PackedStringArray("rlabel")] clip_contents = true offset_right = 365.0 offset_bottom = 357.0 +theme = ExtResource("1_b2qej") theme_override_constants/margin_left = 8 theme_override_constants/margin_top = 8 theme_override_constants/margin_right = 8 @@ -48,12 +37,6 @@ anchors_preset = 10 anchor_right = 1.0 grow_horizontal = 2 focus_mode = 2 -theme_override_colors/default_color = Color(1, 1, 1, 0.878431) -theme_override_fonts/normal_font = SubResource("SystemFont_gfwak") -theme_override_fonts/bold_font = SubResource("SystemFont_oh6n8") -theme_override_font_sizes/normal_font_size = 14 -theme_override_styles/focus = SubResource("StyleBoxEmpty_g8eap") -theme_override_styles/normal = SubResource("StyleBoxEmpty_52ub2") bbcode_enabled = true fit_content = true context_menu_enabled = true diff --git a/addons/panku_console/modules/interactive_shell/console_ui/help_bar.tscn b/addons/panku_console/modules/interactive_shell/console_ui/help_bar.tscn index e889552..9582038 100644 --- a/addons/panku_console/modules/interactive_shell/console_ui/help_bar.tscn +++ b/addons/panku_console/modules/interactive_shell/console_ui/help_bar.tscn @@ -1,12 +1,9 @@ [gd_scene load_steps=2 format=3 uid="uid://cbijhl1nhy64n"] -[sub_resource type="SystemFont" id="SystemFont_88y8w"] -font_names = PackedStringArray("Sans-Serif") -font_italic = true -font_weight = 600 -subpixel_positioning = 0 +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_c7j4l"] +bg_color = Color(0.180392, 0.32549, 0.403922, 1) -[node name="HelpBar" type="ColorRect"] +[node name="HelpBar" type="PanelContainer"] anchors_preset = 12 anchor_top = 1.0 anchor_right = 1.0 @@ -15,16 +12,10 @@ offset_top = -50.0 offset_bottom = -26.0 grow_horizontal = 2 grow_vertical = 0 -color = Color(0.180392, 0.32549, 0.403922, 1) [node name="Label" type="Label" parent="."] -layout_mode = 0 -anchor_right = 1.0 -anchor_bottom = 1.0 -offset_left = 4.0 -grow_horizontal = 2 -grow_vertical = 2 -theme_override_fonts/font = SubResource("SystemFont_88y8w") -theme_override_font_sizes/font_size = 14 +layout_mode = 2 +theme_override_styles/normal = SubResource("StyleBoxFlat_c7j4l") text = "[Help] This is hint!" vertical_alignment = 1 +clip_text = true diff --git a/addons/panku_console/modules/interactive_shell/console_ui/panku_console_ui.gd b/addons/panku_console/modules/interactive_shell/console_ui/panku_console_ui.gd index 7811fa9..f7e3942 100644 --- a/addons/panku_console/modules/interactive_shell/console_ui/panku_console_ui.gd +++ b/addons/panku_console/modules/interactive_shell/console_ui/panku_console_ui.gd @@ -6,7 +6,7 @@ extends Control @onready var side_buttons:Control = $HBoxContainer/SideButtons @onready var side_separator:Control = $HBoxContainer/VSeparator -const side_button_packed := preload("res://addons/panku_console/modules/interactive_shell/console_ui/side_button.tscn") +const side_button_packed := preload("res://addons/panku_console/common/panku_button.tscn") const side_menu_config_file_path := "res://addons/panku_console/modules/interactive_shell/side_menu_config.json" var enable_side_menu := true @@ -39,9 +39,8 @@ func clear_output(): _console_logs.clear() func add_side_button(exp:String, icon:Texture2D, text:String, top:= true): - var new_button:Button = side_button_packed.instantiate() + var new_button:PankuButton = side_button_packed.instantiate() new_button.icon = icon - new_button.title = text side_button_separator.get_parent().add_child(new_button) side_button_separator.get_parent().move_child( new_button, @@ -51,3 +50,5 @@ func add_side_button(exp:String, icon:Texture2D, text:String, top:= true): func(): _repl._module.core.gd_exprenv.execute(exp) ) + new_button.set_meta("text", " " + text) + new_button.text = "" diff --git a/addons/panku_console/modules/interactive_shell/console_ui/panku_console_ui.tscn b/addons/panku_console/modules/interactive_shell/console_ui/panku_console_ui.tscn index d2eda46..d3bc7b6 100644 --- a/addons/panku_console/modules/interactive_shell/console_ui/panku_console_ui.tscn +++ b/addons/panku_console/modules/interactive_shell/console_ui/panku_console_ui.tscn @@ -1,31 +1,21 @@ -[gd_scene load_steps=14 format=3 uid="uid://bqfm16y5vcgl3"] +[gd_scene load_steps=12 format=3 uid="uid://bqfm16y5vcgl3"] [ext_resource type="Theme" uid="uid://bk18yfu0d77wk" path="res://addons/panku_console/res/panku_console_theme.tres" id="1_8mhrg"] [ext_resource type="Script" path="res://addons/panku_console/modules/interactive_shell/console_ui/panku_console_ui.gd" id="1_aab8v"] [ext_resource type="PackedScene" uid="uid://nynkaa0igrh5" path="res://addons/panku_console/modules/interactive_shell/console_logs/console_logs.tscn" id="1_jb1ae"] [ext_resource type="PackedScene" uid="uid://bme8twac4ick5" path="res://addons/panku_console/modules/interactive_shell/input_field/input_area.tscn" id="2_w7j54"] [ext_resource type="PackedScene" uid="uid://b3jf18wonocnv" path="res://addons/panku_console/modules/interactive_shell/hints_list/hints_list.tscn" id="3_qw8p4"] -[ext_resource type="PackedScene" uid="uid://drn5t13m088fb" path="res://addons/panku_console/modules/interactive_shell/console_ui/side_button.tscn" id="4_2pdgx"] +[ext_resource type="PackedScene" uid="uid://drn5t13m088fb" path="res://addons/panku_console/common/panku_button.tscn" id="4_5x5gm"] [ext_resource type="PackedScene" uid="uid://ca0bkchv6nsrb" path="res://addons/panku_console/modules/interactive_shell/console_ui/repl.tscn" id="4_ihf0b"] -[ext_resource type="Texture2D" uid="uid://dchvk7qgfe37m" path="res://addons/panku_console/res/icons2/fold-svgrepo-com.svg" id="4_p6l02"] [ext_resource type="Script" path="res://addons/panku_console/modules/interactive_shell/console_ui/side_buttons_controller.gd" id="5_2te5e"] [ext_resource type="PackedScene" uid="uid://cbijhl1nhy64n" path="res://addons/panku_console/modules/interactive_shell/console_ui/help_bar.tscn" id="10_0thy6"] - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ana20"] +[ext_resource type="Script" path="res://addons/panku_console/modules/interactive_shell/console_ui/remote_control_node.gd" id="11_epqvn"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_i3l80"] bg_color = Color(0.6, 0.6, 0.6, 0.435294) border_width_left = 1 border_color = Color(0.8, 0.8, 0.8, 0.352941) -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_p0wh0"] -bg_color = Color(0.239216, 0.258824, 0.278431, 0.25098) -border_width_left = 1 -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(1, 1, 1, 0.25098) - [node name="PankuConsoleUI" type="Control"] clip_contents = true custom_minimum_size = Vector2(0, 1) @@ -39,10 +29,10 @@ theme = ExtResource("1_8mhrg") script = ExtResource("1_aab8v") [node name="REPL" parent="." node_paths=PackedStringArray("_input_area", "_hints", "_helpbar", "_helpbar_label") instance=ExtResource("4_ihf0b")] -_input_area = NodePath("../HBoxContainer/Control/VBoxContainer/Bottom/InputArea") -_hints = NodePath("../HBoxContainer/Control/HintsList") -_helpbar = NodePath("../HBoxContainer/Control/HelpBar") -_helpbar_label = NodePath("../HBoxContainer/Control/HelpBar/Label") +_input_area = NodePath("../HBoxContainer/Control/VBoxContainer/InputArea") +_hints = NodePath("../HBoxContainer/Control/Layer2/HintsList") +_helpbar = NodePath("../HBoxContainer/Control/Layer2/HelpBar") +_helpbar_label = NodePath("../HBoxContainer/Control/Layer2/HelpBar/Label") [node name="HBoxContainer" type="HBoxContainer" parent="."] layout_mode = 1 @@ -57,11 +47,8 @@ theme_override_constants/separation = 0 layout_mode = 2 theme_override_constants/separation = 0 -[node name="ControllerButton" parent="HBoxContainer/SideButtons" instance=ExtResource("4_2pdgx")] +[node name="ControllerButton" parent="HBoxContainer/SideButtons" instance=ExtResource("4_5x5gm")] layout_mode = 2 -theme_override_styles/focus = SubResource("StyleBoxEmpty_ana20") -toggle_mode = true -icon = ExtResource("4_p6l02") script = ExtResource("5_2te5e") [node name="Space" type="Control" parent="HBoxContainer/SideButtons"] @@ -89,21 +76,10 @@ theme_override_constants/separation = 0 layout_mode = 2 size_flags_vertical = 3 -[node name="Bottom" type="Control" parent="HBoxContainer/Control/VBoxContainer"] -custom_minimum_size = Vector2(0, 26) +[node name="InputArea" parent="HBoxContainer/Control/VBoxContainer" instance=ExtResource("2_w7j54")] layout_mode = 2 -[node name="InputArea" parent="HBoxContainer/Control/VBoxContainer/Bottom" instance=ExtResource("2_w7j54")] -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -offset_right = 0.0 -offset_bottom = 0.0 -grow_horizontal = 2 -grow_vertical = 2 - -[node name="Panel" type="Panel" parent="HBoxContainer/Control/VBoxContainer/Bottom"] +[node name="Layer2" type="VBoxContainer" parent="HBoxContainer/Control"] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -111,20 +87,25 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 mouse_filter = 2 -theme_override_styles/panel = SubResource("StyleBoxFlat_p0wh0") +theme_override_constants/separation = 0 +alignment = 2 -[node name="HintsList" parent="HBoxContainer/Control" instance=ExtResource("3_qw8p4")] -layout_mode = 1 -offset_top = 25.0 -offset_bottom = -50.0 +[node name="HintsList" parent="HBoxContainer/Control/Layer2" instance=ExtResource("3_qw8p4")] +layout_mode = 2 +size_flags_vertical = 3 +mouse_filter = 2 -[node name="HelpBar" parent="HBoxContainer/Control" instance=ExtResource("10_0thy6")] -layout_mode = 1 +[node name="HelpBar" parent="HBoxContainer/Control/Layer2" instance=ExtResource("10_0thy6")] +layout_mode = 2 +mouse_filter = 2 -[node name="Label" parent="HBoxContainer/Control/HelpBar" index="0"] -layout_mode = 1 -anchors_preset = 15 -offset_left = 0.0 +[node name="RemoteControl" type="ColorRect" parent="HBoxContainer/Control/Layer2" node_paths=PackedStringArray("target_control")] +layout_mode = 2 +mouse_filter = 2 +color = Color(1, 0, 0, 0) +script = ExtResource("11_epqvn") +target_control = NodePath("../../VBoxContainer/InputArea") -[editable path="HBoxContainer/Control/VBoxContainer/Bottom/InputArea"] -[editable path="HBoxContainer/Control/HelpBar"] +[editable path="HBoxContainer/Control/VBoxContainer/InputArea"] +[editable path="HBoxContainer/Control/VBoxContainer/InputArea/Button"] +[editable path="HBoxContainer/Control/Layer2/HelpBar"] diff --git a/addons/panku_console/modules/interactive_shell/console_ui/remote_control_node.gd b/addons/panku_console/modules/interactive_shell/console_ui/remote_control_node.gd new file mode 100644 index 0000000..01534d5 --- /dev/null +++ b/addons/panku_console/modules/interactive_shell/console_ui/remote_control_node.gd @@ -0,0 +1,15 @@ +extends Control + +@export +var target_control:Control + +func _ready(): + if not target_control: + return + + target_control.resized.connect( + func(): + custom_minimum_size = target_control.get_minimum_size() + ) + + target_control.resized.emit() diff --git a/addons/panku_console/modules/interactive_shell/console_ui/side_button.gd b/addons/panku_console/modules/interactive_shell/console_ui/side_button.gd deleted file mode 100644 index cfc23c6..0000000 --- a/addons/panku_console/modules/interactive_shell/console_ui/side_button.gd +++ /dev/null @@ -1,3 +0,0 @@ -extends Button - -var title := "unknown" diff --git a/addons/panku_console/modules/interactive_shell/console_ui/side_button.tscn b/addons/panku_console/modules/interactive_shell/console_ui/side_button.tscn deleted file mode 100644 index 8e8666b..0000000 --- a/addons/panku_console/modules/interactive_shell/console_ui/side_button.tscn +++ /dev/null @@ -1,9 +0,0 @@ -[gd_scene load_steps=3 format=3 uid="uid://drn5t13m088fb"] - -[ext_resource type="Texture2D" uid="uid://dxvodkcmn4pa8" path="res://addons/panku_console/res/icons2/info.svg" id="1_xgo55"] -[ext_resource type="Script" path="res://addons/panku_console/modules/interactive_shell/console_ui/side_button.gd" id="2_qwmig"] - -[node name="Button" type="Button"] -custom_minimum_size = Vector2(32, 32) -icon = ExtResource("1_xgo55") -script = ExtResource("2_qwmig") diff --git a/addons/panku_console/modules/interactive_shell/console_ui/side_buttons_controller.gd b/addons/panku_console/modules/interactive_shell/console_ui/side_buttons_controller.gd index 62cb730..d16d5c3 100644 --- a/addons/panku_console/modules/interactive_shell/console_ui/side_buttons_controller.gd +++ b/addons/panku_console/modules/interactive_shell/console_ui/side_buttons_controller.gd @@ -1,9 +1,9 @@ -extends Button - -var title = "Fold Menu" +extends PankuButton func _ready(): - + super._ready() + set_meta("text", " Fold Menu") + text = "" var img = Image.new() img.copy_from(icon.get_image()) img.flip_x() @@ -12,19 +12,19 @@ func _ready(): icon = unfold_icon - toggled.connect( + button.toggle_mode = true + button.toggled.connect( func(button_pressed:bool): - if button_pressed: icon = fold_icon else: icon = unfold_icon for node in get_parent().get_children(): - if not (node is Button): + if not (node is PankuButton): continue if button_pressed: - node.text = " " + node.title + " " + node.text = node.get_meta("text") else: node.text = "" ) diff --git a/addons/panku_console/modules/interactive_shell/hints_list/hint.tscn b/addons/panku_console/modules/interactive_shell/hints_list/hint.tscn index 8518193..4a9750a 100644 --- a/addons/panku_console/modules/interactive_shell/hints_list/hint.tscn +++ b/addons/panku_console/modules/interactive_shell/hints_list/hint.tscn @@ -1,24 +1,10 @@ -[gd_scene load_steps=9 format=3 uid="uid://dbtn0x604fx5o"] +[gd_scene load_steps=5 format=3 uid="uid://dbtn0x604fx5o"] [ext_resource type="Script" path="res://addons/panku_console/modules/interactive_shell/hints_list/hint.gd" id="1_sa53g"] -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_wylp8"] +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_56dbv"] -[sub_resource type="SystemFont" id="SystemFont_tt6oo"] -font_names = PackedStringArray("Consolas") - -[sub_resource type="SystemFont" id="SystemFont_uw5w1"] -font_names = PackedStringArray("", "Consolas") -font_weight = 900 - -[sub_resource type="SystemFont" id="SystemFont_ln5si"] -font_italic = true - -[sub_resource type="SystemFont" id="SystemFont_fvi77"] -font_italic = true -font_weight = 900 - -[sub_resource type="SystemFont" id="SystemFont_75v2u"] +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_6xc2u"] [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ganpp"] content_margin_left = 4.0 @@ -30,7 +16,7 @@ content_margin_bottom = 4.0 anchors_preset = 10 anchor_right = 1.0 grow_horizontal = 2 -theme_override_styles/panel = SubResource("StyleBoxEmpty_wylp8") +theme_override_styles/panel = SubResource("StyleBoxEmpty_56dbv") script = ExtResource("1_sa53g") label = NodePath("RichTextLabel") bg2 = NodePath("Bg2") @@ -49,16 +35,7 @@ layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 4 mouse_filter = 2 -theme_override_fonts/normal_font = SubResource("SystemFont_tt6oo") -theme_override_fonts/bold_font = SubResource("SystemFont_uw5w1") -theme_override_fonts/italics_font = SubResource("SystemFont_ln5si") -theme_override_fonts/bold_italics_font = SubResource("SystemFont_fvi77") -theme_override_fonts/mono_font = SubResource("SystemFont_75v2u") -theme_override_font_sizes/normal_font_size = 14 -theme_override_font_sizes/bold_font_size = 14 -theme_override_font_sizes/italics_font_size = 14 -theme_override_font_sizes/bold_italics_font_size = 14 -theme_override_font_sizes/mono_font_size = 14 +theme_override_styles/focus = SubResource("StyleBoxEmpty_6xc2u") theme_override_styles/normal = SubResource("StyleBoxEmpty_ganpp") bbcode_enabled = true text = "[color=cyan]w_button[/color][color=gray]([/color]display_name:[color=green]String[/color], env:[color=green]String[/color], exp:[color=green]String[/color][color=gray])[/color]" diff --git a/addons/panku_console/modules/interactive_shell/input_field/input_area.gd b/addons/panku_console/modules/interactive_shell/input_field/input_area.gd index da59ccd..721b374 100644 --- a/addons/panku_console/modules/interactive_shell/input_field/input_area.gd +++ b/addons/panku_console/modules/interactive_shell/input_field/input_area.gd @@ -9,7 +9,7 @@ signal prev_hint() signal navigate_histories(histories:Array, cur:int) @export var input:LineEdit -@export var btn:Button +@export var btn:PankuButton func _ready(): input.text_submitted.connect( diff --git a/addons/panku_console/modules/interactive_shell/input_field/input_area.tscn b/addons/panku_console/modules/interactive_shell/input_field/input_area.tscn index 54efb60..15521f5 100644 --- a/addons/panku_console/modules/interactive_shell/input_field/input_area.tscn +++ b/addons/panku_console/modules/interactive_shell/input_field/input_area.tscn @@ -2,12 +2,10 @@ [ext_resource type="Theme" uid="uid://bk18yfu0d77wk" path="res://addons/panku_console/res/panku_console_theme.tres" id="1_rocdy"] [ext_resource type="Script" path="res://addons/panku_console/modules/interactive_shell/input_field/input_area.gd" id="2_6g40s"] +[ext_resource type="PackedScene" uid="uid://drn5t13m088fb" path="res://addons/panku_console/common/panku_button.tscn" id="4_6t5yf"] [ext_resource type="Script" path="res://addons/panku_console/modules/interactive_shell/input_field/input_field.gd" id="4_xjt2l"] [ext_resource type="Texture2D" uid="uid://b4jd6tqlie0wx" path="res://addons/panku_console/res/icons2/reply.svg" id="6_w88f1"] -[sub_resource type="SystemFont" id="SystemFont_104sb"] -font_names = PackedStringArray("Consolas") - [node name="InputArea" type="HBoxContainer" node_paths=PackedStringArray("input", "btn")] offset_right = 277.0 offset_bottom = 26.0 @@ -26,17 +24,18 @@ focus_neighbor_right = NodePath(".") focus_neighbor_bottom = NodePath(".") focus_next = NodePath(".") focus_previous = NodePath(".") -theme_override_fonts/font = SubResource("SystemFont_104sb") -theme_override_font_sizes/font_size = 14 placeholder_text = "Input expression here..." clear_button_enabled = true caret_blink = true script = ExtResource("4_xjt2l") -[node name="Button" type="Button" parent="."] -custom_minimum_size = Vector2(24, 0) +[node name="Button" parent="." instance=ExtResource("4_6t5yf")] layout_mode = 2 -tooltip_text = "Confirm" -icon = ExtResource("6_w88f1") -icon_alignment = 1 -expand_icon = true + +[node name="TextureRect" parent="Button/HBoxContainer" index="0"] +texture = ExtResource("6_w88f1") + +[node name="Label" parent="Button/HBoxContainer" index="1"] +text = "" + +[editable path="Button"] diff --git a/addons/panku_console/modules/interactive_shell/mini_repl_2.tscn b/addons/panku_console/modules/interactive_shell/mini_repl_2.tscn index a80bb42..34d48d5 100644 --- a/addons/panku_console/modules/interactive_shell/mini_repl_2.tscn +++ b/addons/panku_console/modules/interactive_shell/mini_repl_2.tscn @@ -3,16 +3,12 @@ [ext_resource type="PackedScene" uid="uid://bme8twac4ick5" path="res://addons/panku_console/modules/interactive_shell/input_field/input_area.tscn" id="1_cerpp"] [ext_resource type="Script" path="res://addons/panku_console/modules/interactive_shell/mini_repl_2.gd" id="1_qrxrm"] [ext_resource type="Script" path="res://addons/panku_console/modules/interactive_shell/console_ui/repl.gd" id="1_tygtx"] +[ext_resource type="Theme" uid="uid://bk18yfu0d77wk" path="res://addons/panku_console/res/panku_console_theme.tres" id="1_yfc5r"] [ext_resource type="PackedScene" uid="uid://cbijhl1nhy64n" path="res://addons/panku_console/modules/interactive_shell/console_ui/help_bar.tscn" id="2_2k26n"] [ext_resource type="Shader" path="res://addons/panku_console/res/shader/simple_fast_blur.gdshader" id="4_djxpe"] [ext_resource type="PackedScene" uid="uid://b3jf18wonocnv" path="res://addons/panku_console/modules/interactive_shell/hints_list/hints_list.tscn" id="5_i3ldx"] -[sub_resource type="ShaderMaterial" id="ShaderMaterial_xs7bl"] -shader = ExtResource("4_djxpe") -shader_parameter/lod = 4.0 -shader_parameter/modulate = Color(0, 0, 0.301961, 0.258824) - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_kkuu7"] +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xty2u"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_kt6ig"] shader = ExtResource("4_djxpe") @@ -27,6 +23,7 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 mouse_filter = 2 +theme = ExtResource("1_yfc5r") theme_override_constants/separation = 0 alignment = 2 script = ExtResource("1_qrxrm") @@ -45,19 +42,12 @@ layout_mode = 2 auto_resize = true [node name="HelpBar" parent="." instance=ExtResource("2_2k26n")] -visible = false -material = SubResource("ShaderMaterial_xs7bl") custom_minimum_size = Vector2(0, 24) layout_mode = 2 -[node name="Label" parent="HelpBar" index="0"] -layout_mode = 1 -anchors_preset = 15 -offset_left = 0.0 - [node name="PanelContainer" type="PanelContainer" parent="."] layout_mode = 2 -theme_override_styles/panel = SubResource("StyleBoxEmpty_kkuu7") +theme_override_styles/panel = SubResource("StyleBoxEmpty_xty2u") [node name="ColorRect" type="ColorRect" parent="PanelContainer"] material = SubResource("ShaderMaterial_kt6ig") diff --git a/addons/panku_console/modules/interactive_shell/module.gd b/addons/panku_console/modules/interactive_shell/module.gd index ebfbc55..6651dd5 100644 --- a/addons/panku_console/modules/interactive_shell/module.gd +++ b/addons/panku_console/modules/interactive_shell/module.gd @@ -20,9 +20,9 @@ var _show_side_menu:bool func get_intro() -> String: var intro:PackedStringArray = PackedStringArray() - intro.append("[font_size=56][color=#ffffff44][b][i]> Panku Console[/i][/b][/color][/font_size]") - intro.append("[font_size=18][color=#ffffff44]Feature-Packed Runtime Debugging Toolkit for Godot[/color][/font_size]") - intro.append("[font_size=18][color=#ffffff44]Version: %s([url=%s][color=#10a00c]%s[/color][/url]) | Visit [color=#3feeb6][url=https://github.com/Ark2000/PankuConsole]github repo[/url][/color] for more info[/color][/font_size]" % [PankuUtils.get_plugin_version(), PankuUtils.get_commit_url(), PankuUtils.get_commit_sha_short()]) + intro.append("[color=#ffffff44][b][i]> Panku Console[/i][/b][/color]") + intro.append("[color=#ffffff44]Feature-Packed Runtime Debugging Toolkit for Godot[/color]") + intro.append("[color=#ffffff44]Version: %s([url=%s][color=#10a00c]%s[/color][/url]) | Visit [color=#3feeb6][url=https://github.com/Ark2000/PankuConsole]github repo[/url][/color] for more info[/color]" % [PankuUtils.get_plugin_version(), PankuUtils.get_commit_url(), PankuUtils.get_commit_sha_short()]) return "\n".join(intro) func init_module(): @@ -31,7 +31,7 @@ func init_module(): add_auto_save_hook(window) interactive_shell._repl._module = self window.queue_free_on_close = false - window.set_window_title_text("Interative Shell V2") + window.set_window_title_text("Interactive Shell V2") load_window_data(window) window.hide_window() @@ -69,7 +69,7 @@ func init_module(): gui_mode = load_module_data("gui_mode", InputMode.Window) pause_if_input = load_module_data("pause_if_popup", true) unified_window_visibility = load_module_data("unified_visibility", false) - init_expr = load_module_data("init_expression", "") + init_expr = load_module_data("init_expression", "print('Panku Console Loaded!')") _show_side_menu = load_module_data("show_side_menu", true) set_side_menu_visible(_show_side_menu) @@ -79,6 +79,12 @@ func init_module(): _is_gui_open = not (window.visible or simple_launcher.visible) update_gui_state() + # TODO: this signal is emitted twice when the window is shown, investigate + # window.visibility_changed.connect( + # func(): + # print("window visibility changed: ", window.visible) + # ) + # execute init_expr after a short delay if init_expr != "": core.create_tween().tween_callback( @@ -98,16 +104,22 @@ func quit_module(): func update_gui_state(): var is_gui_open = window.visible or simple_launcher.visible + + if is_gui_open == _is_gui_open: + return + if _is_gui_open != is_gui_open: core._shell_visibility = is_gui_open core.interactive_shell_visibility_changed.emit(is_gui_open) _is_gui_open = is_gui_open + if _is_gui_open and pause_if_input: _was_tree_paused = core.get_tree().paused core.get_tree().paused = true else: if core.get_tree().paused: core.get_tree().paused = _was_tree_paused + if unified_window_visibility: core.windows_manager.visible = _is_gui_open diff --git a/addons/panku_console/modules/interactive_shell/opt.gd b/addons/panku_console/modules/interactive_shell/opt.gd index d2cbf44..a913952 100644 --- a/addons/panku_console/modules/interactive_shell/opt.gd +++ b/addons/panku_console/modules/interactive_shell/opt.gd @@ -9,7 +9,7 @@ extends ModuleOptions set(v): _module.set_side_menu_visible(v) -@export var export_comment_unified_visibility = "unified_visibility will keep all windows' visibility the same as interative shell" +@export var export_comment_unified_visibility = "unified_visibility will keep all windows' visibility the same as interactive shell" @export var unified_visibility:bool = false: get: return _module.unified_window_visibility @@ -23,12 +23,6 @@ extends ModuleOptions set(v): _module.set_pause_if_popup(v) -@export_range(12,20) var output_font_size:int: - set(v): - _module.interactive_shell._console_logs.set_font_size(v) - get: - return _module.interactive_shell._console_logs.get_font_size() - @export var export_comment_init_expression = "init_expression will be executed when the project starts" @export var init_expression:String = "": get: diff --git a/addons/panku_console/modules/keyboard_shortcuts/exp_key_mapper_2.tscn b/addons/panku_console/modules/keyboard_shortcuts/exp_key_mapper_2.tscn index 8a07032..3e5b5c8 100644 --- a/addons/panku_console/modules/keyboard_shortcuts/exp_key_mapper_2.tscn +++ b/addons/panku_console/modules/keyboard_shortcuts/exp_key_mapper_2.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=5 format=3 uid="uid://c6hm8vweq0j4f"] +[gd_scene load_steps=7 format=3 uid="uid://c6hm8vweq0j4f"] [ext_resource type="Theme" uid="uid://bk18yfu0d77wk" path="res://addons/panku_console/res/panku_console_theme.tres" id="1_0xd5p"] [ext_resource type="Script" path="res://addons/panku_console/modules/keyboard_shortcuts/exp_key_mapper_2.gd" id="2_vxcow"] [ext_resource type="Texture2D" uid="uid://dprpfr0l5xvmu" path="res://addons/panku_console/res/icons2/add.svg" id="3_0d2ct"] +[ext_resource type="Texture2D" uid="uid://b6jt0ggmuoyeb" path="res://addons/panku_console/res/icons2/info2.svg" id="3_ofrgs"] [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_i7jk5"] content_margin_left = 8.0 @@ -10,6 +11,16 @@ content_margin_top = 8.0 content_margin_right = 8.0 content_margin_bottom = 8.0 +[sub_resource type="GDScript" id="GDScript_xeow3"] +script/source = "extends Button + +func _ready(): + pressed.connect( + func(): + Panku.notify(\"Yes, I know it.\") + ) +" + [node name="ExpKeyMapper" type="Control" node_paths=PackedStringArray("add_btn", "container")] clip_contents = true layout_mode = 3 @@ -41,14 +52,20 @@ theme_override_styles/panel = SubResource("StyleBoxEmpty_i7jk5") [node name="VBoxContainer2" type="VBoxContainer" parent="ScrollContainer/PanelContainer"] layout_mode = 2 -[node name="Label" type="Label" parent="ScrollContainer/PanelContainer/VBoxContainer2"] +[node name="Button" type="Button" parent="ScrollContainer/PanelContainer/VBoxContainer2"] layout_mode = 2 -text = "You can assign a key to an expression here~" +text = "Edit expression key bindings here." +icon = ExtResource("3_ofrgs") +alignment = 0 +expand_icon = true +script = SubResource("GDScript_xeow3") [node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer/PanelContainer/VBoxContainer2"] layout_mode = 2 [node name="Add" type="Button" parent="ScrollContainer/PanelContainer/VBoxContainer2/VBoxContainer"] layout_mode = 2 +text = " " icon = ExtResource("3_0d2ct") icon_alignment = 1 +expand_icon = true diff --git a/addons/panku_console/modules/native_logger/log_overlay.tscn b/addons/panku_console/modules/native_logger/log_overlay.tscn index 7cf8354..16dfe9d 100644 --- a/addons/panku_console/modules/native_logger/log_overlay.tscn +++ b/addons/panku_console/modules/native_logger/log_overlay.tscn @@ -1,7 +1,6 @@ [gd_scene load_steps=2 format=3 uid="uid://clwb00tc8ogtr"] -[sub_resource type="Theme" id="Theme_dksur"] -default_font_size = 16 +[ext_resource type="Theme" uid="uid://bk18yfu0d77wk" path="res://addons/panku_console/res/panku_console_theme.tres" id="1_2qqxo"] [node name="LogOverlay" type="RichTextLabel"] modulate = Color(1, 1, 1, 0.501961) @@ -13,7 +12,7 @@ grow_vertical = 2 size_flags_horizontal = 3 size_flags_vertical = 3 mouse_filter = 2 -theme = SubResource("Theme_dksur") +theme = ExtResource("1_2qqxo") bbcode_enabled = true text = "Output Area" scroll_active = false diff --git a/addons/panku_console/modules/native_logger/log_view_tag.tscn b/addons/panku_console/modules/native_logger/log_view_tag.tscn index 61a915a..66762cd 100644 --- a/addons/panku_console/modules/native_logger/log_view_tag.tscn +++ b/addons/panku_console/modules/native_logger/log_view_tag.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=5 format=3 uid="uid://dpurdc5me82ds"] +[gd_scene load_steps=6 format=3 uid="uid://dpurdc5me82ds"] [ext_resource type="Theme" uid="uid://bk18yfu0d77wk" path="res://addons/panku_console/res/panku_console_theme.tres" id="1_e0ejw"] [ext_resource type="Script" path="res://addons/panku_console/modules/native_logger/log_view_tag.gd" id="2_ia8vx"] -[ext_resource type="Texture2D" uid="uid://ttbgv1vr1xsc" path="res://addons/panku_console/res/icons2/close_20x.svg" id="3_ydxim"] +[ext_resource type="PackedScene" uid="uid://drn5t13m088fb" path="res://addons/panku_console/common/panku_button.tscn" id="3_cc2ep"] +[ext_resource type="Texture2D" uid="uid://8g5afcuanbl6" path="res://addons/panku_console/res/icons2/close.svg" id="4_msugh"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jvhll"] bg_color = Color(1, 1, 1, 1) @@ -16,14 +17,14 @@ shadow_offset = Vector2(1, 1) [node name="LoggerViewTag" type="PanelContainer" node_paths=PackedStringArray("tag_btn", "rm_btn")] self_modulate = Color(0.027451, 0.490196, 0.333333, 1) -offset_right = 109.0 -offset_bottom = 24.0 +offset_right = 123.0 +offset_bottom = 31.0 size_flags_vertical = 4 theme = ExtResource("1_e0ejw") theme_override_styles/panel = SubResource("StyleBoxFlat_jvhll") script = ExtResource("2_ia8vx") tag_btn = NodePath("HBoxContainer/Button") -rm_btn = NodePath("HBoxContainer/Button2") +rm_btn = NodePath("HBoxContainer/Button2/Button") [node name="HBoxContainer" type="HBoxContainer" parent="."] layout_mode = 2 @@ -34,7 +35,13 @@ layout_mode = 2 text = "[info] (428)" flat = true -[node name="Button2" type="Button" parent="HBoxContainer"] +[node name="Button2" parent="HBoxContainer" instance=ExtResource("3_cc2ep")] layout_mode = 2 -icon = ExtResource("3_ydxim") + +[node name="Button" parent="HBoxContainer/Button2" index="0"] flat = true + +[node name="TextureRect" parent="HBoxContainer/Button2/HBoxContainer" index="0"] +texture = ExtResource("4_msugh") + +[editable path="HBoxContainer/Button2"] diff --git a/addons/panku_console/modules/native_logger/logger_view.tscn b/addons/panku_console/modules/native_logger/logger_view.tscn index 6336cb9..5bb6e3c 100644 --- a/addons/panku_console/modules/native_logger/logger_view.tscn +++ b/addons/panku_console/modules/native_logger/logger_view.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=6 format=3 uid="uid://b1c075ic6oru7"] +[gd_scene load_steps=5 format=3 uid="uid://b1c075ic6oru7"] [ext_resource type="Theme" uid="uid://bk18yfu0d77wk" path="res://addons/panku_console/res/panku_console_theme.tres" id="1_gcj58"] [ext_resource type="PackedScene" uid="uid://dpurdc5me82ds" path="res://addons/panku_console/modules/native_logger/log_view_tag.tscn" id="2_06ga0"] @@ -12,9 +12,6 @@ border_width_right = 1 border_width_bottom = 1 border_color = Color(0.639216, 0.639216, 0.639216, 0.501961) -[sub_resource type="Theme" id="Theme_dqhge"] -default_font_size = 14 - [node name="logger_view" type="Control" node_paths=PackedStringArray("search_box", "search_btn", "pin_btn", "cls_btn", "tags_container2", "tags_container", "rlabel")] clip_contents = true layout_mode = 3 @@ -105,7 +102,6 @@ theme_override_constants/margin_bottom = 8 [node name="RichTextLabel" type="RichTextLabel" parent="VBoxContainer/PanelContainer/MarginContainer"] layout_mode = 2 -theme = SubResource("Theme_dqhge") bbcode_enabled = true text = "Hello Some text here diff --git a/addons/panku_console/modules/native_logger/module.gd b/addons/panku_console/modules/native_logger/module.gd index 1f99c26..777fcf1 100644 --- a/addons/panku_console/modules/native_logger/module.gd +++ b/addons/panku_console/modules/native_logger/module.gd @@ -58,11 +58,10 @@ func init_module(): # load data load_window_data(window) - get_module_opt().font_size = load_module_data("font_size", 14) get_module_opt().screen_overlay = load_module_data("screen_overlay", ScreenOverlayDisplayMode.AlwaysShow) get_module_opt().screen_overlay_alpha = load_module_data("screen_overlay_alpha", 0.3) - get_module_opt().screen_overlay_font_size = load_module_data("screen_overlay_font_size", 13) get_module_opt().screen_overlay_font_shadow = load_module_data("screen_overlay_font_shadow", false) + get_module_opt().screen_overlay_override_font_size = load_module_data("screen_overlay_override_font_size", 0) get_module_opt().show_timestamp = load_module_data("show_timestamp", true) logger_ui.load_data(load_module_data("logger_tags", ["[error]", "[warning]"])) diff --git a/addons/panku_console/modules/native_logger/opt.gd b/addons/panku_console/modules/native_logger/opt.gd index 4de8259..777accf 100644 --- a/addons/panku_console/modules/native_logger/opt.gd +++ b/addons/panku_console/modules/native_logger/opt.gd @@ -10,18 +10,6 @@ func open_window(): @export var export_button_open_engine_log_folder:String = "Open Engine Logs Folder" -@export_range(12, 20) var font_size:int = 14: - set(v): - _module.logger_ui.rlabel.theme.default_font_size = v - get: - return _module.logger_ui.rlabel.theme.default_font_size - -#@export var screen_overlay:bool = true: -# set(v): -# _module.output_overlay.visible = v -# get: -# return _module.output_overlay.visible - @export_enum("Always Show", "Show If Shell Visible", "Never Show") var screen_overlay:int: set(v): _module.set_overlay_display_mode(v) @@ -40,11 +28,27 @@ func open_window(): get: return _module.output_overlay.modulate.a -@export_range(8, 24) var screen_overlay_font_size:int = 16: +@export var screen_overlay_override_font_size:int = 0: set(v): - _module.output_overlay.theme.default_font_size = v + var overlay:RichTextLabel = _module.output_overlay + if (v <= 0): + overlay.remove_theme_font_size_override("normal_font_size") + overlay.remove_theme_font_size_override("bold_font_size") + overlay.remove_theme_font_size_override("italics_font_size") + overlay.remove_theme_font_size_override("bold_italics_font_size") + overlay.remove_theme_font_size_override("mono_font_size") + else: + overlay.add_theme_font_size_override("normal_font_size", v) + overlay.add_theme_font_size_override("bold_font_size", v) + overlay.add_theme_font_size_override("italics_font_size", v) + overlay.add_theme_font_size_override("bold_italics_font_size", v) + overlay.add_theme_font_size_override("mono_font_size", v) get: - return _module.output_overlay.theme.default_font_size + #return _module.output_overlay.theme.default_font_size + var overlay:RichTextLabel = _module.output_overlay + if overlay.has_theme_font_size_override("normal_font_size"): + return overlay.get("theme_override_font_sizes/normal_font_size") + return 0 @export var screen_overlay_font_shadow:bool = false: set(v): diff --git a/addons/panku_console/modules/screen_notifier/resident_logs.gd b/addons/panku_console/modules/screen_notifier/resident_logs.gd index be16773..3053915 100644 --- a/addons/panku_console/modules/screen_notifier/resident_logs.gd +++ b/addons/panku_console/modules/screen_notifier/resident_logs.gd @@ -12,6 +12,9 @@ var prev_log = "" # logs whose id >= 0 var named_logs := {} +func _ready(): + $ResidentLogs.size = get_viewport().size * 0.5 + func add_log(bbcode:String, id:=-1): # logs whose id>=0 will be fixed to the bottom of the log list # useful for loop print diff --git a/addons/panku_console/modules/screen_notifier/resident_logs.tscn b/addons/panku_console/modules/screen_notifier/resident_logs.tscn index 5e49473..ae7fffd 100644 --- a/addons/panku_console/modules/screen_notifier/resident_logs.tscn +++ b/addons/panku_console/modules/screen_notifier/resident_logs.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=3 format=3 uid="uid://ccr06ddwa73ca"] +[gd_scene load_steps=4 format=3 uid="uid://ccr06ddwa73ca"] [ext_resource type="Script" path="res://addons/panku_console/modules/screen_notifier/resident_logs.gd" id="1_uq2bh"] +[ext_resource type="Theme" uid="uid://bk18yfu0d77wk" path="res://addons/panku_console/res/panku_console_theme.tres" id="2_npyp1"] [sub_resource type="GDScript" id="GDScript_p8loh"] script/source = "extends ColorRect @@ -15,14 +16,15 @@ named_container = NodePath("ResidentLogs/Named") unnamed_container = NodePath("ResidentLogs/Unnamed") [node name="ResidentLogs" type="VBoxContainer" parent="."] -anchors_preset = -1 +anchors_preset = 4 anchor_top = 0.5 anchor_bottom = 0.5 offset_top = -193.0 offset_right = 244.0 offset_bottom = 193.0 -grow_vertical = 0 +grow_vertical = 2 mouse_filter = 2 +theme = ExtResource("2_npyp1") alignment = 2 [node name="Indicator" type="ColorRect" parent="ResidentLogs"] diff --git a/addons/panku_console/modules/system_report/env.gd b/addons/panku_console/modules/system_report/env.gd index e9d47bf..2e86345 100644 --- a/addons/panku_console/modules/system_report/env.gd +++ b/addons/panku_console/modules/system_report/env.gd @@ -1,10 +1,9 @@ var _os_report = preload("./os_report.gd").new() var _module:PankuModule -const _HELP_execute = "Display detailed OS report" -func execute() -> void: +const _HELP_execute = "Show detailed OS report" +func execute() -> String: _module.core.notify("Please wait, this may take a while...") - await _module.core.get_tree().create_timer(0.1).timeout _os_report.inspect() var report = "".join(_os_report.rtl) - # _module.core.output(report) + return report diff --git a/addons/panku_console/res/font/default_bold.tres b/addons/panku_console/res/font/default_bold.tres deleted file mode 100644 index 583d14d..0000000 --- a/addons/panku_console/res/font/default_bold.tres +++ /dev/null @@ -1,4 +0,0 @@ -[gd_resource type="FontVariation" format=3 uid="uid://d2b8bo6ytpt2i"] - -[resource] -variation_embolden = 0.6 diff --git a/addons/panku_console/res/icons2/add.svg b/addons/panku_console/res/icons2/add.svg index 2dd26a1..d0cbaf1 100644 --- a/addons/panku_console/res/icons2/add.svg +++ b/addons/panku_console/res/icons2/add.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/addons/panku_console/res/icons2/arrow-down-svgrepo-com.svg b/addons/panku_console/res/icons2/arrow-down-svgrepo-com.svg index b2d7fd0..429e411 100644 --- a/addons/panku_console/res/icons2/arrow-down-svgrepo-com.svg +++ b/addons/panku_console/res/icons2/arrow-down-svgrepo-com.svg @@ -1,7 +1,7 @@ - + diff --git a/addons/panku_console/res/icons2/arrow-up-md-svgrepo-com.svg b/addons/panku_console/res/icons2/arrow-up-md-svgrepo-com.svg index eecca41..85982c5 100644 --- a/addons/panku_console/res/icons2/arrow-up-md-svgrepo-com.svg +++ b/addons/panku_console/res/icons2/arrow-up-md-svgrepo-com.svg @@ -1,7 +1,7 @@ - + diff --git a/addons/panku_console/res/icons2/bin-cancel-delete-remove-trash-garbage-svgrepo-com.svg b/addons/panku_console/res/icons2/bin-cancel-delete-remove-trash-garbage-svgrepo-com.svg index 902be66..8842fee 100644 --- a/addons/panku_console/res/icons2/bin-cancel-delete-remove-trash-garbage-svgrepo-com.svg +++ b/addons/panku_console/res/icons2/bin-cancel-delete-remove-trash-garbage-svgrepo-com.svg @@ -1,7 +1,7 @@ - + diff --git a/addons/panku_console/res/icons2/check-svgrepo-com.svg b/addons/panku_console/res/icons2/check-svgrepo-com.svg index 907d473..b0a18cf 100644 --- a/addons/panku_console/res/icons2/check-svgrepo-com.svg +++ b/addons/panku_console/res/icons2/check-svgrepo-com.svg @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/addons/panku_console/res/icons2/checkbox_checked.svg b/addons/panku_console/res/icons2/checkbox_checked.svg index a9f3667..970edd0 100644 --- a/addons/panku_console/res/icons2/checkbox_checked.svg +++ b/addons/panku_console/res/icons2/checkbox_checked.svg @@ -1,6 +1,6 @@ - + Created with Fabric.js 4.6.0 diff --git a/addons/panku_console/res/icons2/checkbox_unchecked.svg b/addons/panku_console/res/icons2/checkbox_unchecked.svg index ca0c8b6..609e889 100644 --- a/addons/panku_console/res/icons2/checkbox_unchecked.svg +++ b/addons/panku_console/res/icons2/checkbox_unchecked.svg @@ -1,6 +1,6 @@ - + Created with Fabric.js 4.6.0 diff --git a/addons/panku_console/res/icons2/chevron_right.svg b/addons/panku_console/res/icons2/chevron_right.svg index 9c8f369..650d8f2 100644 --- a/addons/panku_console/res/icons2/chevron_right.svg +++ b/addons/panku_console/res/icons2/chevron_right.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/addons/panku_console/res/icons2/close.svg b/addons/panku_console/res/icons2/close.svg index 9a7248b..05fb420 100644 --- a/addons/panku_console/res/icons2/close.svg +++ b/addons/panku_console/res/icons2/close.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/addons/panku_console/res/icons2/expand_more.svg b/addons/panku_console/res/icons2/expand_more.svg index add60d0..61fa21d 100644 --- a/addons/panku_console/res/icons2/expand_more.svg +++ b/addons/panku_console/res/icons2/expand_more.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/addons/panku_console/res/icons2/eye.svg b/addons/panku_console/res/icons2/eye.svg index 83ae2b8..171a612 100644 --- a/addons/panku_console/res/icons2/eye.svg +++ b/addons/panku_console/res/icons2/eye.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/addons/panku_console/res/icons2/fold-svgrepo-com.svg b/addons/panku_console/res/icons2/fold-svgrepo-com.svg index f7905ad..0d9ed74 100644 --- a/addons/panku_console/res/icons2/fold-svgrepo-com.svg +++ b/addons/panku_console/res/icons2/fold-svgrepo-com.svg @@ -1,7 +1,7 @@ - + diff --git a/addons/panku_console/res/icons2/gear.svg b/addons/panku_console/res/icons2/gear.svg index a6b598d..569706f 100644 --- a/addons/panku_console/res/icons2/gear.svg +++ b/addons/panku_console/res/icons2/gear.svg @@ -1,4 +1,4 @@ - diff --git a/addons/panku_console/res/icons2/history.svg b/addons/panku_console/res/icons2/history.svg index 6ef4262..0d691fe 100644 --- a/addons/panku_console/res/icons2/history.svg +++ b/addons/panku_console/res/icons2/history.svg @@ -1,4 +1,4 @@ - + diff --git a/addons/panku_console/res/icons2/info2.svg b/addons/panku_console/res/icons2/info2.svg index 59c3e57..e3db00e 100644 --- a/addons/panku_console/res/icons2/info2.svg +++ b/addons/panku_console/res/icons2/info2.svg @@ -1,4 +1,4 @@ - + diff --git a/addons/panku_console/res/icons2/keyboard.svg b/addons/panku_console/res/icons2/keyboard.svg index 5b37c4e..6cdb9a1 100644 --- a/addons/panku_console/res/icons2/keyboard.svg +++ b/addons/panku_console/res/icons2/keyboard.svg @@ -1,4 +1,4 @@ - + diff --git a/addons/panku_console/res/icons2/menu.svg b/addons/panku_console/res/icons2/menu.svg index 02ce374..febcbbe 100644 --- a/addons/panku_console/res/icons2/menu.svg +++ b/addons/panku_console/res/icons2/menu.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/addons/panku_console/res/icons2/open_with.svg b/addons/panku_console/res/icons2/open_with.svg index 0c14c8f..d6c2bae 100644 --- a/addons/panku_console/res/icons2/open_with.svg +++ b/addons/panku_console/res/icons2/open_with.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/addons/panku_console/res/icons2/pause-1010-svgrepo-com.svg b/addons/panku_console/res/icons2/pause-1010-svgrepo-com.svg index dcf0620..6aba11b 100644 --- a/addons/panku_console/res/icons2/pause-1010-svgrepo-com.svg +++ b/addons/panku_console/res/icons2/pause-1010-svgrepo-com.svg @@ -1,6 +1,6 @@ - + pause [#1010] Created with Sketch. diff --git a/addons/panku_console/res/icons2/play-1001-svgrepo-com.svg b/addons/panku_console/res/icons2/play-1001-svgrepo-com.svg index 0d64dd8..7cebe14 100644 --- a/addons/panku_console/res/icons2/play-1001-svgrepo-com.svg +++ b/addons/panku_console/res/icons2/play-1001-svgrepo-com.svg @@ -1,6 +1,6 @@ - + play [#1001] Created with Sketch. diff --git a/addons/panku_console/res/icons2/pop-out-svgrepo-com.svg b/addons/panku_console/res/icons2/pop-out-svgrepo-com.svg index ab4814a..e59c21a 100644 --- a/addons/panku_console/res/icons2/pop-out-svgrepo-com.svg +++ b/addons/panku_console/res/icons2/pop-out-svgrepo-com.svg @@ -1,7 +1,7 @@ - + diff --git a/addons/panku_console/res/icons2/question.svg b/addons/panku_console/res/icons2/question.svg index e4486ff..f6a29dd 100644 --- a/addons/panku_console/res/icons2/question.svg +++ b/addons/panku_console/res/icons2/question.svg @@ -1,5 +1,5 @@ - + diff --git a/addons/panku_console/res/icons2/remove.svg b/addons/panku_console/res/icons2/remove.svg index 42776b6..bee8c68 100644 --- a/addons/panku_console/res/icons2/remove.svg +++ b/addons/panku_console/res/icons2/remove.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/addons/panku_console/res/icons2/rename-svgrepo-com.svg b/addons/panku_console/res/icons2/rename-svgrepo-com.svg index baf7f74..5e80b7a 100644 --- a/addons/panku_console/res/icons2/rename-svgrepo-com.svg +++ b/addons/panku_console/res/icons2/rename-svgrepo-com.svg @@ -10,8 +10,8 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="24px" - height="24px" + width="64" + height="64" viewBox="0 0 30 30" version="1.1" id="svg822" diff --git a/addons/panku_console/res/icons2/reply.svg b/addons/panku_console/res/icons2/reply.svg index 9f8beab..2f85918 100644 --- a/addons/panku_console/res/icons2/reply.svg +++ b/addons/panku_console/res/icons2/reply.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/addons/panku_console/res/icons2/swap_horiz.svg b/addons/panku_console/res/icons2/swap_horiz.svg index 1d6d250..4bf16b0 100644 --- a/addons/panku_console/res/icons2/swap_horiz.svg +++ b/addons/panku_console/res/icons2/swap_horiz.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/addons/panku_console/res/panku_console_theme.tres b/addons/panku_console/res/panku_console_theme.tres index 22a9edc..69306e9 100644 --- a/addons/panku_console/res/panku_console_theme.tres +++ b/addons/panku_console/res/panku_console_theme.tres @@ -1,8 +1,5 @@ [gd_resource type="Theme" load_steps=26 format=3 uid="uid://bk18yfu0d77wk"] -[ext_resource type="Texture2D" uid="uid://bua84a0uv8ntw" path="res://addons/panku_console/res/icons2/checkbox_checked.svg" id="1_pq2ss"] -[ext_resource type="Texture2D" uid="uid://dkiyle8rjahmw" path="res://addons/panku_console/res/icons2/checkbox_unchecked.svg" id="2_svie5"] - [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1q17k"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_j0iw5"] @@ -90,6 +87,10 @@ border_color = Color(0.8, 0.8, 0.8, 0.12549) [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bcc4x"] bg_color = Color(0.317647, 0.317647, 0.317647, 0.901961) +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_nqr1r"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_abx0a"] + [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_37w0u"] bg_color = Color(1, 1, 1, 0.501961) @@ -107,14 +108,11 @@ border_width_bottom = 1 border_color = Color(0.8, 0.8, 0.8, 0.25098) [resource] -default_font_size = 14 -Button/font_sizes/font_size = 14 +default_font_size = 16 Button/styles/focus = SubResource("StyleBoxEmpty_1q17k") Button/styles/hover = SubResource("StyleBoxFlat_j0iw5") Button/styles/normal = SubResource("StyleBoxFlat_2sv8t") Button/styles/pressed = SubResource("StyleBoxFlat_oko07") -CheckBox/icons/checked = ExtResource("1_pq2ss") -CheckBox/icons/unchecked = ExtResource("2_svie5") HScrollBar/styles/grabber = SubResource("StyleBoxFlat_66h6h") HScrollBar/styles/grabber_highlight = SubResource("StyleBoxFlat_io0fu") HScrollBar/styles/grabber_pressed = SubResource("StyleBoxFlat_5a1x3") @@ -126,13 +124,13 @@ HSlider/icons/tick = SubResource("ImageTexture_amjqe") HSlider/styles/grabber_area = SubResource("StyleBoxFlat_pc3w4") HSlider/styles/grabber_area_highlight = SubResource("StyleBoxFlat_xodll") HSlider/styles/slider = SubResource("StyleBoxFlat_y3ihc") -LineEdit/font_sizes/font_size = 14 LineEdit/styles/focus = SubResource("StyleBoxEmpty_36yn6") LineEdit/styles/normal = SubResource("StyleBoxFlat_1hrnt") LineEdit/styles/read_only = SubResource("StyleBoxFlat_xot6g") -PopupMenu/icons/radio_checked = ExtResource("1_pq2ss") -PopupMenu/icons/radio_unchecked = ExtResource("2_svie5") PopupMenu/styles/panel = SubResource("StyleBoxFlat_bcc4x") +RichTextLabel/colors/default_color = Color(1, 1, 1, 0.878431) +RichTextLabel/styles/focus = SubResource("StyleBoxEmpty_nqr1r") +RichTextLabel/styles/normal = SubResource("StyleBoxEmpty_abx0a") VScrollBar/styles/grabber = SubResource("StyleBoxFlat_37w0u") VScrollBar/styles/grabber_highlight = SubResource("StyleBoxFlat_mhjmb") VScrollBar/styles/grabber_pressed = SubResource("StyleBoxFlat_iamty")