mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2025-02-17 14:40:31 +00:00
Last changes
This commit is contained in:
parent
5542279921
commit
70e3f700c5
4 changed files with 12 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
|||
use skyline::nn::ui2d::*;
|
||||
use smash::ui2d::{SmashPane, SmashTextBox};
|
||||
|
||||
use crate::training::ui;
|
||||
use crate::{common::menu::QUICK_MENU_ACTIVE, training::ui};
|
||||
|
||||
macro_rules! display_parent_fmt {
|
||||
($x:ident) => {
|
||||
|
@ -30,7 +30,7 @@ pub unsafe fn draw(root_pane: &Pane) {
|
|||
root_pane
|
||||
.find_pane_by_name_recursive(display_parent_fmt!(notification_idx))
|
||||
.unwrap()
|
||||
.set_visible(notification.is_some());
|
||||
.set_visible(notification.is_some() && !QUICK_MENU_ACTIVE);
|
||||
if notification.is_none() {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -386,6 +386,14 @@ pub unsafe fn draw(root_pane: &Pane) {
|
|||
.set_visible(false);
|
||||
});
|
||||
|
||||
// Make normal training panes invisible if we're active
|
||||
// InfluencedAlpha means "Should my children panes' alpha be influenced by mine, as the parent?"
|
||||
let status_r_pane = root_pane
|
||||
.find_pane_by_name_recursive("status_R")
|
||||
.expect("Unable to find status_R pane");
|
||||
// status_r_pane.flags |= 1 << PaneFlag::InfluencedAlpha as u8;
|
||||
status_r_pane.set_visible(!QUICK_MENU_ACTIVE);
|
||||
|
||||
root_pane
|
||||
.find_pane_by_name_recursive("TrModSlider")
|
||||
.unwrap()
|
||||
|
|
|
@ -4,7 +4,7 @@ use sarc::SarcFile;
|
|||
use skyline::nn::ui2d::*;
|
||||
use training_mod_consts::{OnOff, MENU};
|
||||
|
||||
use crate::common::{is_ready_go, is_training_mode};
|
||||
use crate::common::{is_ready_go, is_training_mode, menu::QUICK_MENU_ACTIVE};
|
||||
#[cfg(feature = "layout_arc_from_file")]
|
||||
use crate::consts::LAYOUT_ARC_PATH;
|
||||
|
||||
|
@ -32,7 +32,7 @@ pub unsafe fn handle_draw(layout: *mut Layout, draw_info: u64, cmd_buffer: u64)
|
|||
{
|
||||
// InfluencedAlpha means "Should my children panes' alpha be influenced by mine, as the parent?"
|
||||
root_pane.flags |= 1 << PaneFlag::InfluencedAlpha as u8;
|
||||
root_pane.set_visible(MENU.hud == OnOff::On);
|
||||
root_pane.set_visible(MENU.hud == OnOff::On && !QUICK_MENU_ACTIVE);
|
||||
}
|
||||
|
||||
damage::draw(root_pane, &layout_name);
|
||||
|
|
|
@ -881,11 +881,6 @@ pub fn ui<B: Backend>(f: &mut Frame<B>, app: &mut App) {
|
|||
.into_iter()
|
||||
.map(|_idx| Constraint::Percentage((100.0 / NUM_LISTS as f32) as u16))
|
||||
.collect::<Vec<Constraint>>()
|
||||
// [
|
||||
// Constraint::Percentage(33),
|
||||
// Constraint::Percentage(33),
|
||||
// Constraint::Percentage(33),
|
||||
// ]
|
||||
.as_ref(),
|
||||
)
|
||||
.split(vertical_chunks[1]);
|
||||
|
|
Loading…
Reference in a new issue