-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: scalable UI * fix auto dpi detection * fix typo and magic number * fix logger tag ui * update about ui * fix system report
- Loading branch information
Showing
81 changed files
with
793 additions
and
596 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.