mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Update MiniEngine_Widget.h
This commit is contained in:
parent
58469b06f0
commit
238f52a93e
|
@ -2,27 +2,35 @@
|
||||||
#include "MiniEngine.h"
|
#include "MiniEngine.h"
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
class Brush : public MiniEngine::Renderer
|
namespace MiniEngine
|
||||||
|
{
|
||||||
|
|
||||||
|
namespace Widget
|
||||||
|
{
|
||||||
|
|
||||||
|
class Brush : public Renderer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void setArea(MiniEngine::Rect Area);
|
void setArea(Rect Area);
|
||||||
|
void setFullArea(Rect FullArea);
|
||||||
|
|
||||||
int copy(MiniEngine::Texture t, MiniEngine::Rect src, MiniEngine::Rect dst);
|
int copy(Texture t, Rect src, Rect dst);
|
||||||
int copyTo(MiniEngine::Texture t, MiniEngine::Rect dst);
|
int copyTo(Texture t, Rect dst);
|
||||||
int copyTo(MiniEngine::Texture t, MiniEngine::Point lupoint);
|
int copyTo(Texture t, Point lupoint);
|
||||||
int copyFill(MiniEngine::Texture t,MiniEngine::Rect src);
|
int copyFill(Texture t,Rect src);
|
||||||
int copyFullFill(MiniEngine::Texture t);
|
int copyFullFill(Texture t);
|
||||||
private:
|
private:
|
||||||
MiniEngine::Rect area;
|
Rect area,fullarea;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Board
|
class Board
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Board(MiniEngine::Window wnd,MiniEngine::Rect Area);
|
Board(Rect Area);
|
||||||
Brush getBrush();
|
Brush getBrush();
|
||||||
|
Rect getArea();
|
||||||
private:
|
private:
|
||||||
MiniEngine::Rect area,fullwnd;
|
Rect area;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Drawable
|
class Drawable
|
||||||
|
@ -42,14 +50,18 @@ class ButtonBase : public Drawable, public Interactive
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ButtonBase();
|
ButtonBase();
|
||||||
void setTextureNormal(MiniEngine::Texture Normal);
|
void setTextureNormal(Texture Normal);
|
||||||
void setTextureMouseover(MiniEngine::Texture Mouseover);
|
void setTextureMouseover(Texture Mouseover);
|
||||||
void setTextureClicked(MiniEngine::Texture Clicked);
|
void setTextureClicked(Texture Clicked);
|
||||||
void setRect(MiniEngine::Rect SensorArea);
|
void setRect(Rect SensorArea);
|
||||||
virtual void draw(Brush& brush);
|
virtual void draw(Brush& brush);
|
||||||
virtual void handle(SDL_Event e,int& running,int& update);
|
virtual void handle(SDL_Event e,int& running,int& update);
|
||||||
private:
|
private:
|
||||||
int status;
|
int status;
|
||||||
MiniEngine::Texture t1,t2,t3;
|
Texture t1,t2,t3;
|
||||||
MiniEngine::Rect rect;
|
Rect rect;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}/// End of namespace MiniEngine::Widget
|
||||||
|
|
||||||
|
}/// End of namespace MiniEngine
|
||||||
|
|
Loading…
Reference in New Issue
Block a user