From e3b3dfc9b3f6ce39a9d566dc7e63fb18a114df04 Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Sun, 3 May 2020 00:23:07 +0930 Subject: [PATCH] Made song tiles smaller in song selection --- assets/MenuDiffNumberFont.tres | 9 +++++++++ scripts/Menu.gd | 9 +++++---- 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 assets/MenuDiffNumberFont.tres diff --git a/assets/MenuDiffNumberFont.tres b/assets/MenuDiffNumberFont.tres new file mode 100644 index 0000000..1ecdeaf --- /dev/null +++ b/assets/MenuDiffNumberFont.tres @@ -0,0 +1,9 @@ +[gd_resource type="DynamicFont" load_steps=2 format=2] + +[ext_resource path="res://assets/Sniglet-Regular.ttf" type="DynamicFontData" id=1] + +[resource] +size = 36 +outline_size = 1 +outline_color = Color( 0, 0, 0, 1 ) +font_data = ExtResource( 1 ) diff --git a/scripts/Menu.gd b/scripts/Menu.gd index 64f4417..b290de0 100644 --- a/scripts/Menu.gd +++ b/scripts/Menu.gd @@ -34,6 +34,7 @@ var touch_rects = [] var TitleFont := preload('res://assets/MenuTitleFont.tres') var GenreFont := preload('res://assets/MenuGenreFont.tres') +var DiffNumFont := preload('res://assets/MenuDiffNumberFont.tres') var ScoreFont := preload('res://assets/MenuScoreFont.tres') var snd_interact := preload('res://assets/softclap.wav') @@ -107,7 +108,7 @@ func draw_songtile(song_key, position, size, title_text:=false, difficulty=selec # draw_texture_rect(song_images[song_key], rect, false) draw_texture_rect(Library.get_song_tile_texture(song_key), rect, false) # Draw track difficulty rating - draw_string_centered(GenreFont, Vector2(position.x+size-24, position.y+size-56), song_defs[song_key]['chart_difficulties'].get(Library.Song.default_difficulty_keys[difficulty], 0), diff_color) + draw_string_centered(DiffNumFont, Vector2(position.x+size-17, position.y+size-40), song_defs[song_key]['chart_difficulties'].get(Library.Song.default_difficulty_keys[difficulty], 0), diff_color) if title_text: draw_string_centered(TitleFont, Vector2(position.x+size/2.0, position.y+size), song_defs[song_key]['title'], Color(0.95, 0.95, 1.0)) return rect @@ -118,11 +119,11 @@ func diffstr(difficulty: float): func _draw_song_select(center: Vector2) -> Array: - var size = 216 + var size = 128 var spacer_x = 12 var spacer_y = 64 - var sel_scales := [1.0, 0.8, 0.64, 0.512, 0.4096] - var bg_scales := [0.64, 0.64, 0.64, 0.512, 0.4096] + var sel_scales := [1.0, 0.8, 0.64, 0.64, 0.64, 0.512, 0.4096] + var bg_scales := [0.64, 0.64, 0.64, 0.64, 0.64, 0.512, 0.4096] var gy := center.y -250 var touchrects := []