aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloatertelehub.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:42 -0500
committerJacek Antonelli2008-08-15 23:45:42 -0500
commitce28e056c20bf2723f565bbf464b87781ec248a2 (patch)
treeef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/llfloatertelehub.cpp
parentSecond Life viewer sources 1.19.1.4b (diff)
downloadmeta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz
Second Life viewer sources 1.20.2
Diffstat (limited to 'linden/indra/newview/llfloatertelehub.cpp')
-rw-r--r--linden/indra/newview/llfloatertelehub.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/linden/indra/newview/llfloatertelehub.cpp b/linden/indra/newview/llfloatertelehub.cpp
index f36fd0f..3ea9c80 100644
--- a/linden/indra/newview/llfloatertelehub.cpp
+++ b/linden/indra/newview/llfloatertelehub.cpp
@@ -45,7 +45,7 @@
45#include "lltoolmgr.h" 45#include "lltoolmgr.h"
46#include "llviewerobject.h" 46#include "llviewerobject.h"
47#include "llviewerobjectlist.h" 47#include "llviewerobjectlist.h"
48#include "llvieweruictrlfactory.h" 48#include "lluictrlfactory.h"
49 49
50LLFloaterTelehub* LLFloaterTelehub::sInstance = NULL; 50LLFloaterTelehub* LLFloaterTelehub::sInstance = NULL;
51 51
@@ -62,8 +62,8 @@ void LLFloaterTelehub::show()
62 sInstance = new LLFloaterTelehub(); 62 sInstance = new LLFloaterTelehub();
63 63
64 // Show tools floater by selecting translate (select) tool 64 // Show tools floater by selecting translate (select) tool
65 gToolMgr->setCurrentToolset(gBasicToolset); 65 LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
66 gToolMgr->getCurrentToolset()->selectTool( gToolTranslate ); 66 LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompTranslate::getInstance() );
67 67
68 // Find tools floater, glue to bottom 68 // Find tools floater, glue to bottom
69 if (gFloaterTools) 69 if (gFloaterTools)
@@ -92,21 +92,21 @@ LLFloaterTelehub::LLFloaterTelehub()
92 92
93 gMessageSystem->setHandlerFunc("TelehubInfo", processTelehubInfo); 93 gMessageSystem->setHandlerFunc("TelehubInfo", processTelehubInfo);
94 94
95 gUICtrlFactory->buildFloater(sInstance, "floater_telehub.xml"); 95 LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_telehub.xml");
96 96
97 childSetAction("connect_btn", onClickConnect, this); 97 childSetAction("connect_btn", onClickConnect, this);
98 childSetAction("disconnect_btn", onClickDisconnect, this); 98 childSetAction("disconnect_btn", onClickDisconnect, this);
99 childSetAction("add_spawn_point_btn", onClickAddSpawnPoint, this); 99 childSetAction("add_spawn_point_btn", onClickAddSpawnPoint, this);
100 childSetAction("remove_spawn_point_btn", onClickRemoveSpawnPoint, this); 100 childSetAction("remove_spawn_point_btn", onClickRemoveSpawnPoint, this);
101 101
102 LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(this, "spawn_points_list"); 102 LLScrollListCtrl* list = getChild<LLScrollListCtrl>("spawn_points_list");
103 if (list) 103 if (list)
104 { 104 {
105 // otherwise you can't walk with arrow keys while floater is up 105 // otherwise you can't walk with arrow keys while floater is up
106 list->setAllowKeyboardMovement(FALSE); 106 list->setAllowKeyboardMovement(FALSE);
107 } 107 }
108 108
109 mObjectSelection = gSelectMgr->getEditSelection(); 109 mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
110} 110}
111 111
112LLFloaterTelehub::~LLFloaterTelehub() 112LLFloaterTelehub::~LLFloaterTelehub()
@@ -119,7 +119,7 @@ LLFloaterTelehub::~LLFloaterTelehub()
119 119
120void LLFloaterTelehub::draw() 120void LLFloaterTelehub::draw()
121{ 121{
122 if (getVisible() && !isMinimized()) 122 if (!isMinimized())
123 { 123 {
124 refresh(); 124 refresh();
125 } 125 }
@@ -133,7 +133,7 @@ void LLFloaterTelehub::refresh()
133 LLViewerObject* object = mObjectSelection->getFirstRootObject(children_ok); 133 LLViewerObject* object = mObjectSelection->getFirstRootObject(children_ok);
134 134
135 BOOL have_selection = (object != NULL); 135 BOOL have_selection = (object != NULL);
136 BOOL all_volume = gSelectMgr->selectionAllPCode( LL_PCODE_VOLUME ); 136 BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
137 childSetEnabled("connect_btn", have_selection && all_volume); 137 childSetEnabled("connect_btn", have_selection && all_volume);
138 138
139 BOOL have_telehub = mTelehubObjectID.notNull(); 139 BOOL have_telehub = mTelehubObjectID.notNull();
@@ -142,7 +142,7 @@ void LLFloaterTelehub::refresh()
142 BOOL space_avail = (mNumSpawn < MAX_SPAWNPOINTS_PER_TELEHUB); 142 BOOL space_avail = (mNumSpawn < MAX_SPAWNPOINTS_PER_TELEHUB);
143 childSetEnabled("add_spawn_point_btn", have_selection && all_volume && space_avail); 143 childSetEnabled("add_spawn_point_btn", have_selection && all_volume && space_avail);
144 144
145 LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(this, "spawn_points_list"); 145 LLScrollListCtrl* list = getChild<LLScrollListCtrl>("spawn_points_list");
146 if (list) 146 if (list)
147 { 147 {
148 BOOL enable_remove = (list->getFirstSelected() != NULL); 148 BOOL enable_remove = (list->getFirstSelected() != NULL);
@@ -175,7 +175,7 @@ void LLFloaterTelehub::addBeacons()
175 // Draw nice thick 3-pixel lines. 175 // Draw nice thick 3-pixel lines.
176 gObjectList.addDebugBeacon(hub_pos_region, "", LLColor4::yellow, LLColor4::white, 4); 176 gObjectList.addDebugBeacon(hub_pos_region, "", LLColor4::yellow, LLColor4::white, 4);
177 177
178 LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(sInstance, "spawn_points_list"); 178 LLScrollListCtrl* list = sInstance->getChild<LLScrollListCtrl>("spawn_points_list");
179 if (list) 179 if (list)
180 { 180 {
181 S32 spawn_index = list->getFirstSelectedIndex(); 181 S32 spawn_index = list->getFirstSelectedIndex();
@@ -189,26 +189,26 @@ void LLFloaterTelehub::addBeacons()
189 189
190void LLFloaterTelehub::sendTelehubInfoRequest() 190void LLFloaterTelehub::sendTelehubInfoRequest()
191{ 191{
192 gSelectMgr->sendGodlikeRequest("telehub", "info ui"); 192 LLSelectMgr::getInstance()->sendGodlikeRequest("telehub", "info ui");
193} 193}
194 194
195// static 195// static
196void LLFloaterTelehub::onClickConnect(void* data) 196void LLFloaterTelehub::onClickConnect(void* data)
197{ 197{
198 gSelectMgr->sendGodlikeRequest("telehub", "connect"); 198 LLSelectMgr::getInstance()->sendGodlikeRequest("telehub", "connect");
199} 199}
200 200
201// static 201// static
202void LLFloaterTelehub::onClickDisconnect(void* data) 202void LLFloaterTelehub::onClickDisconnect(void* data)
203{ 203{
204 gSelectMgr->sendGodlikeRequest("telehub", "delete"); 204 LLSelectMgr::getInstance()->sendGodlikeRequest("telehub", "delete");
205} 205}
206 206
207// static 207// static
208void LLFloaterTelehub::onClickAddSpawnPoint(void* data) 208void LLFloaterTelehub::onClickAddSpawnPoint(void* data)
209{ 209{
210 gSelectMgr->sendGodlikeRequest("telehub", "spawnpoint add"); 210 LLSelectMgr::getInstance()->sendGodlikeRequest("telehub", "spawnpoint add");
211 gSelectMgr->deselectAll(); 211 LLSelectMgr::getInstance()->deselectAll();
212} 212}
213 213
214// static 214// static
@@ -216,7 +216,7 @@ void LLFloaterTelehub::onClickRemoveSpawnPoint(void* data)
216{ 216{
217 if (!sInstance) return; 217 if (!sInstance) return;
218 218
219 LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(sInstance, "spawn_points_list"); 219 LLScrollListCtrl* list = sInstance->getChild<LLScrollListCtrl>("spawn_points_list");
220 if (!list) return; 220 if (!list) return;
221 221
222 S32 spawn_index = list->getFirstSelectedIndex(); 222 S32 spawn_index = list->getFirstSelectedIndex();
@@ -295,7 +295,7 @@ void LLFloaterTelehub::unpackTelehubInfo(LLMessageSystem* msg)
295 childSetVisible("help_text_not_connected", false); 295 childSetVisible("help_text_not_connected", false);
296 } 296 }
297 297
298 LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(this, "spawn_points_list"); 298 LLScrollListCtrl* list = getChild<LLScrollListCtrl>("spawn_points_list");
299 if (list) 299 if (list)
300 { 300 {
301 list->deleteAllItems(); 301 list->deleteAllItems();