22 lines
503 B
C++
22 lines
503 B
C++
#pragma once
|
|
#include <string>
|
|
|
|
#include "gui_widget.h"
|
|
#include "gui_button.h"
|
|
|
|
namespace Gui {
|
|
class ImageButton : public Button {
|
|
public:
|
|
ImageButton(const char* img_normal);
|
|
ImageButton(const char* img_normal, const char* img_pressed);
|
|
virtual void Draw(void);
|
|
virtual ~ImageButton(void) {}
|
|
virtual void GetSizeRequested(float size[2]);
|
|
private:
|
|
void LoadImages(const char* img_normal, const char* img_pressed);
|
|
Image* m_imgNormal;
|
|
Image* m_imgPressed;
|
|
};
|
|
}
|
|
|