Files
o3de/Code/Legacy/CryCommon/LyShine/Bus/UiCanvasUpdateNotificationBus.h
T
Steve Pham 38261d0800 Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
2021-07-16 15:25:48 -07:00

38 lines
1.3 KiB
C++

/*
* 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/Component/ComponentBus.h>
////////////////////////////////////////////////////////////////////////////////////////////////////
//! Elements that require update notifications should connect to this bus using the entity id of their
//! containing canvas.
class UiCanvasUpdateNotification
: public AZ::ComponentBus
{
public: // member functions
virtual ~UiCanvasUpdateNotification() {}
//! Update the component. This is called when the game is running.
//! It is different from the TickBus in that it is called only when the canvas is updated.
//! So it is not called if the canvas is disabled.
virtual void Update(float deltaTime) = 0;
//! Update the component while in the editor.
//! This is called every frame when in the editor and the game is NOT running.
virtual void UpdateInEditor(float /*deltaTime*/) {}
public: // static member data
//! Multiple components on a entity can implement the events
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple;
};
typedef AZ::EBus<UiCanvasUpdateNotification> UiCanvasUpdateNotificationBus;