Skip to content

Commit a02ecd3

Browse files
committed
add spinner value text y offset
1 parent dab1335 commit a02ecd3

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

current-scripts/Demos/useful-scripts/objects/obj_menu_base/obj_menu_base.yy

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

current-scripts/Demos/useful-scripts/scripts/menu_base_functions/menu_base_functions.gml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function handle_selectable_confirm(_item) {
5555
}
5656

5757
if (!_item.silent_on_confirm && audio_exists(cursor_confirm_sfx)) {
58-
audio_play_sound(cursor_confirm_sfx, 1, false);
58+
inst_audio_controller.play_sfx(cursor_confirm_sfx, 1, false);
5959
}
6060
}
6161

@@ -68,7 +68,7 @@ function handle_spinner_confirm(_item) {
6868
}
6969

7070
if (!_item.silent_on_confirm && audio_exists(cursor_confirm_sfx)) {
71-
audio_play_sound(cursor_confirm_sfx, 1, false);
71+
inst_audio_controller.play_sfx(cursor_confirm_sfx, 1, false);
7272
}
7373
}
7474

@@ -91,7 +91,7 @@ function handle_spinner_change(_item, _delta) {
9191
}
9292

9393
if (!_item.silent_on_change && audio_exists(cursor_change_sfx)) {
94-
audio_play_sound(cursor_change_sfx, 1, false);
94+
inst_audio_controller.play_sfx(cursor_change_sfx, 1, false);
9595
}
9696
}
9797

@@ -111,7 +111,7 @@ function handle_key_config_select(_item, _delta) {
111111
} until (_item.current_binding_index == _original_value || _last_pressed.control_type == _binding_info.control_type)
112112

113113
if (_item.current_binding_index != _original_value && !_item.silent_on_change && audio_exists(cursor_change_sfx)) {
114-
audio_play_sound(cursor_change_sfx, 1, false);
114+
inst_audio_controller.play_sfx(cursor_change_sfx, 1, false);
115115
}
116116
}
117117

@@ -235,7 +235,7 @@ function menu_base_draw_item(_item, _x, _y) {
235235
draw_set_font(self.menu_label_font);
236236
draw_text(_x, _y, _item.label);
237237
draw_set_font(self.menu_value_font);
238-
draw_text(_x + label_width, _y, _item.get_value());
238+
draw_text(_x + label_width, _y + spinner_value_text_y_offset, _item.get_value());
239239
break;
240240

241241
case "keyconfig":
@@ -251,7 +251,7 @@ function menu_base_draw_item(_item, _x, _y) {
251251
var _item_icon_index = _item.get_icon_index(CONTROL_TYPE.KEYBOARD_AND_MOUSE, i);
252252
draw_sprite_ext(keyboard_icons[keyboard_icons_index], _item_icon_index, _cur_x, _y + control_icons_y_offset * control_icons_scale, control_icons_scale, control_icons_scale, 0, c_white, menu_alpha.v);
253253
if (_item.locked_kbm_bindings[i]) {
254-
draw_sprite_ext(lock_sprite, 0,
254+
draw_sprite_ext(spr_lock, 0,
255255
_cur_x + keyboard_icons_width[keyboard_icons_index] * control_icons_scale + 24,
256256
_y + (control_icons_y_offset + keyboard_icons_half_height[keyboard_icons_index]) * control_icons_scale,
257257
control_icons_scale, control_icons_scale, 0, c_white, menu_alpha.v
@@ -286,7 +286,7 @@ function menu_base_draw_item(_item, _x, _y) {
286286
var _item_icon_index = _item.get_icon_index(CONTROL_TYPE.GAMEPAD, i);
287287
draw_sprite_ext(gamepad_icons[gamepad_icons_index], _item_icon_index, _cur_x, _y + control_icons_y_offset * control_icons_scale, control_icons_scale, control_icons_scale, 0, c_white, menu_alpha.v);
288288
if (_item.locked_gamepad_bindings[i]) {
289-
draw_sprite_ext(lock_sprite, 0,
289+
draw_sprite_ext(spr_lock, 0,
290290
_cur_x + gamepad_icons_width[gamepad_icons_index] * control_icons_scale + 24,
291291
_y + (control_icons_y_offset + gamepad_icons_half_height[gamepad_icons_index]) * control_icons_scale,
292292
control_icons_scale, control_icons_scale, 0, c_white, menu_alpha.v

current-scripts/Demos/useful-scripts/useful-scripts.resource_order

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
{"name":"control_manager_structs","order":1,"path":"scripts/control_manager_structs/control_manager_structs.yy",},
8888
{"name":"menu_base_functions","order":2,"path":"scripts/menu_base_functions/menu_base_functions.yy",},
8989
{"name":"fnt_url","order":3,"path":"fonts/fnt_url/fnt_url.yy",},
90-
{"name":"fnt_menu_value","order":4,"path":"fonts/fnt_menu_value/fnt_menu_value.yy",},
9190
{"name":"nested_menu_functions","order":1,"path":"scripts/nested_menu_functions/nested_menu_functions.yy",},
9291
{"name":"spr_arrow","order":1,"path":"sprites/spr_arrow/spr_arrow.yy",},
9392
{"name":"room_column_menu_demo","order":5,"path":"rooms/room_column_menu_demo/room_column_menu_demo.yy",},

0 commit comments

Comments
 (0)