Skip to content

Commit

Permalink
add toggles
Browse files Browse the repository at this point in the history
  • Loading branch information
jnackmclain committed Nov 10, 2024
1 parent 3d99817 commit 9533fa0
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 13 deletions.
11 changes: 11 additions & 0 deletions _ark/dx/locale/dx_locale_updates.dta
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,17 @@
(os_highway_username_on_desc "Username display on highway is enabled")
(os_highway_username_off "Username: OFF")
(os_highway_username_off_desc "Username display on highway is disabled")

(os_highway_username_inst_on "Instrument Icon: ON")
(os_highway_username_inst_on_desc "Instrument Icon in Username is enabled")
(os_highway_username_inst_off "Instrument Icon: OFF")
(os_highway_username_inst_off_desc "Instrument Icon in Username is disabled")

(os_highway_username_sp_inst_on "Icon in Single Player: ON")
(os_highway_username_sp_inst_on_desc "Instrument Icon added in Single Player")
(os_highway_username_sp_inst_off "Icon in Single Player: OFF")
(os_highway_username_sp_inst_off_desc "Instrument Icon not added in Single Player")

(os_highway_overdrive_on "Overdrive: ON")
(os_highway_overdrive_on_desc "Overdrive display on highway is enabled")
(os_highway_overdrive_off "Overdrive: OFF")
Expand Down
60 changes: 47 additions & 13 deletions _ark/dx/overshell/dx_hud_states.dta
Original file line number Diff line number Diff line change
Expand Up @@ -1426,12 +1426,14 @@
)


#define dx_track_username_ELEMENTS_DATA
#define DX_TRACK_USERNAME_ELEMENTS_DATA
(
{do
($options
{array 0})
{push_back $options {if_else $dx_track_username os_highway_username_on os_highway_username_off}}
{push_back $options {if_else $dx_highway_username_inst os_highway_username_inst_on os_highway_username_inst_off}}
{push_back $options {if_else $dx_highway_username_sp_inst os_highway_username_sp_inst_on os_highway_username_sp_inst_off}}
{push_back $options os_pos}
{push_back $options os_col}
{push_back $options os_text_options}
Expand All @@ -1440,7 +1442,7 @@
)
(dxState_TrackHighwayUsername
(view
dx_track_username_ELEMENTS_DATA
DX_TRACK_USERNAME_ELEMENTS_DATA
{overshell_view_chooser}
)
(SCROLL_MSG
Expand All @@ -1461,7 +1463,39 @@
}
}
{dx_state_pos_tracker}
dx_track_username_ELEMENTS_DATA
DX_TRACK_USERNAME_ELEMENTS_DATA
{set $previous_state dxState_TrackHighwayUsername}
)
((os_highway_username_inst_on os_highway_username_inst_off)
{set $dx_highway_username_inst {! $dx_highway_username_inst}}
{if_else $dx_highway_username_inst
{set $dx_tracked_changed os_highway_username_inst_on}
{set $dx_tracked_changed os_highway_username_inst_off}
}
{beatmatch foreach_active_player $player
{if {!= {$player instrument} vocals}
{dx_track_label dx_track_label_username $dx_track_username_size $dx_track_username_font $dx_track_username_alignment $dx_track_username_kerning {{$player get_user} get_slot_num} $dx_track_username_x $dx_track_username_y $dx_track_username_r $dx_track_username_g $dx_track_username_b TRUE}
{if $dx_track_username {dx_show_track_username}}
}
}
{dx_state_pos_tracker}
DX_TRACK_USERNAME_ELEMENTS_DATA
{set $previous_state dxState_TrackHighwayUsername}
)
((os_highway_username_sp_inst_on os_highway_username_sp_inst_off)
{set $dx_highway_username_sp_inst {! $dx_highway_username_sp_inst}}
{if_else $dx_highway_username_sp_inst
{set $dx_tracked_changed os_highway_username_sp_inst_on}
{set $dx_tracked_changed os_highway_username_sp_inst_off}
}
{beatmatch foreach_active_player $player
{if {!= {$player instrument} vocals}
{dx_track_label dx_track_label_username $dx_track_username_size $dx_track_username_font $dx_track_username_alignment $dx_track_username_kerning {{$player get_user} get_slot_num} $dx_track_username_x $dx_track_username_y $dx_track_username_r $dx_track_username_g $dx_track_username_b TRUE}
{if $dx_track_username {dx_show_track_username}}
}
}
{dx_state_pos_tracker}
DX_TRACK_USERNAME_ELEMENTS_DATA
{set $previous_state dxState_TrackHighwayUsername}
)
(os_pos
Expand All @@ -1478,7 +1512,7 @@
)
}
{set $in_state FALSE}
dx_track_username_ELEMENTS_DATA
DX_TRACK_USERNAME_ELEMENTS_DATA
{set $previous_state dxState_TrackHighwayUsername}
)
(exit
Expand All @@ -1490,7 +1524,7 @@
)
)

