Remove legacy renderer dependencies in LyShine and move LyShine headers to gem (#6049)

* Remove CryRenderer dependencies

Signed-off-by: abrmich <abrmich@amazon.com>

* Fix non-unity compile error

Signed-off-by: abrmich <abrmich@amazon.com>

* Remove ITexture.h reference

Signed-off-by: abrmich <abrmich@amazon.com>

* Simple file moves from CryCommon to LyShine Gem

Signed-off-by: abrmich <abrmich@amazon.com>

* More simple file moves from CryCommon to LyShine Gem

Signed-off-by: abrmich <abrmich@amazon.com>

* Move more headers from CryCommon to LyShine Gem

Signed-off-by: abrmich <abrmich@amazon.com>

* Add LyShine gem module as a build dependency to fix compile error in some gems

Signed-off-by: abrmich <abrmich@amazon.com>
This commit is contained in:
michabr
2021-12-02 14:47:32 -08:00
committed by GitHub
parent 28f38ca009
commit 4d5aad13d1
131 changed files with 329 additions and 318 deletions
-8
View File
@@ -35,7 +35,6 @@
// CryCommon
#include <CryCommon/INavigationSystem.h>
#include <CryCommon/LyShine/ILyShine.h>
#include <CryCommon/MainThreadRenderRequestBus.h>
// Editor
@@ -595,13 +594,6 @@ void CGameEngine::SwitchToInEditor()
// Enable accelerators.
GetIEditor()->EnableAcceleratos(true);
// reset UI system
if (gEnv->pLyShine)
{
gEnv->pLyShine->Reset();
}
// [Anton] - order changed, see comments for CGameEngine::SetSimulationMode
//! Send event to switch out of game.
GetIEditor()->GetObjectManager()->SendEvent(EVENT_OUTOFGAME);
@@ -13,7 +13,6 @@ set(FILES
EditorCommonAPI.h
ActionOutput.h
ActionOutput.cpp
UiEditorDLLBus.h
DockTitleBarWidget.cpp
DockTitleBarWidget.h
SaveUtilities/AsyncSaveRunner.h
@@ -100,85 +100,8 @@ set(FILES
platform_impl.cpp
Win32specific.h
Win64specific.h
LyShine/IDraw2d.h
LyShine/ILyShine.h
LyShine/ISprite.h
LyShine/IRenderGraph.h
LyShine/UiAssetTypes.h
LyShine/UiComponentTypes.h
LyShine/UiBase.h
LyShine/UiEntityContext.h
LyShine/UiLayoutCellBase.h
LyShine/UiSerializeHelpers.h
LyShine/Animation/IUiAnimation.h
LyShine/Bus/UiAnimateEntityBus.h
LyShine/Bus/UiAnimationBus.h
LyShine/Bus/UiButtonBus.h
LyShine/Bus/UiCanvasBus.h
LyShine/Bus/UiCanvasManagerBus.h
LyShine/Bus/UiCanvasUpdateNotificationBus.h
LyShine/Bus/UiCheckboxBus.h
LyShine/Bus/UiCursorBus.h
LyShine/Bus/UiDraggableBus.h
LyShine/Bus/UiDropdownBus.h
LyShine/Bus/UiDropdownOptionBus.h
LyShine/Bus/UiDropTargetBus.h
LyShine/Bus/UiDynamicLayoutBus.h
LyShine/Bus/UiDynamicScrollBoxBus.h
LyShine/Bus/UiEditorBus.h
LyShine/Bus/UiEditorCanvasBus.h
LyShine/Bus/UiEditorChangeNotificationBus.h
LyShine/Bus/UiElementBus.h
LyShine/Bus/UiEntityContextBus.h
LyShine/Bus/UiFaderBus.h
LyShine/Bus/UiFlipbookAnimationBus.h
LyShine/Bus/UiGameEntityContextBus.h
LyShine/Bus/UiImageBus.h
LyShine/Bus/UiImageSequenceBus.h
LyShine/Bus/UiIndexableImageBus.h
LyShine/Bus/UiInitializationBus.h
LyShine/Bus/UiInteractableActionsBus.h
LyShine/Bus/UiInteractableBus.h
LyShine/Bus/UiInteractableStatesBus.h
LyShine/Bus/UiInteractionMaskBus.h
LyShine/Bus/UiLayoutBus.h
LyShine/Bus/UiLayoutCellBus.h
LyShine/Bus/UiLayoutCellDefaultBus.h
LyShine/Bus/UiLayoutColumnBus.h
LyShine/Bus/UiLayoutControllerBus.h
LyShine/Bus/UiLayoutFitterBus.h
LyShine/Bus/UiLayoutGridBus.h
LyShine/Bus/UiLayoutManagerBus.h
LyShine/Bus/UiLayoutRowBus.h
LyShine/Bus/UiMarkupButtonBus.h
LyShine/Bus/UiMaskBus.h
LyShine/Bus/UiNavigationBus.h
LyShine/Bus/UiParticleEmitterBus.h
LyShine/Bus/UiRadioButtonBus.h
LyShine/Bus/UiRadioButtonCommunicationBus.h
LyShine/Bus/UiRadioButtonGroupBus.h
LyShine/Bus/UiRadioButtonGroupCommunicationBus.h
LyShine/Bus/UiRenderBus.h
LyShine/Bus/UiRenderControlBus.h
LyShine/Bus/UiScrollableBus.h
LyShine/Bus/UiScrollBarBus.h
LyShine/Bus/UiScrollBoxBus.h
LyShine/Bus/UiScrollerBus.h
LyShine/Bus/UiSliderBus.h
LyShine/Bus/UiSpawnerBus.h
LyShine/Bus/UiSystemBus.h
LyShine/Bus/UiTextBus.h
LyShine/Bus/UiTextInputBus.h
LyShine/Bus/UiTooltipBus.h
LyShine/Bus/UiTooltipDataPopulatorBus.h
LyShine/Bus/UiTooltipDisplayBus.h
LyShine/Bus/UiTransform2dBus.h
LyShine/Bus/UiTransformBus.h
LyShine/Bus/UiVisualBus.h
LyShine/Bus/Sprite/UiSpriteBus.h
LyShine/Bus/World/UiCanvasOnMeshBus.h
LyShine/Bus/World/UiCanvasRefBus.h
LyShine/Bus/Tools/UiSystemToolsBus.h
Maestro/Bus/EditorSequenceAgentComponentBus.h
Maestro/Bus/EditorSequenceBus.h
Maestro/Bus/EditorSequenceComponentBus.h
@@ -27,7 +27,6 @@
#include <AzFramework/Spawnable/RootSpawnableInterface.h>
#include "MainThreadRenderRequestBus.h"
#include <LyShine/ILyShine.h>
#include <AzCore/Component/TickBus.h>
#include <AzCore/IO/Path/Path.h>
#include <AzCore/StringFunc/StringFunc.h>
@@ -882,12 +881,6 @@ void CLevelSystem::UnloadLevel()
// Normally the GC step is triggered at the end of this method (by the ESYSTEM_EVENT_LEVEL_POST_UNLOAD event).
EBUS_EVENT(AZ::ScriptSystemRequestBus, GarbageCollect);
// Perform level unload procedures for the LyShine UI system
if (gEnv && gEnv->pLyShine)
{
gEnv->pLyShine->OnLevelUnload();
}
m_bLevelLoaded = false;
[[maybe_unused]] const AZ::TimeMs unloadTimeMs = AZ::GetRealElapsedTimeMs() - beginTimeMs;
@@ -19,7 +19,6 @@
#include <AzFramework/Input/Buses/Requests/InputChannelRequestBus.h>
#include "MainThreadRenderRequestBus.h"
#include <LyShine/ILyShine.h>
#include <AzCore/Component/TickBus.h>
#include <AzCore/IO/Path/Path.h>
#include <AzCore/Settings/SettingsRegistryVisitorUtils.h>
@@ -558,12 +557,6 @@ namespace LegacyLevelSystem
// Normally the GC step is triggered at the end of this method (by the ESYSTEM_EVENT_LEVEL_POST_UNLOAD event).
EBUS_EVENT(AZ::ScriptSystemRequestBus, GarbageCollect);
// Perform level unload procedures for the LyShine UI system
if (gEnv && gEnv->pLyShine)
{
gEnv->pLyShine->OnLevelUnload();
}
m_bLevelLoaded = false;
[[maybe_unused]] const AZ::TimeMs unloadTimeMs = AZ::GetRealElapsedTimeMs() - beginTimeMs;
-8
View File
@@ -116,7 +116,6 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
#include <ILog.h>
#include <IAudioSystem.h>
#include <IProcess.h>
#include <LyShine/ILyShine.h>
#include <LoadScreenBus.h>
@@ -373,14 +372,7 @@ void CSystem::ShutDown()
m_pSystemEventDispatcher->OnSystemEvent(ESYSTEM_EVENT_FULL_SHUTDOWN, 0, 0);
}
if (gEnv && gEnv->pLyShine)
{
gEnv->pLyShine->Release();
gEnv->pLyShine = nullptr;
}
SAFE_RELEASE(m_env.pMovieSystem);
SAFE_RELEASE(m_env.pLyShine);
SAFE_RELEASE(m_env.pCryFont);
if (m_env.pConsole)
{
-7
View File
@@ -52,7 +52,6 @@
#include <AzFramework/Archive/ArchiveFileIO.h>
#include <LoadScreenBus.h>
#include <LyShine/Bus/UiSystemBus.h>
#include <AzFramework/Logging/MissingAssetLogger.h>
#include <AzFramework/Platform/PlatformDefaults.h>
#include <AzCore/Interface/Interface.h>
@@ -77,7 +76,6 @@
#include <IAudioSystem.h>
#include <ICmdLine.h>
#include <IProcess.h>
#include <LyShine/ILyShine.h>
#include <AzFramework/Archive/Archive.h>
#include "XConsole.h"
@@ -1105,11 +1103,6 @@ AZ_POP_DISABLE_WARNING
InlineInitializationProcessing("CSystem::Init Level System");
if (m_env.pLyShine)
{
m_env.pLyShine->PostInit();
}
InlineInitializationProcessing("CSystem::Init InitLmbrAWS");
// Az to Cry console binding
@@ -8,7 +8,7 @@
#include "UiEditorAnimationBus.h"
#include "UiEditorDLLBus.h"
#include <LyShine/UiEditorDLLBus.h>
#include "UiAnimViewAnimNode.h"
#include "UiAnimViewTrack.h"
#include "UiAnimViewSequence.h"
@@ -8,7 +8,7 @@
#include "UiEditorAnimationBus.h"
#include "UiEditorDLLBus.h"
#include <LyShine/UiEditorDLLBus.h>
#include "UiAnimViewSequenceManager.h"
#include "UiAnimViewUndo.h"
#include "AnimationContext.h"
+1 -1
View File
@@ -11,7 +11,7 @@
#include "EditorCommon.h"
#include "Animation/UiEditorAnimationBus.h"
#include "UiEditorDLLBus.h"
#include <LyShine/UiEditorDLLBus.h>
#include "UiEditorInternalBus.h"
#include "UiEditorEntityContext.h"
#include "UiSliceManager.h"
@@ -103,6 +103,7 @@ namespace LyShineEditor
void LyShineEditorSystemComponent::Activate()
{
AzToolsFramework::EditorEventsBus::Handler::BusConnect();
AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect();
LyShine::LyShineRequestBus::Handler::BusConnect();
}
@@ -118,6 +119,7 @@ namespace LyShineEditor
}
LyShine::LyShineRequestBus::Handler::BusDisconnect();
AzToolsFramework::EditorEventsBus::Handler::BusDisconnect();
AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusDisconnect();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -204,4 +206,14 @@ namespace LyShineEditor
UiEditorDLLBus::Broadcast(&UiEditorDLLInterface::OpenSourceCanvasFile, absoluteName);
}
}
////////////////////////////////////////////////////////////////////////////////////////////////
void LyShineEditorSystemComponent::OnStopPlayInEditor()
{
// reset UI system
if (gEnv->pLyShine)
{
gEnv->pLyShine->Reset();
}
}
}
@@ -11,6 +11,7 @@
#include <AzCore/Component/Component.h>
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserBus.h>
#include <AzToolsFramework/Entity/EditorEntityContextBus.h>
#include <LyShine/LyShineBus.h>
namespace LyShineEditor
@@ -18,6 +19,7 @@ namespace LyShineEditor
class LyShineEditorSystemComponent
: public AZ::Component
, protected AzToolsFramework::EditorEvents::Bus::Handler
, protected AzToolsFramework::EditorEntityContextNotificationBus::Handler
, protected AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler
, protected LyShine::LyShineRequestBus::Handler
{
@@ -58,5 +60,10 @@ namespace LyShineEditor
// LyShineRequestBus interface implementation
void EditUICanvas(const AZStd::string_view& canvasPath) override;
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// EditorEntityContextNotificationBus
void OnStopPlayInEditor() override;
////////////////////////////////////////////////////////////////////////
};
}
@@ -10,7 +10,6 @@
#include <vector> // required to be included before platform.h
#include <platform.h>
#include <ISystem.h>
#include <IRenderer.h>
#include <LyShine/ILyShine.h>
#include <LyShine/ISprite.h>
@@ -454,29 +454,6 @@ void ViewportWidget::contextMenuEvent(QContextMenuEvent* e)
RenderViewportWidget::contextMenuEvent(e);
}
#ifdef LYSHINE_ATOM_TODO // check if still needed
void ViewportWidget::HandleSignalRender([[maybe_unused]] const SRenderContext& context)
{
// Called from QViewport when redrawing the viewport.
// Triggered from a QViewport resize event or from our call to QViewport::Update
if (m_canvasRenderIsEnabled)
{
gEnv->pRenderer->SetSrgbWrite(true);
UiEditorMode editorMode = m_editorWindow->GetEditorMode();
if (editorMode == UiEditorMode::Edit)
{
RenderEditMode();
}
else // if (editorMode == UiEditorMode::Preview)
{
RenderPreviewMode();
}
}
}
#endif
void ViewportWidget::UserSelectionChanged(HierarchyItemRawPtrList* items)
{
Refresh();
@@ -999,13 +976,6 @@ void ViewportWidget::RenderEditMode()
m_viewportInteraction->GetCanvasToViewportScale(),
m_viewportInteraction->GetCanvasToViewportTranslation());
#ifdef LYSHINE_ATOM_TODO
// clear the stencil buffer before rendering each canvas - required for masking
// NOTE: the FRT_CLEAR_IMMEDIATE is required since we will not be setting the render target
ColorF viewportBackgroundColor(0, 0, 0, 0); // if clearing color we want to set alpha to zero also
gEnv->pRenderer->ClearTargetsImmediately(FRT_CLEAR_STENCIL, viewportBackgroundColor);
#endif
// Set the target size of the canvas
EBUS_EVENT_ID(canvasEntityId, UiCanvasBus, SetTargetCanvasSize, false, canvasSize);
@@ -7,9 +7,8 @@
*/
#pragma once
#include <IRenderer.h>
#include <ITexture.h>
#include <LyShine/UiBase.h>
#include <LyShine/UiRenderFormats.h>
namespace AZ
{
@@ -42,10 +41,6 @@ namespace LyShine
//! End the setup of a mask render node, this marks the end of adding child primitives
virtual void EndMask() = 0;
//! Begin rendering to a texture
virtual void BeginRenderToTexture(int renderTargetHandle, SDepthTexture* renderTargetDepthSurface,
const AZ::Vector2& viewportTopLeft, const AZ::Vector2& viewportSize, const AZ::Color& clearColor) = 0;
//! End rendering to a texture
virtual void EndRenderToTexture() = 0;
@@ -53,7 +48,7 @@ namespace LyShine
//! The graph handles the allocation of this DynUiPrimitive and deletes it when the graph is reset
//! This can be used if the UI component doesn't want to own the storage of the primitive. Used infrequently,
//! e.g. for the selection rect on a text component.
virtual DynUiPrimitive* GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) = 0;
virtual LyShine::UiPrimitive* GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) = 0;
//---- Functions for supporting masking (used during creation of the graph, not rendering ) ----
@@ -0,0 +1,53 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzCore/std/containers/intrusive_slist.h>
namespace LyShine
{
struct UCol
{
union
{
uint32 dcolor;
uint8 bcolor[4];
struct
{
uint8 b, g, r, a;
};
struct
{
uint8 z, y, x, w;
};
};
};
struct UiPrimitiveVertex
{
Vec2 xy;
UCol color;
Vec2 st;
uint8 texIndex;
uint8 texHasColorChannel;
uint8 texIndex2;
uint8 pad;
};
using UiIndice = AZ::u16;
struct UiPrimitive : public AZStd::intrusive_slist_node<UiPrimitive>
{
UiPrimitiveVertex* m_vertices = nullptr;
uint16* m_indices = nullptr;
int m_numVertices = 0;
int m_numIndices = 0;
};
using UiPrimitiveList = AZStd::intrusive_slist<UiPrimitive, AZStd::slist_base_hook<UiPrimitive>>;
};
@@ -22,7 +22,6 @@
#include <ISystem.h>
#include <ILog.h>
#include <IConsole.h>
#include <IRenderer.h>
//////////////////////////////////////////////////////////////////////////
namespace
+21 -14
View File
@@ -5,9 +5,9 @@
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <IRenderer.h> // for SVF_P3F_C4B_T2F which will be removed in a coming PR
#include <LyShine/Draw2d.h>
#include <LyShine/UiRenderFormats.h>
#include "LyShinePassDataBus.h"
#include <AzCore/Math/Matrix3x3.h>
@@ -22,15 +22,23 @@
#include <Atom/RPI.Public/RPIUtils.h>
#include <Atom/RPI.Public/ViewportContextBus.h>
////////////////////////////////////////////////////////////////////////////////////////////////////
// LOCAL STATIC FUNCTIONS
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
// Color to u32 => 0xAARRGGBB
static AZ::u32 PackARGB8888(const AZ::Color& color)
namespace
{
return (color.GetA8() << 24) | (color.GetR8() << 16) | (color.GetG8() << 8) | color.GetB8();
////////////////////////////////////////////////////////////////////////////////////////////////////
// Color to u32 => 0xAARRGGBB
AZ::u32 PackARGB8888(const AZ::Color& color)
{
return (color.GetA8() << 24) | (color.GetR8() << 16) | (color.GetG8() << 8) | color.GetB8();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
// Vertex format for Dynamic Draw Context
struct Draw2dVertex
{
Vec3 xyz;
LyShine::UCol color;
Vec2 st;
};
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -739,7 +747,7 @@ void CDraw2d::DeferredQuad::Draw(AZ::RHI::Ptr<AZ::RPI::DynamicDrawContext> dynam
const float z = 1.0f; // depth test disabled, if writing Z this will write at far plane
SVF_P3F_C4B_T2F vertices[NUM_VERTS];
Draw2dVertex vertices[NUM_VERTS];
const int vertIndex[NUM_VERTS] = {
0, 1, 3, 3, 1, 2
};
@@ -804,7 +812,7 @@ void CDraw2d::DeferredLine::Draw(AZ::RHI::Ptr<AZ::RPI::DynamicDrawContext> dynam
const int32 NUM_VERTS = 2;
SVF_P3F_C4B_T2F vertices[NUM_VERTS];
Draw2dVertex vertices[NUM_VERTS];
for (int i = 0; i < NUM_VERTS; ++i)
{
@@ -857,9 +865,9 @@ void CDraw2d::DeferredRectOutline::Draw(AZ::RHI::Ptr<AZ::RPI::DynamicDrawContext
AZ::RPI::ViewportContextPtr viewportContext) const
{
// Create the 8 verts in the right vertex format for the dynamic draw context
SVF_P3F_C4B_T2F vertices[NUM_VERTS];
Draw2dVertex vertices[NUM_VERTS];
const float z = 1.0f; // depth test disabled, if writing Z this will write at far plane
uint32 packedColor = (m_color.GetA8() << 24) | (m_color.GetR8() << 16) | (m_color.GetG8() << 8) | m_color.GetB8();
uint32 packedColor = PackARGB8888(m_color);
for (int i = 0; i < NUM_VERTS; ++i)
{
vertices[i].xyz = Vec3(m_verts2d[i].GetX(), m_verts2d[i].GetY(), z);
@@ -924,7 +932,6 @@ void CDraw2d::DeferredRectOutline::Draw(AZ::RHI::Ptr<AZ::RPI::DynamicDrawContext
// Add the primitive to the dynamic draw context for drawing
dynamicDraw->SetPrimitiveType(AZ::RHI::PrimitiveTopology::TriangleList);
dynamicDraw->DrawIndexed(vertices, NUM_VERTS, indices, NUM_INDICES, AZ::RHI::IndexFormat::Uint16, drawSrg);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-6
View File
@@ -520,12 +520,6 @@ void CLyShine::OnLoadScreenUnloaded()
m_uiCanvasManager->OnLoadScreenUnloaded();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void CLyShine::OnDebugDraw()
{
LyShineDebug::RenderDebug();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void CLyShine::IncrementVisibleCounter()
{
-9
View File
@@ -7,7 +7,6 @@
*/
#pragma once
#include <IRenderer.h>
#include <LyShine/ILyShine.h>
#include <LyShine/Bus/UiCursorBus.h>
#include <AzCore/Math/Vector2.h>
@@ -38,7 +37,6 @@ struct IConsoleCmdArgs;
//! CLyShine is the full implementation of the ILyShine interface
class CLyShine
: public ILyShine
, public IRenderDebugListener
, public UiCursorBus::Handler
, public AzFramework::InputChannelEventListener
, public AzFramework::InputTextEventListener
@@ -88,13 +86,6 @@ public:
// ~ILyShine
// IRenderDebugListener
//! Renders any debug displays currently enabled for the UI system
void OnDebugDraw() override;
// ~IRenderDebugListener
// UiCursorInterface
void IncrementVisibleCounter() override;
void DecrementVisibleCounter() override;
@@ -10,8 +10,6 @@
#if AZ_LOADSCREENCOMPONENT_ENABLED
#include <IRenderer.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzCore/Component/ComponentApplicationBus.h>
#include <LyShine/Bus/UiCanvasBus.h>
@@ -377,7 +377,7 @@ namespace LyShine
}
///////////////////////////////////////////////////////////////////////////////////////////////
void LyShineSystemComponent::OnCrySystemInitialized([[maybe_unused]] ISystem& system, [[maybe_unused]] const SSystemInitParams& startupParams)
void LyShineSystemComponent::OnCrySystemInitialized(ISystem& system, [[maybe_unused]] const SSystemInitParams& startupParams)
{
#if !defined(AZ_MONOLITHIC_BUILD)
// When module is linked dynamically, we must set our gEnv pointer.
@@ -387,16 +387,36 @@ namespace LyShine
m_pLyShine = new CLyShine(gEnv->pSystem);
gEnv->pLyShine = m_pLyShine;
system.GetILevelSystem()->AddListener(this);
BroadcastCursorImagePathname();
if (gEnv->pLyShine)
{
gEnv->pLyShine->PostInit();
}
}
void LyShineSystemComponent::OnCrySystemShutdown([[maybe_unused]] ISystem& system)
///////////////////////////////////////////////////////////////////////////////////////////////
void LyShineSystemComponent::OnCrySystemShutdown(ISystem& system)
{
system.GetILevelSystem()->RemoveListener(this);
gEnv->pLyShine = nullptr;
delete m_pLyShine;
m_pLyShine = nullptr;
}
////////////////////////////////////////////////////////////////////////
void LyShineSystemComponent::OnUnloadComplete([[maybe_unused]] const char* levelName)
{
// Perform level unload procedures for the LyShine UI system
if (gEnv && gEnv->pLyShine)
{
gEnv->pLyShine->OnLevelUnload();
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void LyShineSystemComponent::BroadcastCursorImagePathname()
{
@@ -13,6 +13,7 @@
#include <AzFramework/InGameUI/UiFrameworkBus.h>
#include <LmbrCentral/Rendering/MaterialAsset.h>
#include <ILevelSystem.h>
#include <LyShine/Bus/UiSystemBus.h>
#include <LyShine/Bus/UiCanvasManagerBus.h>
@@ -37,6 +38,7 @@ namespace LyShine
, protected LyShineAllocatorScope
, protected UiFrameworkBus::Handler
, protected CrySystemEventBus::Handler
, public ILevelSystemListener
{
public:
AZ_COMPONENT(LyShineSystemComponent, lyShineSystemComponentUuid);
@@ -92,6 +94,10 @@ namespace LyShine
void OnCrySystemShutdown(ISystem&) override;
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// ILevelSystemListener interface implementation
void OnUnloadComplete(const char* levelName) override;
void BroadcastCursorImagePathname();
#if !defined(LYSHINE_BUILDER) && !defined(LYSHINE_TESTS)

Some files were not shown because too many files have changed in this diff Show More