summaryrefslogtreecommitdiff
path: root/src/interface
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-07-21 17:43:46 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-07-21 17:43:46 (GMT)
commitf7d8556965832821036c210ffc1f9e73f3ff70cc (patch)
tree58e985bdc6e99a2ad8e7382ebaf33553ae93d836 /src/interface
parent5bf0a084ace0e6b673efa4552b40de8b36e0668e (diff)
downloadpowder-f7d8556965832821036c210ffc1f9e73f3ff70cc.zip
powder-f7d8556965832821036c210ffc1f9e73f3ff70cc.tar.gz
Icons for menu items
Diffstat (limited to 'src/interface')
-rw-r--r--src/interface/Appearance.cpp26
-rw-r--r--src/interface/Appearance.h6
2 files changed, 31 insertions, 1 deletions
diff --git a/src/interface/Appearance.cpp b/src/interface/Appearance.cpp
index 2922722..b504d02 100644
--- a/src/interface/Appearance.cpp
+++ b/src/interface/Appearance.cpp
@@ -28,6 +28,30 @@ namespace ui
BorderActive(255, 255, 255),
Margin(1, 4),
- icon(NoIcon)
+ icon(NoIcon),
+
+ texture(NULL)
{};
+
+ VideoBuffer * Appearance::GetTexture()
+ {
+ return texture;
+ }
+
+ void Appearance::SetTexture(VideoBuffer * texture)
+ {
+ if(this->texture)
+ delete this->texture;
+ if(texture)
+ this->texture = new VideoBuffer(texture);
+ else
+ this->texture = NULL;
+ }
+
+ Appearance::~Appearance()
+ {
+ if(texture)
+ delete texture;
+ }
+
}
diff --git a/src/interface/Appearance.h b/src/interface/Appearance.h
index 1749731..4767edb 100644
--- a/src/interface/Appearance.h
+++ b/src/interface/Appearance.h
@@ -16,6 +16,8 @@ namespace ui
{
class Appearance
{
+ private:
+ VideoBuffer * texture;
public:
enum HorizontalAlignment
{
@@ -46,8 +48,12 @@ namespace ui
ui::Border Margin;
Icon icon;
+
+ VideoBuffer * GetTexture();
+ void SetTexture(VideoBuffer * texture);
Appearance();
+ ~Appearance();
};
}