diff options
author | McCabe Maxsted | 2011-05-15 14:22:38 -0700 |
---|---|---|
committer | McCabe Maxsted | 2011-06-08 23:30:36 -0700 |
commit | fcac3c6233e369da6f91c2427427d84429694f6b (patch) | |
tree | a767005172e790883b672ac9c4a25e12f5fb8ab5 /linden/indra | |
parent | Implemented 'label_disabled' and 'label_selected_disabled' XUI for LLButton (diff) | |
download | meta-impy-fcac3c6233e369da6f91c2427427d84429694f6b.zip meta-impy-fcac3c6233e369da6f91c2427427d84429694f6b.tar.gz meta-impy-fcac3c6233e369da6f91c2427427d84429694f6b.tar.bz2 meta-impy-fcac3c6233e369da6f91c2427427d84429694f6b.tar.xz |
Disable the AO sit toolbar button when the AO is disabled
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/newview/aoremotectrl.cpp | 13 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/panel_ao_remote_expanded.xml | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/linden/indra/newview/aoremotectrl.cpp b/linden/indra/newview/aoremotectrl.cpp index 781f1b3..6595835 100644 --- a/linden/indra/newview/aoremotectrl.cpp +++ b/linden/indra/newview/aoremotectrl.cpp | |||
@@ -88,15 +88,22 @@ BOOL AORemoteCtrl::postBuild() | |||
88 | childSetAction("ao_show_btn", onClickShowAO, this); | 88 | childSetAction("ao_show_btn", onClickShowAO, this); |
89 | childSetAction("popup_btn", onClickPopupBtn, this); | 89 | childSetAction("popup_btn", onClickPopupBtn, this); |
90 | 90 | ||
91 | childSetEnabled("ao_sit_btn", gSavedSettings.getBOOL("AOEnabled")); | ||
92 | |||
91 | return TRUE; | 93 | return TRUE; |
92 | } | 94 | } |
93 | 95 | ||
94 | // static | 96 | // static |
95 | void AORemoteCtrl::onClickToggleAO(void* data) | 97 | void AORemoteCtrl::onClickToggleAO(void* data) |
96 | { | 98 | { |
97 | BOOL ao_enable = gSavedSettings.getBOOL("AOEnabled"); | 99 | AORemoteCtrl* self = (AORemoteCtrl*)data; |
98 | gSavedSettings.setBOOL("AOEnabled", !ao_enable); | 100 | if (self) |
99 | LLFloaterAO::run(); | 101 | { |
102 | BOOL ao_enable = gSavedSettings.getBOOL("AOEnabled"); | ||
103 | gSavedSettings.setBOOL("AOEnabled", !ao_enable); | ||
104 | self->childSetEnabled("ao_sit_btn", !ao_enable); | ||
105 | LLFloaterAO::run(); | ||
106 | } | ||
100 | } | 107 | } |
101 | 108 | ||
102 | //static | 109 | //static |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_ao_remote_expanded.xml b/linden/indra/newview/skins/default/xui/en-us/panel_ao_remote_expanded.xml index d8b31f1..2d71add 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_ao_remote_expanded.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_ao_remote_expanded.xml | |||
@@ -5,7 +5,7 @@ | |||
5 | <panel bottom="1" filename="panel_bg_tab.xml" name="panel_bg_tab" height="47" left="0" width="96" /> | 5 | <panel bottom="1" filename="panel_bg_tab.xml" name="panel_bg_tab" height="47" left="0" width="96" /> |
6 | <button bottom="-20" control_name="AOSitsEnabled" enabled="true" tool_tip="Toggles AO sit animation" | 6 | <button bottom="-20" control_name="AOSitsEnabled" enabled="true" tool_tip="Toggles AO sit animation" |
7 | follows="left|top" font="SansSerif" height="22" label="Sits Off" label_selected="Sits On" | 7 | follows="left|top" font="SansSerif" height="22" label="Sits Off" label_selected="Sits On" |
8 | mouse_opaque="true" name="ao_sit_btn" width="66" left="3" /> | 8 | mouse_opaque="true" name="ao_sit_btn" width="66" left="3" label_selected_disabled="Sits Off" /> |
9 | <button bottom="-20" enabled="true" tool_tip="Toggle AO window" | 9 | <button bottom="-20" enabled="true" tool_tip="Toggle AO window" |
10 | follows="left|top" font="SansSerif" height="22" label="" image_overlay="arrow_up.tga" | 10 | follows="left|top" font="SansSerif" height="22" label="" image_overlay="arrow_up.tga" |
11 | mouse_opaque="true" name="ao_show_btn" width="22" left_delta="68" /> | 11 | mouse_opaque="true" name="ao_show_btn" width="22" left_delta="68" /> |