#define dx_track_overdrive_ELEMENTS_DATA
#define DX_TRACK_OVERDRIVE_ELEMENTS_DATA
(
{do
($options
Expand All @@ -1504,7 +1538,7 @@
)
(dxState_TrackHighwayOverdrive
(view
dx_track_overdrive_ELEMENTS_DATA
DX_TRACK_OVERDRIVE_ELEMENTS_DATA
{overshell_view_chooser}
)
(SCROLL_MSG
Expand All @@ -1526,7 +1560,7 @@
}
}
{dx_state_pos_tracker}
dx_track_overdrive_ELEMENTS_DATA
DX_TRACK_OVERDRIVE_ELEMENTS_DATA
{set $previous_state dxState_TrackHighwayOverdrive}
)
(os_pos
Expand All @@ -1543,7 +1577,7 @@
)
}
{set $in_state FALSE}
dx_track_overdrive_ELEMENTS_DATA
DX_TRACK_OVERDRIVE_ELEMENTS_DATA
{set $previous_state dxState_TrackHighwayOverdrive}
)
(exit
Expand All @@ -1555,7 +1589,7 @@
)
)

#define dx_track_streak_ELEMENTS_DATA
#define DX_TRACK_STREAK_ELEMENTS_DATA
(
{do
($options
Expand All @@ -1570,7 +1604,7 @@
)
(dxState_TrackHighwayStreak
(view
dx_track_streak_ELEMENTS_DATA
DX_TRACK_STREAK_ELEMENTS_DATA
{overshell_view_chooser}
)
(SCROLL_MSG
Expand All @@ -1592,7 +1626,7 @@
}
}
{dx_state_pos_tracker}
dx_track_streak_ELEMENTS_DATA
DX_TRACK_STREAK_ELEMENTS_DATA
{set $previous_state dxState_TrackHighwayStreak}
)
((os_highway_streak_gh3_delay_on os_highway_streak_gh3_delay_off)
Expand All @@ -1609,7 +1643,7 @@
}
}
{dx_state_pos_tracker}
dx_track_streak_ELEMENTS_DATA
DX_TRACK_STREAK_ELEMENTS_DATA
{set $previous_state dxState_TrackHighwayStreak}
)
(os_pos
Expand All @@ -1626,7 +1660,7 @@
)
}
{set $in_state FALSE}
dx_track_streak_ELEMENTS_DATA
DX_TRACK_STREAK_ELEMENTS_DATA
{set $previous_state dxState_TrackHighwayStreak}
)
(exit
Expand Down
10 changes: 10 additions & 0 deletions _ark/dx/read_write/dx_reader_macros.dta
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,16 @@
{elem {find $entry dx_track_username} 1}
}
}
{if {== {elem $entry 0} {basename dx_track_username_inst}}
{set $dx_track_username_inst
{elem {find $entry dx_track_username_inst} 1}
}
}
{if {== {elem $entry 0} {basename dx_track_username_sp_inst}}
{set $dx_track_username_sp_inst
{elem {find $entry dx_track_username_sp_inst} 1}
}
}
{if {== {elem $entry 0} {basename dx_track_username_size}}
{set $dx_track_username_size
{elem {find $entry dx_track_username_size} 1}
Expand Down
2 changes: 2 additions & 0 deletions _ark/dx/read_write/dx_writer_macros.dta
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@
{dx_setting_saver dx_settings dx_track_overdrive_g $dx_track_overdrive_g}
{dx_setting_saver dx_settings dx_track_overdrive_b $dx_track_overdrive_b}
{dx_setting_saver dx_settings dx_track_username $dx_track_username}
{dx_setting_saver dx_settings dx_track_username_inst $dx_track_username_inst}
{dx_setting_saver dx_settings dx_track_username_sp_inst $dx_track_username_sp_inst}
{dx_setting_saver dx_settings dx_track_username_size $dx_track_username_size}
{dx_setting_saver dx_settings dx_track_username_font $dx_track_username_font}
{dx_setting_saver dx_settings dx_track_username_alignment $dx_track_username_alignment}
Expand Down
3 changes: 3 additions & 0 deletions _ark/dx/track/track_ui/dx_track_ui_funcs.dta
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@
}
}
{cond
({&& {== {beatmatch num_active_players} 1} $dx_highway_username_inst $dx_highway_username_sp_inst $dx_current_player_name_sanitized}
{$this_track_username_label set_token_fmt {sprint $dx_current_player_name_sanitized " - " "<alt>" {localize $this_icon} "</alt>"}}
)
({&& {== {beatmatch num_active_players} 1} $dx_current_player_name_sanitized}
{$this_track_username_label set_token_fmt {sprint $dx_current_player_name_sanitized}}
)
Expand Down
1 change: 1 addition & 0 deletions _ark/dx/ui/dx_ui_init.dta
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ DX_CURRENT_SONG_CLEAR
{set $dx_track_overdrive_b 1}

{set $dx_highway_username_inst TRUE}
{set $dx_highway_username_sp_inst FALSE}
{set $dx_track_streak TRUE}
{set $dx_track_streak_gh3_delay FALSE}
{set $dx_track_streak_size 1}
Expand Down

0 comments on commit 9533fa0

Please sign in to comment.