Add easing to GuiPhaseBar, simplify math a bit.
This commit is contained in:
@@ -95,7 +95,7 @@ public:
|
||||
*/
|
||||
void update(float dt)
|
||||
{
|
||||
if(duration > 0)
|
||||
if(time_acc < duration)
|
||||
{
|
||||
time_acc += dt;
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ private:
|
||||
JQuadPtr pspIcons[8];
|
||||
WSrcCards * srcCards;
|
||||
TaskList * taskList;
|
||||
float mElapsed;
|
||||
WGuiMenu * shopMenu;
|
||||
WGuiFilters * filterMenu; //Filter menu slides in sideways from right, or up from bottom.
|
||||
WGuiCardImage * bigDisplay;
|
||||
|
||||
@@ -4,15 +4,25 @@
|
||||
#include "GuiLayers.h"
|
||||
#include "PhaseRing.h"
|
||||
#include "WEvent.h"
|
||||
#include "PlayGuiObject.h"
|
||||
|
||||
#include "Easing.h"
|
||||
|
||||
class GuiPhaseBar: public GuiLayer, public PlayGuiObject
|
||||
{
|
||||
protected:
|
||||
Phase* phase;
|
||||
private:
|
||||
static const float zoom_big;
|
||||
static const float zoom_small;
|
||||
static const float step;
|
||||
|
||||
int displayedPhaseId;
|
||||
float angle;
|
||||
float zoomFactor;
|
||||
DuelLayers* mpDuelLayers;
|
||||
OutQuadEasing angleEasing;
|
||||
InOutQuadEasing zoomFactorEasing;
|
||||
DuelLayers* mpDuelLayers;
|
||||
|
||||
void DrawGlyph(JQuad *inQuad, int phaseId, float x, float y, float scale);
|
||||
public:
|
||||
GuiPhaseBar(DuelLayers* duelLayers);
|
||||
~GuiPhaseBar();
|
||||
|
||||
Reference in New Issue
Block a user