Skip to content

Commit 4211111

Browse files
committed
Force dynamic text on recent songs
Song names may contain Chinese characters which wouldn't display properly in English
1 parent 392cdb7 commit 4211111

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

scripts/draw_window_greeting/draw_window_greeting.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function draw_window_greeting() {
162162
}
163163
}
164164
draw_sprite(spr_frame5, theme * 3 + m + 3 * (fdark && theme = 3), b, c)
165-
draw_text_dynamic(b + 2 + (m = 2), c + 1 + (m = 2), string_truncate(filename_name(recent_song[a]), 220))
165+
draw_text_dynamic(b + 2 + (m = 2), c + 1 + (m = 2), string_truncate(filename_name(recent_song[a]), 220), true)
166166
draw_set_halign(fa_right)
167167
draw_text_dynamic(b + 316 + (m = 2), c + 1 + (m = 2), seconds_to_str(floor(date_second_span(recent_song_time[a], date_current_datetime()))))
168168
draw_set_halign(fa_left)

scripts/draw_window_preferences/draw_window_preferences.gml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ function draw_window_preferences() {
231231
if (theme = 3) draw_theme_font(font_main)
232232
if (language != 1) {
233233
if (draw_checkbox(x1 + 40, y1 + 200 + (theme = 3) * 22, show_oldwarning, "Show warning when opening older songs", "Whether to show a warning when opening a song\nsaved in an older version of Note Block Studio.", false, true)) show_oldwarning = !show_oldwarning
234-
draw_text_dynamic(x1 + 40, y1 + 230 + (theme = 3) * 22, "Song folder: " + string_truncate(songfolder, 340))
234+
draw_text_dynamic(x1 + 40, y1 + 230 + (theme = 3) * 22, "Song folder: " + string_truncate(songfolder, 340), true)
235235
popup_set_window(x1 + 40, y1 + 230 + (theme = 3) * 22, 430, 18, songfolder)
236236
if (draw_button2(x1 + 40, y1 + 246 + (theme = 3) * 22, 76, "Open", 0, 1)) {
237237
if (!directory_exists_lib(songfolder)) {
@@ -247,7 +247,7 @@ function draw_window_preferences() {
247247
}
248248
if (draw_button2(x1 + 40 + 84 + 84, y1 + 246 + (theme = 3) * 22, 96, "Use default", 0, 1)) songfolder = songs_directory
249249

250-
draw_text_dynamic(x1 + 40, y1 + 280 + (theme = 3) * 22, "Pattern folder: " + string_truncate(patternfolder, 340))
250+
draw_text_dynamic(x1 + 40, y1 + 280 + (theme = 3) * 22, "Pattern folder: " + string_truncate(patternfolder, 340), true)
251251
popup_set_window(x1 + 40, y1 + 280 + (theme = 3) * 22, 430, 18, patternfolder)
252252
if (draw_button2(x1 + 40, y1 + 296 + (theme = 3) * 22, 76, "Open", 0, 1)) {
253253
if (!directory_exists_lib(patternfolder)) {

scripts/menu_draw/menu_draw.gml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ function menu_draw() {
22
// menu_draw()
33
if (ani < 1) ani += 0.1 * (30 / room_speed) * (1 / obj_controller.currspeed)
44
else ani = 1
5-
var m, menux, menuy, noclick, o, theme, cm;
5+
var m, menux, menuy, noclick, o, theme, cm, menu, force_dynamic;
66
theme = obj_controller.theme;
77
menux[0] = sx
88
menuy[0] = sy
@@ -105,7 +105,9 @@ function menu_draw() {
105105
//}
106106
//}
107107
draw_set_alpha(1 - 0.5 * item_inactive[m, i])
108-
draw_text_dynamic(dx + 36, dy + iy, item_str[m, i], obj_controller.menu_shown == "language")
108+
menu = obj_controller.menu_shown
109+
force_dynamic = (menu == "language" || menu == "file")
110+
draw_text_dynamic(dx + 36, dy + iy, item_str[m, i], force_dynamic)
109111
if (item_shortcut[m, i] != "") {
110112
draw_set_halign(fa_right)
111113
draw_text_dynamic(dx + menu_wid[m] - 20, dy + iy, item_shortcut[m, i])

0 commit comments

Comments
 (0)