From 5a9a9d113f88ab4e3f9e570397a744760d4520c1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 17 Oct 2012 20:39:51 +0300 Subject: 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 --- src/gui/widgets/radiobutton.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/gui/widgets/radiobutton.h') 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 -- cgit v1.2.3-60-g2f50