Skip to content

Commit

Permalink
enabled HiDPI and Mip maps
Browse files Browse the repository at this point in the history
  • Loading branch information
3ddelano committed Nov 28, 2021
1 parent e118277 commit 0385d17
Show file tree
Hide file tree
Showing 26 changed files with 473 additions and 394 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Changelog
This is a high-level changelog for each released version of the project.
For a more detailed list of past and incoming changes, see the commit history.

1.0.1
------
- Enabled HiDPI support
- Enabled Mip maps for fonts
- Upscaled blurry SVGs

1.0.0
------
- Initial version
1 change: 1 addition & 0 deletions assets/fonts/whitney_b_14.tres
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@

[resource]
size = 14
use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
1 change: 1 addition & 0 deletions assets/fonts/whitney_b_16.tres
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
[ext_resource path="res://assets/fonts/whitneybold.otf" type="DynamicFontData" id=1]

[resource]
use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
1 change: 1 addition & 0 deletions assets/fonts/whitney_b_20.tres
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@

[resource]
size = 20
use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
1 change: 1 addition & 0 deletions assets/fonts/whitney_r_10.tres
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@

[resource]
size = 10
use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
1 change: 1 addition & 0 deletions assets/fonts/whitney_r_12.tres
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@

[resource]
size = 12
use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
1 change: 1 addition & 0 deletions assets/fonts/whitney_r_14.tres
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@

[resource]
size = 14
use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
1 change: 1 addition & 0 deletions assets/fonts/whitney_r_16.tres
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
[ext_resource path="res://assets/fonts/whitneymedium.otf" type="DynamicFontData" id=1]

[resource]
use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
1 change: 1 addition & 0 deletions assets/fonts/whitney_sb_16.tres
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
[ext_resource path="res://assets/fonts/whitneysemibold.otf" type="DynamicFontData" id=1]

[resource]
use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
1 change: 1 addition & 0 deletions assets/fonts/whitney_sb_18.tres
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@

[resource]
size = 18
use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
2 changes: 1 addition & 1 deletion assets/icons/attach.svg.import
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
svg/scale=1.6
2 changes: 1 addition & 1 deletion assets/icons/bell.svg.import
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.2
svg/scale=2.0
2 changes: 1 addition & 1 deletion assets/icons/gif.svg.import
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
svg/scale=1.6
2 changes: 1 addition & 1 deletion assets/icons/gift.svg.import
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
svg/scale=1.6
2 changes: 1 addition & 1 deletion assets/icons/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/icons/github.svg.import
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
svg/scale=2.0
2 changes: 1 addition & 1 deletion assets/icons/inbox.svg.import
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.4
svg/scale=1.8
2 changes: 1 addition & 1 deletion assets/icons/settings.svg.import
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
svg/scale=2.0
2 changes: 1 addition & 1 deletion assets/icons/sticker.svg.import
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
svg/scale=1.6
2 changes: 1 addition & 1 deletion assets/icons/unmuted.svg.import
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
svg/scale=2.0
2 changes: 1 addition & 1 deletion assets/icons/youtube.svg.import
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
svg/scale=2.0
1 change: 1 addition & 0 deletions scenes/HelpPanel.gd → components/HelpPanel.gd
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func _ready() -> void:
panel.rect_pivot_offset = panel.rect_size / 2

Signals.connect("show_help", self, "_on_show_help")
visible = true

func _on_close_button_pressed():
tween.interpolate_property(panel, "rect_scale", Vector2(1, 1), Vector2(0.8, 0.8), 0.05, Tween.TRANS_LINEAR, Tween.EASE_IN)
Expand Down
225 changes: 225 additions & 0 deletions components/HelpPanel.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
[gd_scene load_steps=16 format=2]

