Skip to content

Commit

Permalink
add song search
Browse files Browse the repository at this point in the history
  • Loading branch information
jnackmclain committed Dec 9, 2024
1 parent 92480ca commit e48e670
Show file tree
Hide file tree
Showing 4 changed files with 232 additions and 9 deletions.
4 changes: 4 additions & 0 deletions _ark/dx/locale/dx_locale_updates.dta
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,10 @@
(os_voxod "Vocal Overdrive")
(os_voxarrow "Vocal Arrows")

(song_search "Song Search")
(song_search_desc "Search for Song Title or Shortname")
(song_search_title "Song Title")

;track themes
(os_thmreset "[Reset]")
(os_rb3thm "[Default]")
Expand Down
101 changes: 101 additions & 0 deletions _ark/dx/read_write/dx_special_char_funcs.dta
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,105 @@
{search_replace $dx_track_theme_name "ý" "_" $dx_track_theme_name}
{search_replace $dx_track_theme_name "þ" "_" $dx_track_theme_name}
{search_replace $dx_track_theme_name "ÿ" "_" $dx_track_theme_name}
}
{func
dx_special_char
($in)
{tolower $in}
{search_replace $in " " "" $in}
{search_replace $in "#" "" $in}
{search_replace $in "!" "" $in}
;{search_replace $in "\q" "" $in}
{search_replace $in "$" "" $in}
{search_replace $in "%" "" $in}
{search_replace $in "&" "" $in}
{search_replace $in "'" "" $in}
;{search_replace $in "(" "" $in}
;{search_replace $in ")" "" $in}
{search_replace $in "*" "" $in}
{search_replace $in "+" "" $in}
{search_replace $in "," "" $in}
{search_replace $in "-" "" $in}
{search_replace $in "." "" $in}
{search_replace $in "/" "" $in}
{search_replace $in ":" "" $in}
{search_replace $in ";" "" $in}
{search_replace $in "=" "" $in}
{search_replace $in "?" "" $in}
{search_replace $in "@" "" $in}
{search_replace $in "[" "" $in}
{search_replace $in "]" "" $in}
{search_replace $in "^" "" $in}
{search_replace $in "`" "" $in}
;{search_replace $in "{" "" $in}
{search_replace $in "|" "" $in}
;{search_replace $in "}" "" $in}
{search_replace $in "~" "" $in}
{search_replace $in "°" "" $in}
{search_replace $in "©" "" $in}
{search_replace $in "®" "" $in}
{search_replace $in "¡" "" $in}
{search_replace $in "¿" "" $in}
{search_replace $in "À" "" $in}
{search_replace $in "Á" "" $in}
{search_replace $in "Â" "" $in}
{search_replace $in "Ã" "" $in}
{search_replace $in "Ä" "" $in}
{search_replace $in "Å" "" $in}
{search_replace $in "Æ" "" $in}
{search_replace $in "Ç" "" $in}
{search_replace $in "Î" "" $in}
{search_replace $in "É" "" $in}
{search_replace $in "Ê" "" $in}
{search_replace $in "Ë" "" $in}
{search_replace $in "Ì" "" $in}
{search_replace $in "Í" "" $in}
{search_replace $in "Ï" "" $in}
{search_replace $in "Ð" "" $in}
{search_replace $in "Ñ" "" $in}
{search_replace $in "Ò" "" $in}
{search_replace $in "Ó" "" $in}
{search_replace $in "Ô" "" $in}
{search_replace $in "Õ" "" $in}
{search_replace $in "Ö" "" $in}
{search_replace $in "Ø" "" $in}
{search_replace $in "Ù" "" $in}
{search_replace $in "Ú" "" $in}
{search_replace $in "Û" "" $in}
{search_replace $in "Ü" "" $in}
{search_replace $in "Ý" "" $in}
{search_replace $in "Þ" "" $in}
{search_replace $in "ß" "" $in}
{search_replace $in "à" "" $in}
{search_replace $in "á" "" $in}
{search_replace $in "â" "" $in}
{search_replace $in "ã" "" $in}
{search_replace $in "ä" "" $in}
{search_replace $in "å" "" $in}
{search_replace $in "æ" "" $in}
{search_replace $in "ç" "" $in}
{search_replace $in "è" "" $in}
{search_replace $in "é" "" $in}
{search_replace $in "ê" "" $in}
{search_replace $in "ë" "" $in}
{search_replace $in "ì" "" $in}
{search_replace $in "í" "" $in}
{search_replace $in "î" "" $in}
{search_replace $in "ï" "" $in}
{search_replace $in "ð" "" $in}
{search_replace $in "ñ" "" $in}
{search_replace $in "ò" "" $in}
{search_replace $in "ó" "" $in}
{search_replace $in "ô" "" $in}
{search_replace $in "õ" "" $in}
{search_replace $in "ö" "" $in}
{search_replace $in "ø" "" $in}
{search_replace $in "ù" "" $in}
{search_replace $in "ú" "" $in}
{search_replace $in "û" "" $in}
{search_replace $in "ü" "" $in}
{search_replace $in "ý" "" $in}
{search_replace $in "þ" "" $in}
{search_replace $in "ÿ" "" $in}
{tolower $in}
}
134 changes: 126 additions & 8 deletions _ark/ui/song_select/song_select.dta
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,97 @@
$token}
{set $ret $button}}}
$ret})
(VIRTUAL_KEYBOARD_RESULT_MSG
{if
{&&
$ok
$this
{!
{==
$text
""}}}
;sanitize player input
{set $got_text {dx_special_char $text}}
;force song sort
{{music_library get view_settings_provider} refresh_all_settings}
{song_select_filter_panel filter_enter}
{{music_library get view_settings_provider} select_setting 1}
{{music_library get view_settings_provider} select_setting_option 0}
{music_library report_sort_and_filters}
{song_select_filter_panel filter_exit}
;jump to top of song select
{music_library skip_to_shortcut 1}
;jump to the first letter shortcut
{switch {str_elem $got_text 0}
((0 1 2 3 4 5 6 7 8 9)
{music_library skip_to_shortcut 1}
)
("a" {music_library skip_to_shortcut 2})
("b" {music_library skip_to_shortcut 3})
("c" {music_library skip_to_shortcut 4})
("d" {music_library skip_to_shortcut 5})
("e" {music_library skip_to_shortcut 6})
("f" {music_library skip_to_shortcut 7})
("g" {music_library skip_to_shortcut 8})
("h" {music_library skip_to_shortcut 9})
("i" {music_library skip_to_shortcut 10})
("j" {music_library skip_to_shortcut 11})
("k" {music_library skip_to_shortcut 12})
("l" {music_library skip_to_shortcut 13})
("m" {music_library skip_to_shortcut 14})
("n" {music_library skip_to_shortcut 15})
("o" {music_library skip_to_shortcut 16})
("p" {music_library skip_to_shortcut 17})
("q" {music_library skip_to_shortcut 18})
("r" {music_library skip_to_shortcut 19})
("s" {music_library skip_to_shortcut 20})
("t" {music_library skip_to_shortcut 21})
("u" {music_library skip_to_shortcut 22})
("v" {music_library skip_to_shortcut 23})
("w" {music_library skip_to_shortcut 24})
("x" {music_library skip_to_shortcut 25})
("y" {music_library skip_to_shortcut 26})
("z" {music_library skip_to_shortcut 27})
}
;start searching for the song
{foreach_int $i 1 {- {song.lst num_data} 2}
{if_else
{||
{&&
{== {{music_library get_highlighted_node} get_node_type} kNodeSong}
{has_substr {dx_special_char {{music_library get_highlighted_node} title}} $got_text}
}
{&&
{== {{music_library get_highlighted_node} get_node_type} kNodeSong}
{has_substr {dx_special_char {{music_library get_highlighted_node} get_token}} $got_text}
}
}
kDataUnhandled
{if
{||
{== {{music_library get_highlighted_node} get_node_type} kNodeSubheader}
{== {{music_library get_highlighted_node} get_node_type} kNodeShortcut}
{== {{music_library get_highlighted_node} get_node_type} kNodeHeader}
{== {{music_library get_highlighted_node} get_node_type} kNodeFunction}
{&&
{== {{music_library get_highlighted_node} get_node_type} kNodeSong}
{! {has_substr {dx_special_char {{music_library get_highlighted_node} get_token}} $got_text}}
}
{&&
{== {{music_library get_highlighted_node} get_node_type} kNodeSong}
{! {has_substr {dx_special_char {{music_library get_highlighted_node} title}} $got_text}}
}
}
{if_else {== {song.lst selected_pos} {- {song.lst num_data} 3}}
{song.lst set_selected_simulate_scroll 0}
{song.lst set_selected_simulate_scroll {+ {song.lst selected_pos} 1}}
}
}
}

}
}
)
(SELECT_MSG
{unless {|| $dx_customizer $dx_auto_endurance}
{with
Expand Down Expand Up @@ -2048,16 +2139,43 @@
{is_leader_local}
{if_else
{machine_mgr all_machines_have_same_net_ui_state}
{ui
sync_screen
{music_library get_back_screen}
0}
;dx virtual keyboard
{virtual_keyboard
show_keyboard
$user
17
{localize song_search}
{localize song_search_desc}
{if_else {== {{music_library get_highlighted_node} get_node_type} kNodeSong}
{{music_library get_highlighted_node} title}
{localize song_search_title}
}
$this
}
;{ui sync_screen {music_library get_back_screen} 0}
{ui_event_mgr trigger_event remote_not_ready}}
{ui_event_mgr trigger_event remote_exit}}
{ui
go_back_screen
{music_library get_back_screen}
$user}}}})
;dx, fallback to search on hold red lmao
{virtual_keyboard
show_keyboard
$user
17
{localize song_search}
{localize song_search_desc}
{if_else {== {{music_library get_highlighted_node} get_node_type} kNodeSong}
{{music_library get_highlighted_node} title}
{localize song_search_title}
}
$this
}
;{ui
; go_back_screen
; {music_library get_back_screen}
; $user}
}
}
}
)
({'||'
#ifdef HX_WII
{==
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_ps3.bat
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ copy "%~dp0..\out\ps3\USRDIR\EBOOT.BIN" "%rpcs3_path%\dev_hdd0\game\BLUS30463\US
:rpcs3_start
if not defined base_eboot_path goto :end
taskkill /IM rpcs3.exe /F
START "" "%rpcs3_path%\rpcs3.exe" "%base_eboot_path%" --no-gui
START "" "%rpcs3_path%\rpcs3.exe" "%base_eboot_path%"

if not defined run_rich_presence goto :end
cd "%~dp0"
Expand Down

0 comments on commit e48e670

Please sign in to comment.