Merge pull request #6991 from aws-lumberyard-dev/michabr/lyshine_crycommon
Move remaining two LyShine headers to the gem
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* 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/EBus/EBus.h>
|
||||
|
||||
#include <AzCore/Math/Vector2.h>
|
||||
|
||||
class UiCursorInterface
|
||||
: public AZ::EBusTraits
|
||||
{
|
||||
public:
|
||||
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
|
||||
|
||||
// Public functions
|
||||
|
||||
//! Increment the UI Cursor visible counter.
|
||||
//! Should be paired with a call to DecrementVisibleCounter.
|
||||
virtual void IncrementVisibleCounter() = 0;
|
||||
|
||||
//! Decrement the UI Cursor visible counter.
|
||||
//! Should be paired with a call to IncrementVisibleCounter.
|
||||
virtual void DecrementVisibleCounter() = 0;
|
||||
|
||||
//! Query whether the UI Cursor is currently visible
|
||||
virtual bool IsUiCursorVisible() = 0;
|
||||
|
||||
//! Set the UI cursor image.
|
||||
virtual void SetUiCursor(const char* cursorImagePath) = 0;
|
||||
|
||||
//! Get the UI cursor position (in pixels) relative
|
||||
//! to the top-left corner of the UI overlay viewport
|
||||
virtual AZ::Vector2 GetUiCursorPosition() = 0;
|
||||
};
|
||||
|
||||
using UiCursorBus = AZ::EBus<UiCursorInterface>;
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* 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/RTTI/TypeInfoSimple.h>
|
||||
#include <AzFramework/Asset/SimpleAsset.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
namespace LyShine
|
||||
{
|
||||
class FontAsset
|
||||
{
|
||||
public:
|
||||
AZ_TYPE_INFO(FontAsset, "{57767D37-0EBE-43BE-8F60-AB36D2056EF8}")
|
||||
static const char* GetFileFilter()
|
||||
{
|
||||
return "*.xml;*.font;*.fontfamily";
|
||||
}
|
||||
};
|
||||
|
||||
class CanvasAsset
|
||||
{
|
||||
public:
|
||||
AZ_TYPE_INFO(CanvasAsset, "{E48DDAC8-1F1E-4183-AAAB-37424BCC254B}")
|
||||
static const char* GetFileFilter()
|
||||
{
|
||||
return "*.uicanvas";
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -100,8 +100,6 @@ set(FILES
|
||||
platform_impl.cpp
|
||||
Win32specific.h
|
||||
Win64specific.h
|
||||
LyShine/UiAssetTypes.h
|
||||
LyShine/Bus/UiCursorBus.h
|
||||
Maestro/Bus/EditorSequenceAgentComponentBus.h
|
||||
Maestro/Bus/EditorSequenceBus.h
|
||||
Maestro/Bus/EditorSequenceComponentBus.h
|
||||
|
||||
@@ -134,7 +134,6 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
#include <PNoise3.h>
|
||||
|
||||
#include <LyShine/Bus/UiCursorBus.h>
|
||||
#include <AzFramework/Asset/AssetSystemBus.h>
|
||||
#include <AzFramework/Input/Buses/Requests/InputSystemRequestBus.h>
|
||||
|
||||
@@ -1374,7 +1373,6 @@ bool CSystem::HandleMessage([[maybe_unused]] HWND hWnd, UINT uMsg, WPARAM wParam
|
||||
// Fall through intended
|
||||
case WM_ENTERMENULOOP:
|
||||
{
|
||||
UiCursorBus::Broadcast(&UiCursorInterface::IncrementVisibleCounter);
|
||||
return true;
|
||||
}
|
||||
case WM_CAPTURECHANGED:
|
||||
@@ -1392,7 +1390,6 @@ bool CSystem::HandleMessage([[maybe_unused]] HWND hWnd, UINT uMsg, WPARAM wParam
|
||||
// Fall through intended
|
||||
case WM_EXITMENULOOP:
|
||||
{
|
||||
UiCursorBus::Broadcast(&UiCursorInterface::DecrementVisibleCounter);
|
||||
return (uMsg != WM_CAPTURECHANGED);
|
||||
}
|
||||
case WM_SYSKEYUP:
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <AzCore/std/algorithm.h>
|
||||
#include <AzCore/Time/ITime.h>
|
||||
|
||||
#include <LyShine/Bus/UiCursorBus.h>
|
||||
//#define DEFENCE_CVAR_HASH_LOGGING
|
||||
|
||||
// s should point to a buffer at least 65 chars long
|
||||
@@ -749,8 +748,6 @@ void CXConsole::ShowConsole(bool show, const int iRequestScrollMax)
|
||||
|
||||
if (show && !m_bConsoleActive)
|
||||
{
|
||||
UiCursorBus::Broadcast(&UiCursorBus::Events::IncrementVisibleCounter);
|
||||
|
||||
AzFramework::InputSystemCursorRequestBus::EventResult(m_previousSystemCursorState,
|
||||
AzFramework::InputDeviceMouse::Id,
|
||||
&AzFramework::InputSystemCursorRequests::GetSystemCursorState);
|
||||
@@ -760,8 +757,6 @@ void CXConsole::ShowConsole(bool show, const int iRequestScrollMax)
|
||||
}
|
||||
else if (!show && m_bConsoleActive)
|
||||
{
|
||||
UiCursorBus::Broadcast(&UiCursorBus::Events::DecrementVisibleCounter);
|
||||
|
||||
AzFramework::InputSystemCursorRequestBus::Event(AzFramework::InputDeviceMouse::Id,
|
||||
&AzFramework::InputSystemCursorRequests::SetSystemCursorState,
|
||||
m_previousSystemCursorState);
|
||||
|
||||
Reference in New Issue
Block a user