aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui
diff options
context:
space:
mode:
authorDavid Seikel2011-06-12 21:18:18 +1000
committerDavid Seikel2011-06-12 21:18:18 +1000
commit5c192c92bf02910d93956068017daa2b9e4b80ba (patch)
tree9c1bbbcfd6443e5b0df08bd212b3bd5027891e74 /linden/indra/llui
parentRejig skins again. (diff)
parentUpdated app_settings/default_grids.xml from our online grid list. (diff)
downloadmeta-impy-5c192c92bf02910d93956068017daa2b9e4b80ba.zip
meta-impy-5c192c92bf02910d93956068017daa2b9e4b80ba.tar.gz
meta-impy-5c192c92bf02910d93956068017daa2b9e4b80ba.tar.bz2
meta-impy-5c192c92bf02910d93956068017daa2b9e4b80ba.tar.xz
Merge remote-tracking branch 'jacek/next' into next
Conflicts (manualy merged): linden/indra/newview/app_settings/default_grids.xml linden/indra/newview/primbackup.cpp linden/indra/newview/skins/default/xui/en-us/floater_about.xml linden/indra/newview/skins/default/xui/en-us/notifications.xml InWorldz specific crap removed.
Diffstat (limited to 'linden/indra/llui')
-rw-r--r--linden/indra/llui/llbutton.cpp18
-rw-r--r--linden/indra/llui/llbutton.h6
-rw-r--r--linden/indra/llui/lltabcontainer.h10
3 files changed, 28 insertions, 6 deletions
diff --git a/linden/indra/llui/llbutton.cpp b/linden/indra/llui/llbutton.cpp
index e6b86c9..4bc5277 100644
--- a/linden/indra/llui/llbutton.cpp
+++ b/linden/indra/llui/llbutton.cpp
@@ -115,7 +115,9 @@ LLButton::LLButton(const std::string& name, const LLRect& rect,
115 void *callback_data, 115 void *callback_data,
116 const LLFontGL *font, 116 const LLFontGL *font,
117 const std::string& unselected_label, 117 const std::string& unselected_label,
118 const std::string& selected_label ) 118 const std::string& selected_label,
119 const std::string& disabled_label,
120 const std::string& disabled_selected_label)
119: LLUICtrl(name, rect, TRUE, NULL, NULL), 121: LLUICtrl(name, rect, TRUE, NULL, NULL),
120 mClickedCallback( click_callback ), 122 mClickedCallback( click_callback ),
121 mMouseDownCallback( NULL ), 123 mMouseDownCallback( NULL ),
@@ -148,6 +150,8 @@ LLButton::LLButton(const std::string& name, const LLRect& rect,
148{ 150{
149 mUnselectedLabel = unselected_label; 151 mUnselectedLabel = unselected_label;
150 mSelectedLabel = selected_label; 152 mSelectedLabel = selected_label;
153 mDisabledLabel = disabled_label;
154 mDisabledSelectedLabel = disabled_selected_label;
151 155
152 // by default, disabled color is same as enabled 156 // by default, disabled color is same as enabled
153 mImageColor = LLUI::sColorsGroup->getColor( "ButtonImageColor" ); 157 mImageColor = LLUI::sColorsGroup->getColor( "ButtonImageColor" );
@@ -989,6 +993,8 @@ LLXMLNodePtr LLButton::getXML(bool save_children) const
989 993
990 node->createChild("label", TRUE)->setStringValue(getLabelUnselected()); 994 node->createChild("label", TRUE)->setStringValue(getLabelUnselected());
991 node->createChild("label_selected", TRUE)->setStringValue(getLabelSelected()); 995 node->createChild("label_selected", TRUE)->setStringValue(getLabelSelected());
996 node->createChild("label_disabled", TRUE)->setStringValue(getLabelDisabled());
997 node->createChild("label_selected_disabled", TRUE)->setStringValue(getLabelDisabledSelected());
992 node->createChild("font", TRUE)->setStringValue(LLFontGL::nameFromFont(mGLFont)); 998 node->createChild("font", TRUE)->setStringValue(LLFontGL::nameFromFont(mGLFont));
993 node->createChild("halign", TRUE)->setStringValue(LLFontGL::nameFromHAlign(mHAlign)); 999 node->createChild("halign", TRUE)->setStringValue(LLFontGL::nameFromHAlign(mHAlign));
994 1000
@@ -1029,6 +1035,12 @@ LLView* LLButton::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *fa
1029 std::string label_selected = label; 1035 std::string label_selected = label;
1030 node->getAttributeString("label_selected", label_selected); 1036 node->getAttributeString("label_selected", label_selected);
1031 1037
1038 std::string label_disabled = label;
1039 node->getAttributeString("label_disabled", label_disabled);
1040
1041 std::string label_disabled_selected = label_selected;
1042 node->getAttributeString("label_disabled_selected", label_disabled_selected);
1043
1032 LLFontGL* font = selectFont(node); 1044 LLFontGL* font = selectFont(node);
1033 1045
1034 std::string image_unselected; 1046 std::string image_unselected;
@@ -1070,7 +1082,9 @@ LLView* LLButton::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *fa
1070 parent, 1082 parent,
1071 font, 1083 font,
1072 label, 1084 label,
1073 label_selected); 1085 label_selected,
1086 label_disabled,
1087 label_disabled_selected);
1074 1088
1075 node->getAttributeS32("pad_right", button->mRightHPad); 1089 node->getAttributeS32("pad_right", button->mRightHPad);
1076 node->getAttributeS32("pad_left", button->mLeftHPad); 1090 node->getAttributeS32("pad_left", button->mLeftHPad);
diff --git a/linden/indra/llui/llbutton.h b/linden/indra/llui/llbutton.h
index 2174d95..73ac446 100644
--- a/linden/indra/llui/llbutton.h
+++ b/linden/indra/llui/llbutton.h
@@ -84,7 +84,9 @@ public:
84 void *callback_data = NULL, 84 void *callback_data = NULL,
85 const LLFontGL* mGLFont = NULL, 85 const LLFontGL* mGLFont = NULL,
86 const std::string& unselected_label = LLStringUtil::null, 86 const std::string& unselected_label = LLStringUtil::null,
87 const std::string& selected_label = LLStringUtil::null ); 87 const std::string& selected_label = LLStringUtil::null,
88 const std::string& disabled_label = LLStringUtil::null,
89 const std::string& disabled_selected_label = LLStringUtil::null);
88 90
89 virtual ~LLButton(); 91 virtual ~LLButton();
90 void init(void (*click_callback)(void*), void *callback_data, const LLFontGL* font, const std::string& control_name); 92 void init(void (*click_callback)(void*), void *callback_data, const LLFontGL* font, const std::string& control_name);
@@ -133,6 +135,8 @@ public:
133 135
134 const std::string getLabelUnselected() const { return wstring_to_utf8str(mUnselectedLabel); } 136 const std::string getLabelUnselected() const { return wstring_to_utf8str(mUnselectedLabel); }
135 const std::string getLabelSelected() const { return wstring_to_utf8str(mSelectedLabel); } 137 const std::string getLabelSelected() const { return wstring_to_utf8str(mSelectedLabel); }
138 const std::string getLabelDisabled() const { return wstring_to_utf8str(mDisabledLabel); }
139 const std::string getLabelDisabledSelected() const { return wstring_to_utf8str(mDisabledSelectedLabel); }
136 140
137 void setImageColor(const std::string& color_control); 141 void setImageColor(const std::string& color_control);
138 void setImageColor(const LLColor4& c); 142 void setImageColor(const LLColor4& c);
diff --git a/linden/indra/llui/lltabcontainer.h b/linden/indra/llui/lltabcontainer.h
index 8117cde..989b12c 100644
--- a/linden/indra/llui/lltabcontainer.h
+++ b/linden/indra/llui/lltabcontainer.h
@@ -145,7 +145,6 @@ public:
145 145
146 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); 146 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
147 147
148private:
149 // Structure used to map tab buttons to and from tab panels 148 // Structure used to map tab buttons to and from tab panels
150 struct LLTabTuple 149 struct LLTabTuple
151 { 150 {
@@ -176,11 +175,12 @@ private:
176 LLTextBox* mPlaceholderText; 175 LLTextBox* mPlaceholderText;
177 S32 mPadding; 176 S32 mPadding;
178 }; 177 };
179
180 void initButtons();
181 178
182 LLTabTuple* getTab(S32 index) { return mTabList[index]; } 179 LLTabTuple* getTab(S32 index) { return mTabList[index]; }
183 LLTabTuple* getTabByPanel(LLPanel* child); 180 LLTabTuple* getTabByPanel(LLPanel* child);
181
182 LLTextBox* getTitle() { return mTitleBox; }
183
184 void insertTuple(LLTabTuple * tuple, eInsertionPoint insertion_point); 184 void insertTuple(LLTabTuple * tuple, eInsertionPoint insertion_point);
185 185
186 S32 getScrollPos() const { return mScrollPos; } 186 S32 getScrollPos() const { return mScrollPos; }
@@ -195,6 +195,10 @@ private:
195 195
196 void setCurrentPanelIndex(S32 index) { mCurrentTabIdx = index; } 196 void setCurrentPanelIndex(S32 index) { mCurrentTabIdx = index; }
197 197
198private:
199
200 void initButtons();
201
198 void scrollPrev() { mScrollPos = llmax(0, mScrollPos-1); } // No wrap 202 void scrollPrev() { mScrollPos = llmax(0, mScrollPos-1); } // No wrap
199 void scrollNext() { mScrollPos = llmin(mScrollPos+1, mMaxScrollPos); } // No wrap 203 void scrollNext() { mScrollPos = llmin(mScrollPos+1, mMaxScrollPos); } // No wrap
200 204