Moved UIRoutines call order. Call FinalizeChanges. Fixed UI Button Events. #359

Merged
maverickdgg merged 8 commits from SP3-20-UI-System into main 2023-02-23 14:00:51 +08:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 69f2e678df - Show all commits

View File

@ -11,14 +11,14 @@ public class ChangeSceneButton : Script
UIElement ui = GetComponent<UIElement>();
if (ui != null)
{
ui.OnHoverEnter.RegisterAction(() =>
ui.OnRelease.RegisterAction(() =>
{
Debug.Log("C# Hover Enter");
if (sceneID != 0)
{
//Audio.PlaySFXOnce2D("event:/UI/success");
//SceneManager.ChangeScene(sceneID);
//Audio.StopAllSounds();
Audio.PlaySFXOnce2D("event:/UI/success");
SceneManager.ChangeScene(sceneID);
Audio.StopAllSounds();
}
});
}

View File

@ -204,7 +204,7 @@ namespace SHADE
SHButtonClickEvent clickEvent;
clickEvent.EID = comp.GetEID();
SHEventManager::BroadcastEvent(clickEvent, SH_BUTTON_HOVER_ENTER_EVENT);
SHLOG_INFO("C++ BROADCASTED HOVER ENTER EVENT EID: {}", clickEvent.EID);
//SHLOG_INFO("C++ BROADCASTED HOVER ENTER EVENT EID: {}", clickEvent.EID);
}
comp.isHovered = true;