Page MenuHomePhabricator (Chris)

popup-box.h
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

popup-box.h

#ifndef _paintown_gui_popup_box_h
#define _paintown_gui_popup_box_h
#include <string>
#include <vector>
#include "widget.h"
#include "box.h"
#include "../gradient.h"
namespace Gui{
class PopupBox : public Widget {
public:
PopupBox();
PopupBox(const PopupBox &);
virtual ~PopupBox();
//! copy
PopupBox &operator=(const PopupBox &);
//! Logic
virtual void act(const Font &);
//! Render
using Widget::render;
virtual void render(const Graphics::Bitmap &);
//! Open box
virtual void open();
//! Close box
virtual void close();
//! Is active?
virtual inline bool isActive(){
return (this->fadeState != Closed);
}
virtual inline bool isOpen(){
return this->fadeState == Open ||
this->fadeState == FadeIn;
}
//!set fadespeed
virtual inline void setFadeSpeed(int speed){
this->fadeSpeed = speed;
}
//! Get current box coordinates
virtual inline const Coordinate & getArea(){
return this->board.location;
}
//! Get current box transformations
virtual inline const Gui::Transformations & getTransforms(){
return this->board.transforms;
}
private:
void doFade();
enum FadeState{
Closed,
FadeIn,
Open,
FadeOut,
};
//! Current fade state
FadeState fadeState;
//! Fade speed
int fadeSpeed;
//! Board
Box board;
};
}
#endif

File Metadata

Mime Type
text/x-c++
Expires
Sun, Nov 15, 11:38 AM (14 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
152302
Default Alt Text
popup-box.h (1 KB)

Event Timeline