mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
initial commit jolt
This commit is contained in:
parent
0c2aa5328c
commit
8acf7da95b
1086 changed files with 214612 additions and 4 deletions
41
Engine/lib/JoltPhysics/TestFramework/UI/UIAnimationSlide.h
Normal file
41
Engine/lib/JoltPhysics/TestFramework/UI/UIAnimationSlide.h
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
|
||||
// SPDX-FileCopyrightText: 2021 Jorrit Rouwe
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <UI/UIAnimation.h>
|
||||
|
||||
/// Animation that slides an element on or off screen
|
||||
class UIAnimationSlide : public UIAnimation
|
||||
{
|
||||
public:
|
||||
JPH_DECLARE_RTTI_ABSTRACT(JPH_NO_EXPORT, UIAnimationSlide)
|
||||
|
||||
/// Mode of sliding
|
||||
enum EMode
|
||||
{
|
||||
SLIDE_ON_SCREEN,
|
||||
SLIDE_OFF_SCREEN,
|
||||
};
|
||||
|
||||
/// Constructor
|
||||
UIAnimationSlide(EMode inMode, int inSlideDistanceH, int inSlideDistanceV, float inTimeBeforeSlide, float inSlideTime);
|
||||
|
||||
///@name Interface
|
||||
virtual void Init(UIElement *inElement) override;
|
||||
virtual bool Update(UIElement *inElement, float inDeltaTime) override;
|
||||
virtual void Exit(UIElement *inElement) override;
|
||||
|
||||
private:
|
||||
EMode mSlideMode;
|
||||
int mSlideDistanceH;
|
||||
int mSlideDistanceV;
|
||||
float mTimeBeforeSlide;
|
||||
float mSlideTime;
|
||||
int mInitialRelativeX;
|
||||
int mInitialRelativeY;
|
||||
int mTargetRelativeX;
|
||||
int mTargetRelativeY;
|
||||
float mTime;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue