LLIconCtrl Params
This commit is contained in:
@@ -44,6 +44,30 @@
|
|||||||
|
|
||||||
static LLRegisterWidget<LLIconCtrl> r("icon");
|
static LLRegisterWidget<LLIconCtrl> r("icon");
|
||||||
|
|
||||||
|
LLIconCtrl::Params::Params()
|
||||||
|
: image("image_name"),
|
||||||
|
color("color"),
|
||||||
|
// use_draw_context_alpha("use_draw_context_alpha", true),
|
||||||
|
scale_image("scale_image"),
|
||||||
|
min_width("min_width", 0),
|
||||||
|
min_height("min_height", 0)
|
||||||
|
{}
|
||||||
|
|
||||||
|
LLIconCtrl::LLIconCtrl(const LLIconCtrl::Params& p)
|
||||||
|
: LLUICtrl(p),
|
||||||
|
mColor(p.color()),
|
||||||
|
mImagep(p.image),
|
||||||
|
// mUseDrawContextAlpha(p.use_draw_context_alpha),
|
||||||
|
mPriority(0),
|
||||||
|
mMinWidth(p.min_width),
|
||||||
|
mMinHeight(p.min_height)
|
||||||
|
{
|
||||||
|
if (mImagep.notNull())
|
||||||
|
{
|
||||||
|
LLUICtrl::setValue(mImagep->getName());
|
||||||
|
}
|
||||||
|
setTabStop(false);
|
||||||
|
}
|
||||||
|
|
||||||
LLIconCtrl::LLIconCtrl(const std::string& name, const LLRect &rect, const std::string &image_name, const S32& min_width, const S32& min_height)
|
LLIconCtrl::LLIconCtrl(const std::string& name, const LLRect &rect, const std::string &image_name, const S32& min_width, const S32& min_height)
|
||||||
: LLUICtrl(name,
|
: LLUICtrl(name,
|
||||||
|
|||||||
@@ -48,6 +48,22 @@ class LLUICtrlFactory;
|
|||||||
class LLIconCtrl
|
class LLIconCtrl
|
||||||
: public LLUICtrl
|
: public LLUICtrl
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
|
||||||
|
{
|
||||||
|
Optional<LLUIImage*> image;
|
||||||
|
Optional<LLUIColor> color;
|
||||||
|
// Optional<bool> use_draw_context_alpha;
|
||||||
|
Optional<S32> min_width,
|
||||||
|
min_height;
|
||||||
|
Ignored scale_image;
|
||||||
|
|
||||||
|
Params();
|
||||||
|
};
|
||||||
|
protected:
|
||||||
|
LLIconCtrl(const Params&);
|
||||||
|
friend class LLUICtrlFactory;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LLIconCtrl(const std::string& name, const LLRect &rect, const std::string &image_name, const S32& min_width = 0, const S32& min_height = 0);
|
LLIconCtrl(const std::string& name, const LLRect &rect, const std::string &image_name, const S32& min_width = 0, const S32& min_height = 0);
|
||||||
virtual ~LLIconCtrl();
|
virtual ~LLIconCtrl();
|
||||||
@@ -76,6 +92,10 @@ protected:
|
|||||||
S32 mMinWidth,
|
S32 mMinWidth,
|
||||||
mMinHeight;
|
mMinHeight;
|
||||||
|
|
||||||
|
// If set to true (default), use the draw context transparency.
|
||||||
|
// If false, will use transparency returned by getCurrentTransparency(). See STORM-698.
|
||||||
|
//bool mUseDrawContextAlpha;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LLColor4 mColor;
|
LLColor4 mColor;
|
||||||
LLPointer<LLUIImage> mImagep;
|
LLPointer<LLUIImage> mImagep;
|
||||||
|
|||||||
Reference in New Issue
Block a user