2002-08-29 20:18:41 +00:00
|
|
|
#ifndef SCROLLINGLIST_H
|
|
|
|
|
#define SCROLLINGLIST_H
|
2002-08-25 23:10:28 +00:00
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
2002-08-29 20:18:41 +00:00
|
|
|
Class: ScrollingList
|
2002-08-25 23:10:28 +00:00
|
|
|
|
|
|
|
|
Desc: Creates an array of graphics which can scroll left and right.
|
|
|
|
|
|
|
|
|
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
|
|
|
|
Andrew Livy
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
2002-08-29 20:18:41 +00:00
|
|
|
#include "ActorFrame.h"
|
2002-08-25 23:10:28 +00:00
|
|
|
#include "Sprite.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ScrollingList : public ActorFrame
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
ScrollingList();
|
2002-08-29 20:18:41 +00:00
|
|
|
~ScrollingList();
|
|
|
|
|
|
|
|
|
|
void Load( const CStringArray& asGraphicPaths );
|
|
|
|
|
void Unload(); // delete all items. Called automatically on Load()
|
2002-08-25 23:10:28 +00:00
|
|
|
|
|
|
|
|
virtual void Update( float fDeltaTime );
|
|
|
|
|
virtual void DrawPrimitives();
|
|
|
|
|
|
2003-01-15 21:25:47 +00:00
|
|
|
void Replace(CString sGraphicPath, int ElementNumber);
|
2003-01-15 21:40:12 +00:00
|
|
|
|
2002-08-29 20:18:41 +00:00
|
|
|
void SetSelection( int iIndex );
|
|
|
|
|
int GetSelection();
|
|
|
|
|
void SetNumberVisible( int iNumVisibleElements );
|
|
|
|
|
void SetSpacing( int iSpacingInPixels );
|
2002-12-10 23:16:44 +00:00
|
|
|
void UseSpriteType(int NewSpriteType);
|
2003-01-18 19:07:52 +00:00
|
|
|
void StartBouncing();
|
|
|
|
|
void StopBouncing();
|
2002-08-29 20:18:41 +00:00
|
|
|
void Left();
|
|
|
|
|
void Right();
|
2002-08-25 23:10:28 +00:00
|
|
|
|
|
|
|
|
protected:
|
2002-12-10 23:16:44 +00:00
|
|
|
|
2003-07-03 06:38:57 +00:00
|
|
|
int m_iBouncingState;
|
|
|
|
|
int m_iBounceDir;
|
|
|
|
|
int m_iBounceWait;
|
|
|
|
|
float m_iBounceSize;
|
2003-06-02 19:25:29 +00:00
|
|
|
|
2003-01-18 19:07:52 +00:00
|
|
|
|
2003-07-03 06:38:57 +00:00
|
|
|
int m_iBannerPrefs;
|
|
|
|
|
int m_iSpriteType;
|
|
|
|
|
int m_iSelection;
|
|
|
|
|
float m_fSelectionLag;
|
|
|
|
|
int m_iSpacing;
|
|
|
|
|
int m_iNumVisible;
|
|
|
|
|
float m_fNextTween;
|
|
|
|
|
Sprite m_sprBannerMask;
|
|
|
|
|
Sprite m_RippleCSprite;
|
|
|
|
|
Sprite m_RippleSprite;
|
2003-01-18 19:07:52 +00:00
|
|
|
|
2003-01-03 05:56:28 +00:00
|
|
|
vector<Sprite*> m_apSprites; // stores the list of elements (left to right)
|
2003-07-03 06:38:57 +00:00
|
|
|
vector<Sprite*> m_apCSprites; // stores the list of elements (left to right)
|
2002-08-29 20:18:41 +00:00
|
|
|
};
|
2002-08-25 23:10:28 +00:00
|
|
|
|
2002-11-16 20:19:35 +00:00
|
|
|
#endif
|