[ext_resource path="res://assets/fonts/whitney_r_14.tres" type="DynamicFont" id=1]
[ext_resource path="res://assets/StyleBoxEmpty.tres" type="StyleBox" id=2]
[ext_resource path="res://assets/icons/multiply.svg" type="Texture" id=3]
[ext_resource path="res://assets/fonts/whitney_b_20.tres" type="DynamicFont" id=4]
[ext_resource path="res://assets/fonts/whitney_r_12.tres" type="DynamicFont" id=5]
[ext_resource path="res://assets/icons/youtube.svg" type="Texture" id=6]
[ext_resource path="res://assets/icons/github.svg" type="Texture" id=7]
[ext_resource path="res://components/ChannelBarButton.tscn" type="PackedScene" id=8]
[ext_resource path="res://components/HelpPanel.gd" type="Script" id=9]
[ext_resource path="res://components/ChannelBarButton.gd" type="Script" id=10]
[ext_resource path="res://assets/custom_theme.tres" type="Theme" id=11]

[sub_resource type="StyleBoxFlat" id=21]
bg_color = Color( 0, 0, 0, 0.780392 )

[sub_resource type="StyleBoxFlat" id=22]
bg_color = Color( 0.211765, 0.223529, 0.247059, 1 )
corner_radius_top_left = 8
corner_radius_top_right = 8
corner_radius_bottom_right = 8
corner_radius_bottom_left = 8

[sub_resource type="StyleBoxFlat" id=23]
bg_color = Color( 0, 0, 0, 0 )
corner_radius_top_left = 50
corner_radius_top_right = 50
corner_radius_bottom_right = 50
corner_radius_bottom_left = 50
corner_detail = 20
anti_aliasing = false

[sub_resource type="StyleBoxFlat" id=24]
bg_color = Color( 1, 1, 1, 0.0588235 )
corner_radius_top_left = 50
corner_radius_top_right = 50
corner_radius_bottom_right = 50
corner_radius_bottom_left = 50
corner_detail = 20

