mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-11-20 00:46:34 +00:00
Add icons for new features (#611)
* Added icons for input recording, updated menu names * Added missing input recording icons, added auto update icon * Added input_record * Added input_playback * Added menu_open_start_press * Added save_state_load * Added save_state_save * Added missing icons, fixed size of camera icons * Fixed save_state_slot icon
This commit is contained in:
parent
f5e73d0ef8
commit
be74ce9959
4 changed files with 20 additions and 20 deletions
Binary file not shown.
|
@ -183,7 +183,7 @@ pub unsafe fn get_command_flag_cat(module_accessor: &mut BattleObjectModuleAcces
|
|||
|
||||
if entry_id_int == 0 && !fighter_is_nana {
|
||||
if button_config::combo_passes_exclusive(button_config::ButtonCombo::InputPlayback) {
|
||||
playback(MENU.playback_button_combination.get_random().into_idx());
|
||||
playback(MENU.playback_button_slots.get_random().into_idx());
|
||||
} else if MENU.record_trigger.contains(RecordTrigger::COMMAND)
|
||||
&& button_config::combo_passes_exclusive(button_config::ButtonCombo::InputRecord)
|
||||
{
|
||||
|
@ -313,7 +313,7 @@ pub unsafe fn lockout_record() {
|
|||
.for_each(|mapped_input| {
|
||||
*mapped_input = MappedInputs::empty();
|
||||
});
|
||||
CURRENT_FRAME_LENGTH = MENU.recording_frames.into_frames();
|
||||
CURRENT_FRAME_LENGTH = MENU.recording_duration.into_frames();
|
||||
P1_FRAME_LENGTH_MAPPING.lock()[CURRENT_RECORD_SLOT] = CURRENT_FRAME_LENGTH;
|
||||
LOCKOUT_FRAME = 30; // This needs to be this high or issues occur dropping shield - but does this cause problems when trying to record ledge?
|
||||
BUFFER_FRAME = 0;
|
||||
|
|
|
@ -78,8 +78,8 @@ pub struct TrainingModpackMenu {
|
|||
pub trump_override: Action,
|
||||
pub recording_slot: RecordSlot,
|
||||
pub record_trigger: RecordTrigger,
|
||||
pub recording_frames: RecordingFrames,
|
||||
pub playback_button_combination: PlaybackSlot,
|
||||
pub recording_duration: RecordingDuration,
|
||||
pub playback_button_slots: PlaybackSlot,
|
||||
pub hitstun_playback: HitstunPlayback,
|
||||
pub playback_mash: OnOff,
|
||||
pub playback_loop: OnOff,
|
||||
|
@ -182,9 +182,9 @@ pub static DEFAULTS_MENU: TrainingModpackMenu = TrainingModpackMenu {
|
|||
landing_override: Action::empty(),
|
||||
trump_override: Action::empty(),
|
||||
recording_slot: RecordSlot::S1,
|
||||
recording_frames: RecordingFrames::F150,
|
||||
recording_duration: RecordingDuration::F150,
|
||||
record_trigger: RecordTrigger::COMMAND,
|
||||
playback_button_combination: PlaybackSlot::S1,
|
||||
playback_button_slots: PlaybackSlot::S1,
|
||||
hitstun_playback: HitstunPlayback::Hitstun,
|
||||
playback_mash: OnOff::On,
|
||||
playback_loop: OnOff::Off,
|
||||
|
@ -849,12 +849,12 @@ pub unsafe fn ui_menu(menu: TrainingModpackMenu) -> UiMenu {
|
|||
false,
|
||||
&(menu.record_trigger.bits() as u32),
|
||||
);
|
||||
input_tab.add_submenu_with_toggles::<RecordingFrames>(
|
||||
input_tab.add_submenu_with_toggles::<RecordingDuration>(
|
||||
"Recording Duration".to_string(),
|
||||
"recording_frames".to_string(),
|
||||
"recording_duration".to_string(),
|
||||
"Recording Duration: Number of frames to record for in the current slot".to_string(),
|
||||
true,
|
||||
&(menu.recording_frames as u32),
|
||||
&(menu.recording_duration as u32),
|
||||
);
|
||||
input_tab.add_submenu_with_toggles::<OnOff>(
|
||||
"Recording Crop".to_string(),
|
||||
|
@ -864,11 +864,11 @@ pub unsafe fn ui_menu(menu: TrainingModpackMenu) -> UiMenu {
|
|||
&(menu.recording_crop as u32),
|
||||
);
|
||||
input_tab.add_submenu_with_toggles::<PlaybackSlot>(
|
||||
"Playback Button Combination".to_string(),
|
||||
"playback_button_combination".to_string(),
|
||||
format!("Playback Button Combination: Choose which slots to playback input recording upon pressing button combination ({})", menu.input_playback.combination_string()),
|
||||
"Playback Button Slots".to_string(),
|
||||
"playback_button_slots".to_string(),
|
||||
format!("Playback Button Slots: Choose which slots to playback input recording upon pressing button combination ({})", menu.input_playback.combination_string()),
|
||||
false,
|
||||
&(menu.playback_button_combination.bits() as u32),
|
||||
&(menu.playback_button_slots.bits() as u32),
|
||||
);
|
||||
input_tab.add_submenu_with_toggles::<HitstunPlayback>(
|
||||
"Playback Hitstun Timing".to_string(),
|
||||
|
|
|
@ -1542,7 +1542,7 @@ impl_serde_for_bitflags!(RecordTrigger);
|
|||
#[derive(
|
||||
Debug, Clone, Copy, PartialEq, FromPrimitive, EnumIter, Serialize_repr, Deserialize_repr,
|
||||
)]
|
||||
pub enum RecordingFrames {
|
||||
pub enum RecordingDuration {
|
||||
F60 = 0x1,
|
||||
F90 = 0x2,
|
||||
F120 = 0x4,
|
||||
|
@ -1564,25 +1564,25 @@ pub enum RecordingFrames {
|
|||
F600 = 0x40000,
|
||||
}
|
||||
|
||||
impl RecordingFrames {
|
||||
impl RecordingDuration {
|
||||
pub fn into_frames(self) -> usize {
|
||||
(log_2(self as u32) as usize * 30) + 60
|
||||
}
|
||||
}
|
||||
|
||||
impl ToggleTrait for RecordingFrames {
|
||||
impl ToggleTrait for RecordingDuration {
|
||||
fn to_toggle_vals() -> Vec<u32> {
|
||||
RecordingFrames::iter().map(|i| i as u32).collect()
|
||||
RecordingDuration::iter().map(|i| i as u32).collect()
|
||||
}
|
||||
|
||||
fn to_toggle_strings() -> Vec<String> {
|
||||
RecordingFrames::iter().map(|i| i.to_string()).collect()
|
||||
RecordingDuration::iter().map(|i| i.to_string()).collect()
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for RecordingFrames {
|
||||
impl fmt::Display for RecordingDuration {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
use RecordingFrames::*;
|
||||
use RecordingDuration::*;
|
||||
write!(
|
||||
f,
|
||||
"{}",
|
||||
|
|
Loading…
Reference in a new issue