changed the difficulty stars to be skulls instead, to better reflect how LSS handles stars

This commit is contained in:
JHDev2006
2025-09-20 18:39:14 +01:00
parent d73a288672
commit 99066de39b
3 changed files with 11 additions and 4 deletions

View File

@@ -11,7 +11,8 @@ var level_time := 0
var game_style := "SMBLL"
var difficulty := 0
var file_path := ""
var is_downloaded := false
var level_id := ""
var idx := 0
const CAMPAIGN_RECTS := {
@@ -54,8 +55,11 @@ func _ready() -> void:
update_visuals()
func update_visuals() -> void:
%LevelIcon.texture = ResourceSetter.get_resource(ICON_TEXTURES[level_time])
%LevelIcon.region_rect = THEME_RECTS[level_theme]
if is_downloaded:
%LevelIcon.texture = ImageTexture.create_from_image(Image.load_from_file("user://custom_levels/downloaded/thumbnails/" + level_id + ".png"))
else:
%LevelIcon.texture = ResourceSetter.get_resource(ICON_TEXTURES[level_time])
%LevelIcon.region_rect = THEME_RECTS[level_theme]
%LevelName.text = level_name if level_name != "" else "(Unnamed Level)"
%LevelAuthor.text = "By " + (level_author if level_author != "" else "Player")
@@ -64,7 +68,7 @@ func update_visuals() -> void:
var idx := 0
for i in %DifficultyStars.get_children():
i.region_rect.position.x = 24 if idx > difficulty else [0, 0, 8, 8, 16][difficulty]
i.region_rect.position.x = 32 if idx > difficulty else [0, 8, 8, 16, 24][difficulty]
idx += 1
func _process(_delta: float) -> void: