1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-27 20:34:03 +00:00

Hide modpack notifications according to vanilla menu (#685)

* Hide notifications according to vanilla menu

* Whoops
This commit is contained in:
asimon-1 2024-07-20 19:33:37 -07:00 committed by GitHub
parent c6e03b98d3
commit 69d30d5a6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,6 +4,7 @@ use skyline::nn::ui2d::*;
use smash::ui2d::{SmashPane, SmashTextBox};
use crate::common::menu::QUICK_MENU_ACTIVE;
use crate::common::TRAINING_MENU_ADDR;
use crate::training::ui;
macro_rules! display_parent_fmt {
($x:ident) => {
@ -27,6 +28,13 @@ pub unsafe fn draw(root_pane: &Pane) {
let notification_idx = 0;
let queue = addr_of_mut!(ui::notifications::QUEUE);
if (*TRAINING_MENU_ADDR).combo_display_toggle == 0 {
// User has turned off the "combo display" option in the vanilla menu
// Remove all notifications from the queue so we don't show them
// This will also set the pane's visibility to false
(*queue).clear();
}
let notification = (*queue).first_mut();
root_pane