[node name="HelpPanel" type="PanelContainer"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
custom_styles/panel = SubResource( 21 )
script = ExtResource( 9 )
__meta__ = {
"_edit_use_anchors_": false
}
_panel_path = NodePath("CC/Panel")
_close_button_path = NodePath("CC/Panel/MC/VB/HB/CloseButton/Button")
_github_button_path = NodePath("CC/Panel/MC/VB/HB2/HB/GithubButton")
_youtube_button_path = NodePath("CC/Panel/MC/VB/HB2/HB/YoutubeButton")

[node name="Button" type="Button" parent="."]
margin_right = 1174.0
margin_bottom = 598.0
custom_styles/hover = ExtResource( 2 )
custom_styles/pressed = ExtResource( 2 )
custom_styles/focus = ExtResource( 2 )
custom_styles/disabled = ExtResource( 2 )
custom_styles/normal = ExtResource( 2 )

[node name="CC" type="CenterContainer" parent="."]
margin_right = 1174.0
margin_bottom = 598.0
mouse_filter = 2

[node name="Panel" type="PanelContainer" parent="CC"]
margin_left = 427.0
margin_top = 224.0
margin_right = 747.0
margin_bottom = 374.0
rect_min_size = Vector2( 320, 150 )
custom_styles/panel = SubResource( 22 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="MC" type="MarginContainer" parent="CC/Panel"]
margin_right = 320.0
margin_bottom = 202.0
custom_constants/margin_right = 16
custom_constants/margin_top = 12
custom_constants/margin_left = 18
custom_constants/margin_bottom = 18

[node name="VB" type="VBoxContainer" parent="CC/Panel/MC"]
margin_left = 18.0
margin_top = 12.0
margin_right = 304.0
margin_bottom = 184.0
custom_constants/separation = 16

[node name="HB" type="HBoxContainer" parent="CC/Panel/MC/VB"]
margin_right = 286.0
margin_bottom = 36.0
size_flags_vertical = 0

[node name="Label" type="Label" parent="CC/Panel/MC/VB/HB"]
margin_top = 6.0
margin_right = 40.0
margin_bottom = 30.0
custom_fonts/font = ExtResource( 4 )
text = "Help"

[node name="HSeparator" type="HSeparator" parent="CC/Panel/MC/VB/HB"]
margin_left = 40.0
margin_right = 250.0
margin_bottom = 36.0
size_flags_horizontal = 3

[node name="CloseButton" type="PanelContainer" parent="CC/Panel/MC/VB/HB"]
margin_left = 250.0
margin_right = 286.0
margin_bottom = 36.0
custom_styles/panel = SubResource( 23 )

[node name="Button" type="Button" parent="CC/Panel/MC/VB/HB/CloseButton"]
margin_right = 36.0
margin_bottom = 36.0
mouse_default_cursor_shape = 2
custom_styles/hover = SubResource( 24 )
custom_styles/pressed = ExtResource( 2 )
custom_styles/focus = ExtResource( 2 )
custom_styles/disabled = ExtResource( 2 )
custom_styles/normal = ExtResource( 2 )
custom_fonts/font = ExtResource( 5 )
shortcut_in_tooltip = false
__meta__ = {
"_edit_use_anchors_": false
}

[node name="MC" type="MarginContainer" parent="CC/Panel/MC/VB/HB/CloseButton"]
margin_right = 36.0
margin_bottom = 36.0
mouse_filter = 2
custom_constants/margin_right = 6
custom_constants/margin_top = 6
custom_constants/margin_left = 6
custom_constants/margin_bottom = 6

[node name="CloseIcon" type="TextureRect" parent="CC/Panel/MC/VB/HB/CloseButton/MC"]
self_modulate = Color( 0.8, 0.8, 0.8, 1 )
margin_left = 6.0
margin_top = 6.0
margin_right = 30.0
margin_bottom = 30.0
rect_min_size = Vector2( 24, 24 )
mouse_filter = 2
texture = ExtResource( 3 )
expand = true
stretch_mode = 6

[node name="VB" type="VBoxContainer" parent="CC/Panel/MC/VB"]
margin_top = 52.0
margin_right = 286.0
margin_bottom = 124.0
custom_constants/separation = 12

[node name="Label2" type="Label" parent="CC/Panel/MC/VB/VB"]
margin_right = 286.0
margin_bottom = 43.0
text = "A clone of Discord's UI made in the Godot Game Engine."
autowrap = true

[node name="Label3" type="Label" parent="CC/Panel/MC/VB/VB"]
margin_top = 55.0
margin_right = 286.0
margin_bottom = 72.0
custom_fonts/font = ExtResource( 1 )
text = "This project is not affiliated with Discord Inc."
autowrap = true

[node name="HB2" type="HBoxContainer" parent="CC/Panel/MC/VB"]
margin_top = 140.0
margin_right = 286.0
margin_bottom = 172.0
mouse_filter = 2

[node name="Label" type="Label" parent="CC/Panel/MC/VB/HB2"]
margin_top = 6.0
margin_right = 83.0
margin_bottom = 26.0
text = "By 3ddelano"

[node name="HB" type="HBoxContainer" parent="CC/Panel/MC/VB/HB2"]
margin_left = 210.0
margin_right = 286.0
margin_bottom = 32.0
mouse_filter = 2
size_flags_horizontal = 10
custom_constants/separation = 12

[node name="GithubButton" type="MarginContainer" parent="CC/Panel/MC/VB/HB2/HB" instance=ExtResource( 8 )]
margin_right = 32.0
margin_bottom = 32.0
rect_min_size = Vector2( 30, 30 )
size_flags_horizontal = 10
size_flags_vertical = 4
theme = ExtResource( 11 )
script = ExtResource( 10 )
__meta__ = {
"_edit_use_anchors_": false,
"tooltip_text": "Test tooltip"
}
_icon_texture = ExtResource( 7 )

[node name="YoutubeButton" type="MarginContainer" parent="CC/Panel/MC/VB/HB2/HB" instance=ExtResource( 8 )]
margin_left = 44.0
margin_right = 76.0
margin_bottom = 32.0
rect_min_size = Vector2( 30, 30 )
size_flags_horizontal = 10
size_flags_vertical = 4
theme = ExtResource( 11 )
script = ExtResource( 10 )
__meta__ = {
"_edit_use_anchors_": false,
"tooltip_text": "Test tooltip"
}
_icon_texture = ExtResource( 6 )

[node name="Tween" type="Tween" parent="."]
Loading

0 comments on commit 0385d17

Please sign in to comment.