Skip to content

Commit

Permalink
add icon svg
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisEscorza committed Apr 9, 2024
1 parent 423f339 commit 12e3b3b
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 5 deletions.
2 changes: 1 addition & 1 deletion addons/label_font_auto_sizer/label_auto_sizer.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
tool
extends Label
class_name LabelAutoSizer
class_name LabelAutoSizer, "res://addons/label_font_auto_sizer/label_font_auto_sizer.svg"


#region --External variables--
Expand Down
46 changes: 46 additions & 0 deletions addons/label_font_auto_sizer/label_font_auto_sizer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions addons/label_font_auto_sizer/label_font_auto_sizer.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/label_font_auto_sizer.svg-b16c9d662efa0cc220e1bcfaaa0e904f.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/label_font_auto_sizer/label_font_auto_sizer.svg"
dest_files=[ "res://.import/label_font_auto_sizer.svg-b16c9d662efa0cc220e1bcfaaa0e904f.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
2 changes: 1 addition & 1 deletion addons/label_font_auto_sizer/rich_label_auto_sizer.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
tool
extends RichTextLabel
class_name RichLabelAutoSizer
class_name RichLabelAutoSizer, "res://addons/label_font_auto_sizer/label_font_auto_sizer.svg"

#region External variables
## The number of times the auto sizer will shrink the font to try to fit the text into the control rect.
Expand Down
5 changes: 5 additions & 0 deletions demo/in_editor_demo.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ valign = 1
autowrap = true
clip_text = true
script = ExtResource( 2 )
_max_steps = 4
_size_per_step = 2
_print_debug_enabled = false
_size_just_modified_by_autosizer = false
_set_defaults = true
_base_font_size = 40
Expand Down Expand Up @@ -78,6 +81,8 @@ text = "This is a RichTextLabel, the line count methods work are wonky, but calc
scroll_active = false
script = ExtResource( 3 )
_max_steps = 10
_size_per_step = 2
_print_debug_enabled = false
_size_just_modified_by_autosizer = false
_set_defaults = true
_base_font_size = 46
Expand Down
2 changes: 1 addition & 1 deletion demo/play_scene_demo.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ valign = 1
autowrap = true
clip_text = true
script = ExtResource( 2 )
_max_steps = 10
_max_steps = 5
_size_just_modified_by_autosizer = false
_set_defaults = true
_base_font_size = 36
Expand Down
5 changes: 3 additions & 2 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ _global_script_classes=[ {
"path": "res://addons/label_font_auto_sizer/rich_label_auto_sizer.gd"
} ]
_global_script_class_icons={
"LabelAutoSizer": "",
"RichLabelAutoSizer": ""
"LabelAutoSizer": "res://addons/label_font_auto_sizer/LabelFontAutoSizer.svg",
"RichLabelAutoSizer": "res://addons/label_font_auto_sizer/LabelFontAutoSizer.svg"
}

[application]

config/name="Label Font Auto Sizer"
run/main_scene="res://demo/play_scene_demo.tscn"
config/icon="res://addons/label_font_auto_sizer/label_font_auto_sizer.svg"

[autoload]

Expand Down

0 comments on commit 12e3b3b

Please sign in to comment.