summaryrefslogtreecommitdiff
path: root/src/gui/widgets/radiobutton.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-17 20:39:51 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-17 20:41:27 +0300
commit5a9a9d113f88ab4e3f9e570397a744760d4520c1 (patch)
tree68d5b87dbb37f556ad74b23d09d073c41a73c6c5 /src/gui/widgets/radiobutton.h
parent098901c3c49ddaed12ecdcf1739a5f680b457dfe (diff)
downloadmanaplus-5a9a9d113f88ab4e3f9e570397a744760d4520c1.tar.gz
manaplus-5a9a9d113f88ab4e3f9e570397a744760d4520c1.tar.bz2
manaplus-5a9a9d113f88ab4e3f9e570397a744760d4520c1.tar.xz
manaplus-5a9a9d113f88ab4e3f9e570397a744760d4520c1.zip
Extend radio button theming.
New options: padding - padding from all sides except left imagePadding - padding from left before image imageSize - image size for computation width spacing - space between image and text width = imagePadding + imageSize + spacing + text width + padding height = padding + text height + padding
Diffstat (limited to 'src/gui/widgets/radiobutton.h')
-rw-r--r--src/gui/widgets/radiobutton.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gui/widgets/radiobutton.h b/src/gui/widgets/radiobutton.h
index 7728d094e..ecf6862ed 100644
--- a/src/gui/widgets/radiobutton.h
+++ b/src/gui/widgets/radiobutton.h
@@ -28,6 +28,7 @@
#include "localconsts.h"
class Image;
+class Skin;
/**
* Guichan based RadioButton with custom look
@@ -71,16 +72,19 @@ class RadioButton final : public gcn::RadioButton
void keyPressed(gcn::KeyEvent& keyEvent) override;
+ void updateAlpha();
+
+ void adjustSize();
+
private:
static int instances;
+ static Skin *mSkin;
static float mAlpha;
bool mHasMouse;
- static Image *radioNormal;
- static Image *radioChecked;
- static Image *radioDisabled;
- static Image *radioDisabledChecked;
- static Image *radioNormalHi;
- static Image *radioCheckedHi;
+ int mPadding;
+ int mImagePadding;
+ int mImageSize;
+ int mSpacing;
};
#endif // RADIOBUTTON_H