Created
June 7, 2020 02:51
-
-
Save Ryan-rsm-McKenzie/a23f980992519a2415e58d9705ebb685 to your computer and use it in GitHub Desktop.
invoke level-up notification
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto task = SKSE::GetTaskInterface(); | |
task->AddUITask([]() { | |
enum | |
{ | |
QUEST_UPDATE, | |
SKILL_LEVEL_UPDATE, | |
PLAYER_LEVEL_UPDATE, | |
SHOUT_UPDATE | |
}; | |
enum | |
{ | |
kNotificationText, | |
kStatus, | |
kSoundID, | |
kObjectiveCount, | |
kNotificationType, | |
kLevel, | |
kStartPercent, | |
kEndPercent, | |
kDragonText | |
}; | |
auto ui = RE::UI::GetSingleton(); | |
auto hud = ui->GetMenu<RE::HUDMenu>(); | |
auto view = hud ? hud->view : nullptr; | |
auto delegate = hud ? hud->fxDelegate : nullptr; | |
if (view && delegate) { | |
RE::FxResponseArgsEx<9> args; | |
args[kNotificationText] = "lorem ipsum dolem"; | |
args[kStatus] = ""; | |
args[kSoundID] = ""; | |
args[kObjectiveCount] = 0; | |
args[kNotificationType] = SKILL_LEVEL_UPDATE; | |
args[kLevel] = 42; | |
args[kStartPercent] = 0.20; | |
args[kEndPercent] = 0.80; | |
args[kDragonText] = ""; | |
delegate->Invoke(view.get(), "ShowNotification", args); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment