[Floater Flexibility] Part two: Move floater dictionary into menu commands and use a common function to ShowFloaters between LLToolBar and menus.
This commit is contained in:
@@ -310,16 +310,12 @@ U32 AIHTTPView::updateColumn(U32 col, U32 start)
|
||||
return mStartColumn[col];
|
||||
}
|
||||
|
||||
//static
|
||||
void AIHTTPView::toggle_visibility(void* user_data)
|
||||
// virtual
|
||||
void AIHTTPView::setVisible(BOOL visible)
|
||||
{
|
||||
LLView* viewp = (LLView*)user_data;
|
||||
bool visible = !viewp->getVisible();
|
||||
if (visible)
|
||||
{
|
||||
AIPerService::resetUsed();
|
||||
}
|
||||
viewp->setVisible(visible);
|
||||
if (visible && visible != getVisible())
|
||||
AIPerService::resetUsed();
|
||||
LLContainerView::setVisible(visible);
|
||||
}
|
||||
|
||||
U64 AIHTTPView::sTime_40ms;
|
||||
|
||||
@@ -49,6 +49,7 @@ class AIHTTPView : public LLContainerView
|
||||
~AIHTTPView();
|
||||
|
||||
/*virtual*/ void draw(void);
|
||||
/*virtual*/ void setVisible(BOOL visible);
|
||||
/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
|
||||
|
||||
@@ -66,7 +67,6 @@ class AIHTTPView : public LLContainerView
|
||||
|
||||
public:
|
||||
static U64 getTime_40ms(void) { return sTime_40ms; }
|
||||
static void toggle_visibility(void* user_data);
|
||||
};
|
||||
|
||||
extern AIHTTPView *gHttpView;
|
||||
|
||||
@@ -291,7 +291,7 @@ LLFloaterAvatarList::~LLFloaterAvatarList()
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterAvatarList::toggle(void*)
|
||||
void LLFloaterAvatarList::toggleInstance(const LLSD&)
|
||||
{
|
||||
// [RLVa:KB]
|
||||
if(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
@@ -301,7 +301,7 @@ void LLFloaterAvatarList::toggle(void*)
|
||||
}
|
||||
else
|
||||
// [/RLVa:KB]
|
||||
if(!instanceExists() || !getInstance()->getVisible())
|
||||
if (!instanceVisible())
|
||||
{
|
||||
showInstance();
|
||||
}
|
||||
|
||||
@@ -212,10 +212,10 @@ public:
|
||||
* @brief Toggles interface visibility
|
||||
* There is only one instance of the avatar scanner at any time.
|
||||
*/
|
||||
static void toggle(void*);
|
||||
static void toggleInstance(const LLSD& = LLSD());
|
||||
|
||||
static void showInstance();
|
||||
static bool instanceVisible() { return instanceExists() && instance().getVisible(); }
|
||||
static bool instanceVisible(const LLSD& = LLSD()) { return instanceExists() && instance().getVisible(); }
|
||||
|
||||
// Decides which user-chosen columns to show and hide.
|
||||
void assessColumns();
|
||||
|
||||
@@ -174,9 +174,9 @@ void LLFloaterGesture::show()
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterGesture::toggleVisibility()
|
||||
void LLFloaterGesture::toggleInstance(const LLSD&)
|
||||
{
|
||||
if(sInstance && sInstance->getVisible())
|
||||
if (instanceVisible())
|
||||
{
|
||||
sInstance->close();
|
||||
}
|
||||
@@ -187,7 +187,7 @@ void LLFloaterGesture::toggleVisibility()
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLFloaterGesture::instanceVisible()
|
||||
bool LLFloaterGesture::instanceVisible(const LLSD&)
|
||||
{
|
||||
return sInstance && sInstance->getVisible();
|
||||
}
|
||||
|
||||
@@ -62,9 +62,9 @@ public:
|
||||
virtual BOOL postBuild();
|
||||
|
||||
static void show();
|
||||
static void toggleVisibility();
|
||||
static void toggleInstance(const LLSD& = LLSD());
|
||||
static void refreshAll();
|
||||
static bool instanceVisible();
|
||||
static bool instanceVisible(const LLSD& = LLSD());
|
||||
|
||||
protected:
|
||||
// Reads from the gesture manager's list of active gestures
|
||||
|
||||
@@ -256,6 +256,10 @@ LLFloaterMemLeak* LLFloaterMemLeak::instance()
|
||||
|
||||
void LLFloaterMemLeak::show(void*)
|
||||
{
|
||||
#ifdef LL_RELEASE_FOR_DOWNLOAD
|
||||
if (!gSavedSettings.getBOOL("QAMode"))
|
||||
return; // Singu Note: We should probably tell them why this won't work before returning.
|
||||
#endif
|
||||
instance()->open();
|
||||
}
|
||||
|
||||
|
||||
@@ -34,116 +34,254 @@
|
||||
|
||||
#include "llmenucommands.h"
|
||||
|
||||
#include "imageids.h"
|
||||
#include "llfontgl.h"
|
||||
#include "llrect.h"
|
||||
#include "llerror.h"
|
||||
#include "llstring.h"
|
||||
#include "message.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "aihttpview.h"
|
||||
#include "floaterao.h"
|
||||
#include "floaterlocalassetbrowse.h"
|
||||
#include "jcfloaterareasearch.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llcallingcard.h"
|
||||
#include "llchatbar.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llfirstuse.h"
|
||||
#include "llconsole.h"
|
||||
#include "lldebugview.h"
|
||||
#include "llfasttimerview.h"
|
||||
#include "llfloaterabout.h"
|
||||
#include "llfloateractivespeakers.h"
|
||||
#include "llfloateravatarlist.h"
|
||||
#include "llfloaterbeacons.h"
|
||||
#include "llfloaterblacklist.h"
|
||||
#include "llfloaterbuildoptions.h"
|
||||
#include "llfloaterbump.h"
|
||||
#include "llfloaterbuycurrency.h"
|
||||
#include "llfloatercamera.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfloaterdirectory.h"
|
||||
#include "llfloaterchatterbox.h"
|
||||
#include "llfloatercustomize.h"
|
||||
#include "llfloaterdaycycle.h"
|
||||
#include "llfloaterdisplayname.h"
|
||||
#include "llfloatereditui.h"
|
||||
#include "llfloaterenvsettings.h"
|
||||
#include "llfloaterexploreanimations.h"
|
||||
#include "llfloaterexploresounds.h"
|
||||
#include "llfloaterfonttest.h"
|
||||
#include "llfloatergesture.h"
|
||||
#include "llfloatergodtools.h"
|
||||
#include "llfloaterhud.h"
|
||||
#include "llfloaterinspect.h"
|
||||
#include "llfloaterinventory.h"
|
||||
#include "llfloaterlagmeter.h"
|
||||
#include "llfloaterland.h"
|
||||
#include "llfloaterlandholdings.h"
|
||||
#include "llfloatermap.h"
|
||||
#include "llfloatermemleak.h"
|
||||
#include "llfloatermessagelog.h"
|
||||
#include "llfloatermute.h"
|
||||
#include "llfloaternotificationsconsole.h"
|
||||
#include "llfloateroutbox.h"
|
||||
#include "llfloaterpathfindingcharacters.h"
|
||||
#include "llfloaterpathfindinglinksets.h"
|
||||
#include "llfloaterperms.h"
|
||||
#include "llfloaterpostprocess.h"
|
||||
#include "llfloaterpreference.h"
|
||||
#include "llfloaterregiondebugconsole.h"
|
||||
#include "llfloaterregioninfo.h"
|
||||
#include "llfloaterreporter.h"
|
||||
#include "llfloaterscriptdebug.h"
|
||||
#include "llfloaterscriptlimits.h"
|
||||
#include "llfloatersettingsdebug.h"
|
||||
#include "llfloatersnapshot.h"
|
||||
#include "llfloaterstats.h"
|
||||
#include "llfloaterteleporthistory.h"
|
||||
#include "llfloatertest.h"
|
||||
#include "llfloatervoiceeffect.h"
|
||||
#include "llfloaterwater.h"
|
||||
#include "llfloaterwebcontent.h"
|
||||
#include "llfloaterwindlight.h"
|
||||
#include "llfloaterworldmap.h"
|
||||
#include "llgivemoney.h"
|
||||
#include "llinventorypanel.h"
|
||||
#include "llnotify.h"
|
||||
#include "llstatusbar.h"
|
||||
#include "llimview.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llui.h"
|
||||
#include "llviewergesture.h" // for triggering gestures
|
||||
#include "llviewermessage.h"
|
||||
#include "llviewerparceloverlay.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llviewerstats.h"
|
||||
#include "llframestatview.h"
|
||||
#include "llmakeoutfitdialog.h"
|
||||
#include "llmoveview.h" // LLFloaterMove
|
||||
#include "lltextureview.h"
|
||||
#include "lltoolbar.h"
|
||||
#include "lltoolgrab.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llworld.h"
|
||||
#include "llworldmap.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "llvelocitybar.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
// [RLVa:LF]
|
||||
#include "rlvfloaters.h"
|
||||
// [/RLVa:LF]
|
||||
#include "shfloatermediaticker.h"
|
||||
#include "slfloatermediafilter.h"
|
||||
|
||||
void toggle_search_floater();
|
||||
|
||||
void handle_track_avatar(const LLUUID& agent_id, const std::string& name)
|
||||
{
|
||||
LLAvatarTracker::instance().track(agent_id, name);
|
||||
|
||||
LLFloaterDirectory::hide(NULL);
|
||||
LLFloaterWorldMap::show(true);
|
||||
}
|
||||
|
||||
void handle_mouselook(void*)
|
||||
{
|
||||
gAgentCamera.changeCameraToMouselook();
|
||||
}
|
||||
|
||||
|
||||
void handle_map(void*)
|
||||
{
|
||||
LLFloaterWorldMap::toggle();
|
||||
}
|
||||
|
||||
void handle_mini_map(void*)
|
||||
{
|
||||
LLFloaterMap::toggleInstance();
|
||||
}
|
||||
|
||||
|
||||
void handle_find(void*)
|
||||
{
|
||||
toggle_search_floater();
|
||||
}
|
||||
|
||||
|
||||
void handle_events(void*)
|
||||
{
|
||||
LLFloaterDirectory::toggleEvents(NULL);
|
||||
}
|
||||
|
||||
|
||||
void handle_inventory(void*)
|
||||
{
|
||||
// We're using the inventory, possibly for the
|
||||
// first time.
|
||||
LLFirstUse::useInventory();
|
||||
|
||||
LLInventoryView::toggleVisibility(NULL);
|
||||
}
|
||||
|
||||
|
||||
void handle_chat(void*)
|
||||
void handle_chat()
|
||||
{
|
||||
// give focus to chatbar if it's open but not focused
|
||||
static const LLCachedControl<bool> chat_visible("ChatVisible",true);
|
||||
if (chat_visible && gFocusMgr.childHasKeyboardFocus(gChatBar))
|
||||
{
|
||||
LLChatBar::stopChat();
|
||||
}
|
||||
else
|
||||
{
|
||||
LLChatBar::startChat(NULL);
|
||||
}
|
||||
(chat_visible && gFocusMgr.childHasKeyboardFocus(gChatBar)) ? LLChatBar::stopChat() : LLChatBar::startChat(NULL);
|
||||
}
|
||||
void handle_debug_avatar_textures(void*);
|
||||
template<typename T> void handle_singleton_toggle(void*);
|
||||
void show_outfit_dialog() { new LLMakeOutfitDialog(false); }
|
||||
void toggle_build() { LLToolMgr::getInstance()->toggleBuildMode(); }
|
||||
void toggle_control(const std::string& name) { if (LLControlVariable* control = gSavedSettings.getControl(name)) control->set(!control->get()); }
|
||||
void toggle_search_floater();
|
||||
void toggle_always_run() { gAgent.getAlwaysRun() ? gAgent.clearAlwaysRun() : gAgent.setAlwaysRun(); }
|
||||
void toggle_sit();
|
||||
void toggle_mouselook() { gAgentCamera.cameraMouselook() ? gAgentCamera.changeCameraToDefault() : gAgentCamera.changeCameraToMouselook(); }
|
||||
|
||||
void handle_slash_key(void*)
|
||||
bool is_visible_view(boost::function<LLView* ()> get)
|
||||
{
|
||||
// LLChatBar::startChat("/");
|
||||
//
|
||||
// Don't do this, it results in a double-slash in the input field.
|
||||
// Another "/" will be automatically typed for us, because the WM_KEYDOWN event
|
||||
// that generated the menu accelerator call (and hence puts focus in
|
||||
// the chat edtior) will be followed by a "/" WM_CHAR character message,
|
||||
// which will type the slash. Yes, it's weird. It only matters for
|
||||
// menu accelerators that put input focus into a field. And Mac works
|
||||
// the same way. JC
|
||||
|
||||
LLChatBar::startChat(NULL);
|
||||
if (LLView* v = get())
|
||||
return v->getVisible();
|
||||
return false;
|
||||
}
|
||||
|
||||
struct CommWrapper
|
||||
{
|
||||
static bool only_comm()
|
||||
{
|
||||
static const LLCachedControl<bool> only("CommunicateSpecificShortcut");
|
||||
return only || LLFloaterChatterBox::getInstance()->getFloaterCount();
|
||||
}
|
||||
static bool instanceVisible(const LLSD& key) { return only_comm() ? LLFloaterChatterBox::instanceVisible(key) : LLFloaterMyFriends::instanceVisible(key); }
|
||||
static void toggleInstance(const LLSD& key) { only_comm() ? LLFloaterChatterBox::toggleInstance(key) : LLFloaterMyFriends::toggleInstance(key); }
|
||||
};
|
||||
|
||||
struct MenuFloaterDict : public LLSingleton<MenuFloaterDict>
|
||||
{
|
||||
typedef std::map<const std::string, std::pair<boost::function<void ()>, boost::function<bool ()> > > menu_floater_map_t;
|
||||
menu_floater_map_t mEntries;
|
||||
|
||||
MenuFloaterDict()
|
||||
{
|
||||
registerConsole("debug console", gDebugView->mDebugConsolep);
|
||||
registerConsole("fast timers", gDebugView->mFastTimerView);
|
||||
registerConsole("frame console", gDebugView->mFrameStatView);
|
||||
registerConsole("http console", gHttpView);
|
||||
registerConsole("texture console", gTextureView);
|
||||
if (gAuditTexture)
|
||||
{
|
||||
registerConsole("texture category console", gTextureCategoryView);
|
||||
registerConsole("texture size console", gTextureSizeView);
|
||||
}
|
||||
registerConsole("velocity", gVelocityBar);
|
||||
registerFloater("about", boost::bind(&LLFloaterAbout::show,(void*)NULL));
|
||||
registerFloater("ao", boost::bind(LLFloaterAO::show, (void*)NULL));
|
||||
registerFloater("always run", boost::bind(toggle_always_run), boost::bind(&LLAgent::getAlwaysRun, &gAgent));
|
||||
registerFloater("appearance", boost::bind(LLFloaterCustomize::show));
|
||||
registerFloater("build", boost::bind(toggle_build));
|
||||
registerFloater("buy currency", boost::bind(LLFloaterBuyCurrency::buyCurrency));
|
||||
registerFloater("buy land", boost::bind(&LLViewerParcelMgr::startBuyLand, boost::bind(LLViewerParcelMgr::getInstance), false));
|
||||
registerFloater("chatbar", boost::bind(handle_chat));
|
||||
registerFloater("complaint reporter", boost::bind(LLFloaterReporter::showFromMenu, COMPLAINT_REPORT));
|
||||
registerFloater("debug avatar", boost::bind(handle_debug_avatar_textures, (void*)NULL));
|
||||
registerFloater("debug settings", boost::bind(handle_singleton_toggle<LLFloaterSettingsDebug>, (void*)NULL));
|
||||
registerFloater("displayname", boost::bind(LLFloaterDisplayName::show));
|
||||
registerFloater("edit ui", boost::bind(LLFloaterEditUI::show, (void*)NULL));
|
||||
registerFloater("fly", boost::bind(LLAgent::toggleFlying));
|
||||
registerFloater("font test", boost::bind(LLFloaterFontTest::show, (void*)NULL));
|
||||
registerFloater("god tools", boost::bind(LLFloaterGodTools::show, (void*)NULL));
|
||||
registerFloater("grid options", boost::bind(LLFloaterBuildOptions::show, (void*)NULL));
|
||||
//Singu TODO: Re-implement f1 help.
|
||||
//registerFloater("help f1", boost::bind(/*gViewerHtmlHelp.show*/));
|
||||
registerFloater("help tutorial", boost::bind(LLFloaterHUD::showHUD));
|
||||
registerFloater("inspect", boost::bind(LLFloaterInspect::showInstance));
|
||||
registerFloater("inventory", boost::bind(LLInventoryView::toggleVisibility, (void*)NULL), boost::bind(is_visible_view, static_cast<boost::function<LLView* ()> >(LLInventoryView::getActiveInventory)));
|
||||
registerFloater("local assets", boost::bind(FloaterLocalAssetBrowser::show, (void*)0));
|
||||
registerFloater("mean events", boost::bind(LLFloaterBump::show, (void*)NULL));
|
||||
registerFloater("media ticker", boost::bind(handle_ticker_toggle, (void*)NULL), boost::bind(SHFloaterMediaTicker::instanceExists));
|
||||
registerFloater("memleak", boost::bind(LLFloaterMemLeak::show, (void*)NULL));
|
||||
registerFloater("messagelog", boost::bind(LLFloaterMessageLog::show));
|
||||
registerFloater("mouselook", boost::bind(toggle_mouselook));
|
||||
registerFloater("my land", boost::bind(LLFloaterLandHoldings::show, (void*)NULL));
|
||||
registerFloater("outfit", boost::bind(show_outfit_dialog));
|
||||
registerFloater("preferences", boost::bind(LLFloaterPreference::show, (void*)NULL));
|
||||
registerFloater("script errors", boost::bind(LLFloaterScriptDebug::show, LLUUID::null));
|
||||
registerFloater("search", boost::bind(toggle_search_floater));
|
||||
registerFloater("snapshot", boost::bind(LLFloaterSnapshot::show, (void*)NULL));
|
||||
registerFloater("test", boost::bind(LLFloaterTest::show, (void*)NULL));
|
||||
// Phoenix: Wolfspirit: Enabled Show Floater out of viewer menu
|
||||
registerFloater("toolbar", boost::bind(toggle_control, "ShowToolBar"), boost::bind(&LLToolBar::getVisible, gToolBar));
|
||||
registerFloater("web", boost::bind(LLFloaterWebContent::showInstance, "dict web", LLFloaterWebContent::Params()));
|
||||
registerFloater("world map", boost::bind(LLFloaterWorldMap::toggle));
|
||||
registerFloater("anims_explorer", boost::bind(LLFloaterExploreAnimations::show));
|
||||
registerFloater("sound_explorer", boost::bind(LLFloaterExploreSounds::toggle), boost::bind(LLFloaterExploreSounds::visible));
|
||||
registerFloater("asset_blacklist", boost::bind(LLFloaterBlacklist::toggle), boost::bind(LLFloaterBlacklist::visible));
|
||||
registerFloater("DayCycle", boost::bind(LLFloaterDayCycle::show), boost::bind(LLFloaterDayCycle::isOpen));
|
||||
registerFloater("EnvSettings", boost::bind(LLFloaterEnvSettings::show), boost::bind(LLFloaterEnvSettings::isOpen));
|
||||
registerFloater("PostProcess", boost::bind(LLFloaterPostProcess::show));
|
||||
registerFloater("RegionDebugConsole", boost::bind(handle_singleton_toggle<LLFloaterRegionDebugConsole>, (void*)NULL), boost::bind(LLFloaterRegionDebugConsole::instanceExists));
|
||||
registerFloater("WaterSettings", boost::bind(LLFloaterWater::show), boost::bind(LLFloaterWater::isOpen));
|
||||
registerFloater("Windlight", boost::bind(LLFloaterWindLight::show), boost::bind(LLFloaterWindLight::isOpen));
|
||||
registerFloater<CommWrapper> ("im");
|
||||
registerFloater<LLFloaterLand> ("about land");
|
||||
registerFloater<LLFloaterRegionInfo> ("about region");
|
||||
registerFloater<LLFloaterActiveSpeakers> ("active speakers");
|
||||
registerFloater<JCFloaterAreaSearch> ("areasearch");
|
||||
registerFloater<LLFloaterBeacons> ("beacons");
|
||||
registerFloater<LLFloaterCamera> ("camera controls");
|
||||
registerFloater<LLFloaterChat> ("chat history");
|
||||
registerFloater<LLFloaterChatterBox> ("communicate");
|
||||
registerFloater<LLFloaterMyFriends> ("friends", 0);
|
||||
registerFloater<LLFloaterGesture> ("gestures");
|
||||
registerFloater<LLFloaterMyFriends> ("groups", 1);
|
||||
registerFloater<LLFloaterLagMeter> ("lag meter");
|
||||
registerFloater<SLFloaterMediaFilter> ("media filter");
|
||||
registerFloater<LLFloaterMap> ("mini map");
|
||||
registerFloater<LLFloaterMove> ("movement controls");
|
||||
registerFloater<LLFloaterMute> ("mute list");
|
||||
registerFloater<LLFloaterNotificationConsole> ("notifications console");
|
||||
registerFloater<LLFloaterOutbox> ("outbox");
|
||||
registerFloater<LLFloaterPerms> ("perm prefs");
|
||||
registerFloater<LLFloaterAvatarList> ("radar");
|
||||
registerFloater<LLFloaterScriptLimits> ("script info");
|
||||
registerFloater<LLFloaterStats> ("stat bar");
|
||||
registerFloater<LLFloaterTeleportHistory> ("teleport history");
|
||||
registerFloater<LLFloaterVoiceEffect> ("voice effect");
|
||||
registerFloater<LLFloaterPathfindingCharacters> ("pathfinding_characters");
|
||||
registerFloater<LLFloaterPathfindingLinksets> ("pathfinding_linksets");
|
||||
// [RLVa:LF]
|
||||
registerFloater<RlvFloaterBehaviours>("rlv restrictions");
|
||||
registerFloater<RlvFloaterLocks>("rlv locks");
|
||||
registerFloater<RlvFloaterStrings>("rlv strings");
|
||||
// [/RLVa:LF]
|
||||
}
|
||||
template <typename T>
|
||||
void registerConsole(const std::string& name, T* console)
|
||||
{
|
||||
registerFloater(name, boost::bind(&T::setVisible, console, boost::bind(&T::getVisible, console)), boost::bind(&T::getVisible, console));
|
||||
}
|
||||
void registerFloater(const std::string& name, boost::function<void ()> show, boost::function<bool ()> visible = NULL)
|
||||
{
|
||||
mEntries.insert( std::make_pair( name, std::make_pair( show, visible ) ) );
|
||||
}
|
||||
template <typename T>
|
||||
void registerFloater(const std::string& name, const LLSD& key = LLSD())
|
||||
{
|
||||
registerFloater(name, boost::bind(&T::toggleInstance,key), boost::bind(&T::instanceVisible,key));
|
||||
}
|
||||
};
|
||||
|
||||
void show_floater(const std::string& floater_name)
|
||||
{
|
||||
if (floater_name.empty()) return;
|
||||
|
||||
MenuFloaterDict::menu_floater_map_t::iterator it = MenuFloaterDict::instance().mEntries.find(floater_name);
|
||||
if (it == MenuFloaterDict::instance().mEntries.end()) // Simple codeless floater
|
||||
{
|
||||
if (LLFloater* floater = LLUICtrlFactory::getInstance()->getBuiltFloater(floater_name))
|
||||
gFloaterView->bringToFront(floater);
|
||||
else
|
||||
LLUICtrlFactory::getInstance()->buildFloater(new LLFloater(), floater_name);
|
||||
}
|
||||
else if (it->second.first)
|
||||
{
|
||||
it->second.first();
|
||||
}
|
||||
}
|
||||
|
||||
// Singu TODO: It'd be reallllly nice if we could use this as a control for buttons too.
|
||||
bool floater_visible(const std::string& floater_name)
|
||||
{
|
||||
MenuFloaterDict::menu_floater_map_t::iterator it = MenuFloaterDict::instance().mEntries.find(floater_name);
|
||||
return it != MenuFloaterDict::instance().mEntries.end() && it->second.second && it->second.second();
|
||||
}
|
||||
|
||||
@@ -33,17 +33,4 @@
|
||||
#ifndef LL_LLMENUCOMMANDS_H
|
||||
#define LL_LLMENUCOMMANDS_H
|
||||
|
||||
class LLUUID;
|
||||
|
||||
void handle_track_avatar(const LLUUID& agent_id, const std::string& name);
|
||||
void handle_mouselook(void*);
|
||||
void handle_map(void*);
|
||||
void handle_mini_map(void*);
|
||||
void handle_find(void*);
|
||||
void handle_events(void*);
|
||||
void handle_inventory(void*);
|
||||
void handle_chat(void*);
|
||||
void handle_return_key(void*);
|
||||
void handle_slash_key(void*);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "lleconomy.h"
|
||||
#include "llfirstuse.h"
|
||||
#include "llfiltereditor.h"
|
||||
#include "llinventorybridge.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
@@ -444,6 +445,8 @@ void LLInventoryView::toggleVisibility()
|
||||
S32 count = sActiveViews.count();
|
||||
if (0 == count)
|
||||
{
|
||||
// We're using the inventory, possibly for the first time.
|
||||
LLFirstUse::useInventory();
|
||||
showAgentInventory(TRUE);
|
||||
}
|
||||
else if (1 == count)
|
||||
|
||||
@@ -35,29 +35,21 @@
|
||||
|
||||
#include "lltoolbar.h"
|
||||
|
||||
#include "llbutton.h"
|
||||
#include "llflyoutbutton.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llui.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llagentwearables.h"
|
||||
#include "llfirstuse.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
#include "llfloateravatarlist.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfloaterchatterbox.h"
|
||||
#include "llfloatercustomize.h"
|
||||
#include "llfloaterfriends.h"
|
||||
#include "llfloaterinventory.h"
|
||||
#include "llfloatermute.h"
|
||||
#include "llfloatersnapshot.h"
|
||||
#include "llimpanel.h"
|
||||
#include "llimview.h"
|
||||
#include "llmenucommands.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "lltoolgrab.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
#include "llvoavatarself.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
@@ -102,6 +94,7 @@ F32 LLToolBar::sInventoryAutoOpenTime = 1.f;
|
||||
//
|
||||
// Functions
|
||||
//
|
||||
void show_floater(const std::string& floater_name);
|
||||
|
||||
LLToolBar::LLToolBar()
|
||||
: LLLayoutPanel()
|
||||
@@ -111,47 +104,14 @@ LLToolBar::LLToolBar()
|
||||
{
|
||||
setIsChrome(TRUE);
|
||||
setFocusRoot(TRUE);
|
||||
mCommitCallbackRegistrar.add("ShowFloater", boost::bind(show_floater, _2));
|
||||
}
|
||||
|
||||
|
||||
BOOL LLToolBar::postBuild()
|
||||
{
|
||||
childSetCommitCallback("communicate_btn", onClickCommunicate, this);
|
||||
|
||||
childSetAction("chat_btn", onClickChat, this);
|
||||
childSetControlName("chat_btn", "ChatVisible");
|
||||
|
||||
//childSetAction("appearance_btn", onClickAppearance, this);
|
||||
//childSetControlName("appearance_btn", "");
|
||||
|
||||
childSetAction("radar_list_btn", onClickRadarList, this);
|
||||
childSetControlName("radar_list_btn", "ShowRadar");
|
||||
|
||||
childSetAction("fly_btn", onClickFly, this);
|
||||
childSetControlName("fly_btn", "FlyBtnState");
|
||||
|
||||
//childSetAction("sit_btn", onClickSit, this);
|
||||
//childSetControlName("sit_btn", "SitBtnState");
|
||||
|
||||
childSetAction("snapshot_btn", onClickSnapshot, this);
|
||||
childSetControlName("snapshot_btn", "SnapshotBtnState");
|
||||
|
||||
childSetAction("directory_btn", onClickDirectory, this);
|
||||
childSetControlName("directory_btn", "ShowDirectory");
|
||||
|
||||
childSetAction("build_btn", onClickBuild, this);
|
||||
childSetControlName("build_btn", "BuildBtnState");
|
||||
|
||||
childSetAction("radar_btn", onClickRadar, this);
|
||||
childSetControlName("radar_btn", "ShowMiniMap");
|
||||
|
||||
childSetAction("map_btn", onClickMap, this);
|
||||
childSetControlName("map_btn", "ShowWorldMap");
|
||||
|
||||
childSetAction("inventory_btn", onClickInventory, this);
|
||||
childSetControlName("inventory_btn", "ShowInventory");
|
||||
|
||||
mCommunicateBtn.connect(this, "communicate_btn");
|
||||
mCommunicateBtn->setCommitCallback(boost::bind(&LLToolBar::onClickCommunicate, this, _2));
|
||||
mFlyBtn.connect(this, "fly_btn");
|
||||
mBuildBtn.connect(this, "build_btn");
|
||||
mMapBtn.connect(this, "map_btn");
|
||||
@@ -202,11 +162,11 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
std::string& tooltip_msg)
|
||||
{
|
||||
LLButton* inventory_btn = getChild<LLButton>("inventory_btn");
|
||||
if (!inventory_btn) return FALSE;
|
||||
if (!inventory_btn || !inventory_btn->getVisible()) return FALSE;
|
||||
|
||||
LLInventoryView* active_inventory = LLInventoryView::getActiveInventory();
|
||||
|
||||
if(active_inventory && active_inventory->getVisible())
|
||||
if (active_inventory && active_inventory->getVisible())
|
||||
{
|
||||
mInventoryAutoOpen = FALSE;
|
||||
}
|
||||
@@ -230,22 +190,6 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
return LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLToolBar::toggle(void*)
|
||||
{
|
||||
BOOL show = gSavedSettings.getBOOL("ShowToolBar");
|
||||
gSavedSettings.setBOOL("ShowToolBar", !show);
|
||||
gToolBar->setVisible(!show);
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
BOOL LLToolBar::visible(void*)
|
||||
{
|
||||
return gToolBar->getVisible();
|
||||
}
|
||||
|
||||
|
||||
void LLToolBar::layoutButtons()
|
||||
{
|
||||
#if LL_DARWIN
|
||||
@@ -294,33 +238,21 @@ void LLToolBar::refresh()
|
||||
return;
|
||||
|
||||
static LLCachedControl<bool> show("ShowToolBar", true);
|
||||
static LLCachedControl<bool> ascent_build_always_enabled("AscentBuildAlwaysEnabled", true);
|
||||
BOOL mouselook = gAgentCamera.cameraMouselook();
|
||||
setVisible(show && !mouselook);
|
||||
|
||||
BOOL sitting = FALSE;
|
||||
static LLCachedControl<bool> continue_flying_on_unsit("LiruContinueFlyingOnUnsit");
|
||||
if (continue_flying_on_unsit)
|
||||
{
|
||||
sitting = false;
|
||||
}
|
||||
else if (gAgentAvatarp)
|
||||
{
|
||||
sitting = gAgentAvatarp->isSitting();
|
||||
}
|
||||
bool sitting = !continue_flying_on_unsit && gAgentAvatarp && gAgentAvatarp->isSitting();
|
||||
|
||||
mFlyBtn->setEnabled((gAgent.canFly() || gAgent.getFlying()) && !sitting );
|
||||
static LLCachedControl<bool> ascent_build_always_enabled("AscentBuildAlwaysEnabled", true);
|
||||
mBuildBtn->setEnabled((LLViewerParcelMgr::getInstance()->allowAgentBuild() || ascent_build_always_enabled));
|
||||
|
||||
// Check to see if we're in build mode
|
||||
BOOL build_mode = LLToolMgr::getInstance()->inEdit();
|
||||
// And not just clicking on a scripted object
|
||||
if (LLToolGrab::getInstance()->getHideBuildHighlight())
|
||||
{
|
||||
build_mode = FALSE;
|
||||
}
|
||||
bool build_mode = LLToolMgr::getInstance()->inEdit() && !LLToolGrab::getInstance()->getHideBuildHighlight();
|
||||
static LLCachedControl<bool> build_btn_state("BuildBtnState",false);
|
||||
if(build_btn_state!=(bool)build_mode)
|
||||
if (build_btn_state != build_mode)
|
||||
build_btn_state = build_mode;
|
||||
|
||||
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-10 (RLVa-1.0.0g)
|
||||
@@ -337,63 +269,42 @@ void LLToolBar::refresh()
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
if (isInVisibleChain())
|
||||
if (isInVisibleChain() && mCommunicateBtn->getVisible())
|
||||
{
|
||||
updateCommunicateList();
|
||||
}
|
||||
}
|
||||
|
||||
void bold_if_equal(const LLFloater* f1, const LLFloater* f2, LLScrollListItem* itemp)
|
||||
{
|
||||
if (f1 != f2) return;
|
||||
static_cast<LLScrollListText*>(itemp->getColumn(0))->setFontStyle(LLFontGL::BOLD);
|
||||
}
|
||||
|
||||
void LLToolBar::updateCommunicateList()
|
||||
{
|
||||
LLFlyoutButton* communicate_button = mCommunicateBtn;
|
||||
LLSD selected = communicate_button->getValue();
|
||||
LLSD selected = mCommunicateBtn->getValue();
|
||||
|
||||
communicate_button->removeall();
|
||||
mCommunicateBtn->removeall();
|
||||
|
||||
LLFloater* frontmost_floater = LLFloaterChatterBox::getInstance()->getActiveFloater();
|
||||
LLScrollListItem* itemp = NULL;
|
||||
bold_if_equal(LLFloaterMyFriends::getInstance(), frontmost_floater, mCommunicateBtn->add(LLFloaterMyFriends::getInstance()->getShortTitle(), LLSD("contacts"), ADD_TOP));
|
||||
bold_if_equal(LLFloaterChat::getInstance(), frontmost_floater, mCommunicateBtn->add(LLFloaterChat::getInstance()->getShortTitle(), LLSD("local chat"), ADD_TOP));
|
||||
mCommunicateBtn->addSeparator(ADD_TOP);
|
||||
mCommunicateBtn->add(getString("Redock Windows"), LLSD("redock"), ADD_TOP);
|
||||
mCommunicateBtn->addSeparator(ADD_TOP);
|
||||
bold_if_equal(LLFloaterMute::getInstance(), frontmost_floater, mCommunicateBtn->add(LLFloaterMute::getInstance()->getShortTitle(), LLSD("mute list"), ADD_TOP));
|
||||
|
||||
itemp = communicate_button->add(LLFloaterMyFriends::getInstance()->getShortTitle(), LLSD("contacts"), ADD_TOP);
|
||||
if (LLFloaterMyFriends::getInstance() == frontmost_floater)
|
||||
if (gIMMgr->getIMFloaterHandles().size() > 0) mCommunicateBtn->addSeparator(ADD_TOP);
|
||||
for(std::set<LLHandle<LLFloater> >::const_iterator floater_handle_it = gIMMgr->getIMFloaterHandles().begin(); floater_handle_it != gIMMgr->getIMFloaterHandles().end(); ++floater_handle_it)
|
||||
{
|
||||
((LLScrollListText*)itemp->getColumn(0))->setFontStyle(LLFontGL::BOLD);
|
||||
// make sure current tab is selected in list
|
||||
if (selected.isUndefined())
|
||||
if (LLFloaterIMPanel* im_floaterp = (LLFloaterIMPanel*)floater_handle_it->get())
|
||||
{
|
||||
selected = itemp->getValue();
|
||||
}
|
||||
}
|
||||
itemp = communicate_button->add(LLFloaterChat::getInstance()->getShortTitle(), LLSD("local chat"), ADD_TOP);
|
||||
if (LLFloaterChat::getInstance() == frontmost_floater)
|
||||
{
|
||||
((LLScrollListText*)itemp->getColumn(0))->setFontStyle(LLFontGL::BOLD);
|
||||
if (selected.isUndefined())
|
||||
{
|
||||
selected = itemp->getValue();
|
||||
}
|
||||
}
|
||||
communicate_button->addSeparator(ADD_TOP);
|
||||
communicate_button->add(getString("Redock Windows"), LLSD("redock"), ADD_TOP);
|
||||
communicate_button->addSeparator(ADD_TOP);
|
||||
communicate_button->add(LLFloaterMute::getInstance()->getShortTitle(), LLSD("mute list"), ADD_TOP);
|
||||
|
||||
std::set<LLHandle<LLFloater> >::const_iterator floater_handle_it;
|
||||
|
||||
if (gIMMgr->getIMFloaterHandles().size() > 0)
|
||||
{
|
||||
communicate_button->addSeparator(ADD_TOP);
|
||||
}
|
||||
|
||||
for(floater_handle_it = gIMMgr->getIMFloaterHandles().begin(); floater_handle_it != gIMMgr->getIMFloaterHandles().end(); ++floater_handle_it)
|
||||
{
|
||||
LLFloaterIMPanel* im_floaterp = (LLFloaterIMPanel*)floater_handle_it->get();
|
||||
if (im_floaterp)
|
||||
{
|
||||
static LLCachedControl<bool> show_counts("ShowUnreadIMsCounts", true);
|
||||
S32 count = im_floaterp->getNumUnreadMessages();
|
||||
std::string floater_title;
|
||||
if (count > 0) floater_title = "*";
|
||||
floater_title.append(im_floaterp->getShortTitle());
|
||||
static LLCachedControl<bool> show_counts("ShowUnreadIMsCounts", true);
|
||||
if (show_counts && count > 0)
|
||||
{
|
||||
floater_title += " - ";
|
||||
@@ -408,32 +319,18 @@ void LLToolBar::updateCommunicateList()
|
||||
floater_title += getString("IM");
|
||||
}
|
||||
}
|
||||
|
||||
itemp = communicate_button->add(floater_title, im_floaterp->getSessionID(), ADD_TOP);
|
||||
if (im_floaterp == frontmost_floater)
|
||||
{
|
||||
((LLScrollListText*)itemp->getColumn(0))->setFontStyle(LLFontGL::BOLD);
|
||||
if (selected.isUndefined())
|
||||
{
|
||||
selected = itemp->getValue();
|
||||
}
|
||||
}
|
||||
bold_if_equal(im_floaterp, frontmost_floater, mCommunicateBtn->add(floater_title, im_floaterp->getSessionID(), ADD_TOP));
|
||||
}
|
||||
}
|
||||
|
||||
communicate_button->setToggleState(gSavedSettings.getBOOL("ShowCommunicate"));
|
||||
communicate_button->setValue(selected);
|
||||
mCommunicateBtn->setToggleState(gSavedSettings.getBOOL("ShowCommunicate"));
|
||||
if (!selected.isUndefined()) mCommunicateBtn->setValue(selected);
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLToolBar::onClickCommunicate(LLUICtrl* ctrl, void* user_data)
|
||||
void LLToolBar::onClickCommunicate(const LLSD& selected_option)
|
||||
{
|
||||
LLToolBar* toolbar = (LLToolBar*)user_data;
|
||||
LLFlyoutButton* communicate_button = toolbar->getChild<LLFlyoutButton>("communicate_btn");
|
||||
|
||||
LLSD selected_option = communicate_button->getValue();
|
||||
|
||||
if (selected_option.asString() == "contacts")
|
||||
{
|
||||
LLFloaterMyFriends::showInstance();
|
||||
@@ -484,101 +381,3 @@ void LLToolBar::onClickCommunicate(LLUICtrl* ctrl, void* user_data)
|
||||
LLFloaterChatterBox::showInstance(selected_option);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLToolBar::onClickChat(void* user_data)
|
||||
{
|
||||
handle_chat(NULL);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLToolBar::onClickAppearance(void*)
|
||||
{
|
||||
LLFloaterCustomize::show();
|
||||
}
|
||||
|
||||
// static
|
||||
void LLToolBar::onClickRadarList(void*)
|
||||
{
|
||||
LLFloaterAvatarList::toggle(0);
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLToolBar::onClickFly(void*)
|
||||
{
|
||||
gAgent.toggleFlying();
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLToolBar::onClickSit(void*)
|
||||
{
|
||||
if (!(gAgent.getControlFlags() & AGENT_CONTROL_SIT_ON_GROUND))
|
||||
{
|
||||
// sit down
|
||||
gAgent.setFlying(FALSE);
|
||||
gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
|
||||
|
||||
// Might be first sit
|
||||
LLFirstUse::useSit();
|
||||
}
|
||||
else
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
|
||||
// NOTE-RLVa: dead code?
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT))
|
||||
{
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
// stand up
|
||||
gAgent.setFlying(FALSE);
|
||||
gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLToolBar::onClickSnapshot(void*)
|
||||
{
|
||||
LLFloaterSnapshot::show (0);
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLToolBar::onClickDirectory(void*)
|
||||
{
|
||||
handle_find(NULL);
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLToolBar::onClickBuild(void*)
|
||||
{
|
||||
LLToolMgr::getInstance()->toggleBuildMode();
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLToolBar::onClickRadar(void*)
|
||||
{
|
||||
handle_mini_map(NULL);
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLToolBar::onClickMap(void*)
|
||||
{
|
||||
handle_map(NULL);
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLToolBar::onClickInventory(void*)
|
||||
{
|
||||
handle_inventory(NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -64,9 +64,6 @@ public:
|
||||
|
||||
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
|
||||
static void toggle(void*);
|
||||
static BOOL visible(void*);
|
||||
|
||||
// Move buttons to appropriate locations based on rect.
|
||||
void layoutButtons();
|
||||
|
||||
@@ -74,25 +71,13 @@ public:
|
||||
void refresh();
|
||||
|
||||
// callbacks
|
||||
static void onClickCommunicate(LLUICtrl*, void*);
|
||||
static void onClickChat(void* data);
|
||||
static void onClickAppearance(void* data);
|
||||
static void onClickFly(void*);
|
||||
static void onClickSit(void*);
|
||||
static void onClickSnapshot(void* data);
|
||||
static void onClickDirectory(void* data);
|
||||
static void onClickBuild(void* data);
|
||||
static void onClickRadar(void* data);
|
||||
static void onClickMap(void* data);
|
||||
static void onClickInventory(void* data);
|
||||
static void onClickRadarList(void* data);
|
||||
void onClickCommunicate(const LLSD& selected);
|
||||
|
||||
static F32 sInventoryAutoOpenTime;
|
||||
|
||||
private:
|
||||
void updateCommunicateList();
|
||||
|
||||
|
||||
private:
|
||||
BOOL mInventoryAutoOpen;
|
||||
LLFrameTimer mInventoryAutoOpenTimer;
|
||||
|
||||
@@ -42,133 +42,88 @@
|
||||
#include "llfeaturemanager.h"
|
||||
#include "llsecondlifeurls.h"
|
||||
// <edit>
|
||||
#include "floaterlocalassetbrowse.h"
|
||||
#include "llfloaterexploreanimations.h"
|
||||
#include "llfloaterexploresounds.h"
|
||||
#include "llfloaterblacklist.h"
|
||||
// </edit>
|
||||
#include "statemachine/aifilepicker.h"
|
||||
|
||||
// newview includes
|
||||
#include "lfsimfeaturehandler.h"
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llappearancemgr.h"
|
||||
#include "llagentwearables.h"
|
||||
#include "jcfloaterareasearch.h"
|
||||
#include "lfsimfeaturehandler.h"
|
||||
|
||||
#include "llagentpilot.h"
|
||||
#include "llavatarpropertiesprocessor.h"
|
||||
#include "llcallingcard.h"
|
||||
#include "llcompilequeue.h"
|
||||
#include "llconsole.h"
|
||||
#include "lldebugview.h"
|
||||
#include "llenvmanager.h"
|
||||
#include "llfirstuse.h"
|
||||
#include "llfloaterabout.h"
|
||||
#include "llfloateractivespeakers.h"
|
||||
#include "llfloateravatarlist.h"
|
||||
#include "llfloateravatartextures.h"
|
||||
#include "llfloaterbeacons.h"
|
||||
#include "llfloaterbuildoptions.h"
|
||||
#include "llfloaterbump.h"
|
||||
#include "llfloaterbuy.h"
|
||||
#include "llfloaterbuycontents.h"
|
||||
#include "llfloaterbuycurrency.h"
|
||||
#include "llfloaterbuyland.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfloatercustomize.h"
|
||||
#include "llfloaterdaycycle.h"
|
||||
#include "llfloaterdirectory.h"
|
||||
#include "llfloatereditui.h"
|
||||
#include "llfloaterchatterbox.h"
|
||||
#include "llfloaterfonttest.h"
|
||||
#include "llfloatergesture.h"
|
||||
#include "llfloatergodtools.h"
|
||||
#include "llfloaterhtmlcurrency.h"
|
||||
#include "llfloaterhud.h"
|
||||
#include "llfloaterinspect.h"
|
||||
#include "llfloaterinventory.h"
|
||||
#include "llfloaterlagmeter.h"
|
||||
#include "llfloaterland.h"
|
||||
#include "llfloaterlandholdings.h"
|
||||
#include "llfloatermap.h"
|
||||
#include "llfloatermute.h"
|
||||
#include "llfloateropenobject.h"
|
||||
#include "llfloateroutbox.h"
|
||||
#include "llfloaterpathfindingcharacters.h"
|
||||
#include "llfloaterpathfindinglinksets.h"
|
||||
#include "llfloaterperms.h"
|
||||
#include "llfloaterpostprocess.h"
|
||||
#include "llfloaterpreference.h"
|
||||
#include "llfloaterregiondebugconsole.h"
|
||||
#include "llfloaterregioninfo.h"
|
||||
#include "llfloaterreporter.h"
|
||||
#include "llfloaterscriptdebug.h"
|
||||
#include "llfloaterscriptlimits.h"
|
||||
#include "llfloatersearch.h"
|
||||
#include "llfloatersettingsdebug.h"
|
||||
#include "llfloatersnapshot.h"
|
||||
|
||||
#include "llfloaterenvsettings.h"
|
||||
#include "llfloaterstats.h"
|
||||
#include "llfloaterteleporthistory.h"
|
||||
#include "llfloatertest.h"
|
||||
#include "llfloatertools.h"
|
||||
#include "llfloatervoiceeffect.h"
|
||||
#include "llfloaterwater.h"
|
||||
#include "llfloaterwebcontent.h"
|
||||
#include "llfloaterwindlight.h"
|
||||
#include "llfloaterworldmap.h"
|
||||
#include "llfloatermemleak.h"
|
||||
#include "llframestats.h"
|
||||
#include "llgivemoney.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llgivemoney.h"
|
||||
#include "llgroupmgr.h"
|
||||
#include "llhoverview.h"
|
||||
#include "llhudeffecttrail.h"
|
||||
#include "llhudmanager.h"
|
||||
#include "llimview.h"
|
||||
#include "llinventorybridge.h"
|
||||
#include "llinventorydefines.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llmakeoutfitdialog.h"
|
||||
#include "llmimetypes.h"
|
||||
#include "llmenucommands.h"
|
||||
#include "llmenuoptionpathfindingrebakenavmesh.h"
|
||||
#include "llmoveview.h"
|
||||
#include "llmutelist.h"
|
||||
#include "llnotify.h"
|
||||
#include "llpanellogin.h"
|
||||
#include "llparcel.h"
|
||||
#include "llregioninfomodel.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llstatusbar.h"
|
||||
#include "lltextureview.h"
|
||||
#include "lltoolbar.h"
|
||||
#include "lltoolcomp.h"
|
||||
#include "lltoolgrab.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "lltoolpie.h"
|
||||
#include "lltoolselectland.h"
|
||||
#include "lltrans.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "lluserauth.h"
|
||||
#include "llvelocitybar.h"
|
||||
#include "llviewercamera.h"
|
||||
#include "llviewergenericmessage.h"
|
||||
#include "llviewerjoystick.h"
|
||||
#include "llviewertexturelist.h" // gTextureList
|
||||
#include "llviewermenufile.h" // init_menu_file()
|
||||
#include "llviewermessage.h"
|
||||
#include "llviewernetwork.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
#include "llviewerstats.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "llworld.h"
|
||||
#include "llworldmap.h"
|
||||
#include "pipeline.h"
|
||||
#include "llviewerjoystick.h"
|
||||
#include "llwaterparammanager.h"
|
||||
#include "llwlanimator.h"
|
||||
#include "llwlparammanager.h"
|
||||
#include "llfloatercamera.h"
|
||||
#include "llfloaternotificationsconsole.h"
|
||||
|
||||
// <edit>
|
||||
@@ -179,12 +134,8 @@
|
||||
// </edit>
|
||||
|
||||
#include "scriptcounter.h"
|
||||
#include "llfloaterdisplayname.h"
|
||||
#include "floaterao.h"
|
||||
#include "slfloatermediafilter.h"
|
||||
#include "llviewerobjectbackup.h"
|
||||
#include "llagentui.h"
|
||||
#include "lltoolgrab.h"
|
||||
#include "llpathfindingmanager.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
@@ -194,8 +145,6 @@
|
||||
#include "hippogridmanager.h"
|
||||
#include "wlfPanel_AdvSettings.h"
|
||||
|
||||
void toggle_search_floater();
|
||||
|
||||
using namespace LLOldEvents;
|
||||
using namespace LLAvatarAppearanceDefines;
|
||||
void init_client_menu(LLMenuGL* menu);
|
||||
@@ -858,7 +807,7 @@ void init_client_menu(LLMenuGL* menu)
|
||||
}
|
||||
|
||||
sub->addChild(new LLMenuItemCheckGL("HTTP Console",
|
||||
&AIHTTPView::toggle_visibility,
|
||||
&toggle_visibility,
|
||||
NULL,
|
||||
&get_visibility,
|
||||
(void*)gHttpView,
|
||||
@@ -1529,16 +1478,8 @@ void init_debug_rendering_menu(LLMenuGL* menu)
|
||||
item = new LLMenuItemCheckGL("Audit Texture", menu_toggle_control, NULL, menu_check_control, (void*)"AuditTexture");
|
||||
menu->addChild(item);
|
||||
|
||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||
menu->addSeparator();
|
||||
menu->addChild(new LLMenuItemCallGL("Memory Leaking Simulation", LLFloaterMemLeak::show, NULL, NULL));
|
||||
#else
|
||||
if(gSavedSettings.getBOOL("QAMode"))
|
||||
{
|
||||
menu->addSeparator();
|
||||
menu->addChild(new LLMenuItemCallGL("Memory Leaking Simulation", LLFloaterMemLeak::show, NULL, NULL));
|
||||
}
|
||||
#endif
|
||||
|
||||
menu->createJumpKeys();
|
||||
}
|
||||
@@ -4184,22 +4125,6 @@ class LLViewLookAtLastChatter : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
class LLViewMouselook : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
if (!gAgentCamera.cameraMouselook())
|
||||
{
|
||||
gAgentCamera.changeCameraToMouselook();
|
||||
}
|
||||
else
|
||||
{
|
||||
gAgentCamera.changeCameraToDefault();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class LLViewFullscreen : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -4266,6 +4191,7 @@ void handle_duplicate_in_place(void*)
|
||||
}
|
||||
|
||||
/* dead code 30-apr-2008
|
||||
#include "llviewerstats.h"
|
||||
void handle_deed_object_to_group(void*)
|
||||
{
|
||||
LLUUID group_id;
|
||||
@@ -5624,15 +5550,6 @@ bool enable_object_delete()
|
||||
return new_value;
|
||||
}
|
||||
|
||||
class LLEditSearch : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
toggle_search_floater();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class LLObjectsReturnPackage
|
||||
{
|
||||
public:
|
||||
@@ -5961,55 +5878,17 @@ class LLWorldTeleportHome : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
class LLWorldAlwaysRun : public view_listener_t
|
||||
void toggle_sit()
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
// as well as altering the default walk-vs-run state,
|
||||
// we also change the *current* walk-vs-run state.
|
||||
if (gAgent.getAlwaysRun())
|
||||
{
|
||||
gAgent.clearAlwaysRun();
|
||||
// gAgent.clearRunning();
|
||||
}
|
||||
else
|
||||
{
|
||||
gAgent.setAlwaysRun();
|
||||
// gAgent.setRunning();
|
||||
}
|
||||
|
||||
// tell the simulator.
|
||||
// gAgent.sendWalkRun(gAgent.getAlwaysRun());
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class LLWorldCheckAlwaysRun : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
bool new_value = gAgent.getAlwaysRun();
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
if (!gAgentAvatarp) return;
|
||||
gAgent.setControlFlags(gAgentAvatarp->isSitting() ? AGENT_CONTROL_STAND_UP : AGENT_CONTROL_SIT_ON_GROUND);
|
||||
}
|
||||
|
||||
class LLWorldSitOnGround : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
if (gAgentAvatarp)
|
||||
{
|
||||
if(!gAgentAvatarp->isSitting())
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
|
||||
}
|
||||
else
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
|
||||
}
|
||||
}
|
||||
toggle_sit();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -6404,166 +6283,23 @@ void handle_viewer_disable_message_log(void*)
|
||||
gMessageSystem->stopLogging();
|
||||
}
|
||||
|
||||
void show_outfit_dialog() { new LLMakeOutfitDialog(false); }
|
||||
bool is_visible_view(boost::function<LLView* ()> get)
|
||||
{
|
||||
if (LLView* v = get())
|
||||
return v->getVisible();
|
||||
return false;
|
||||
}
|
||||
struct MenuFloaterDict : public LLSingleton<MenuFloaterDict>
|
||||
{
|
||||
typedef std::map<const std::string, std::pair<boost::function<void ()>, boost::function<bool ()> > > menu_floater_map_t;
|
||||
menu_floater_map_t mEntries;
|
||||
|
||||
struct CommWrapper
|
||||
{
|
||||
static bool only_comm()
|
||||
{
|
||||
static const LLCachedControl<bool> only("CommunicateSpecificShortcut");
|
||||
return only || LLFloaterChatterBox::getInstance()->getFloaterCount();
|
||||
}
|
||||
static bool instanceVisible(const LLSD& key)
|
||||
{
|
||||
return only_comm()
|
||||
? LLFloaterChatterBox::instanceVisible(key)
|
||||
: LLFloaterMyFriends::instanceVisible(key);
|
||||
}
|
||||
static void toggleInstance(const LLSD& key)
|
||||
{
|
||||
if (only_comm())
|
||||
LLFloaterChatterBox::toggleInstance(key);
|
||||
else
|
||||
LLFloaterMyFriends::toggleInstance(key);
|
||||
}
|
||||
};
|
||||
MenuFloaterDict()
|
||||
{
|
||||
registerFloater("about", boost::bind(&LLFloaterAbout::show,(void*)NULL));
|
||||
//registerFloater("about region", boost::bind(&LLFloaterRegionInfo::showInstance,LLSD()));
|
||||
registerFloater("ao", boost::bind(LLFloaterAO::show, (void*)NULL));
|
||||
registerFloater("appearance", boost::bind(LLFloaterCustomize::show));
|
||||
registerFloater("buy currency", boost::bind(&LLFloaterBuyCurrency::buyCurrency));
|
||||
registerFloater("buy land", boost::bind(&LLViewerParcelMgr::startBuyLand, boost::bind(LLViewerParcelMgr::getInstance), false));
|
||||
registerFloater("complaint reporter", boost::bind(LLFloaterReporter::showFromMenu, COMPLAINT_REPORT));
|
||||
registerFloater("debug avatar", boost::bind(handle_debug_avatar_textures, (void*)NULL));
|
||||
registerFloater("debug settings", boost::bind(handle_singleton_toggle<LLFloaterSettingsDebug>, (void*)NULL));
|
||||
registerFloater("displayname", boost::bind(&LLFloaterDisplayName::show));
|
||||
//registerFloater("friends", boost::bind(&LLFloaterMyFriends::toggleInstance,0), boost::bind(&LLFloaterMyFriends::instanceVisible,0));
|
||||
registerFloater("gestures", boost::bind(&LLFloaterGesture::toggleVisibility), boost::bind(&LLFloaterGesture::instanceVisible));
|
||||
registerFloater("grid options", boost::bind(&LLFloaterBuildOptions::show,(void*)NULL));
|
||||
//Singu TODO: Re-implement f1 help.
|
||||
/*else if (floater_name == "help f1")
|
||||
{
|
||||
gViewerHtmlHelp.show();
|
||||
}*/
|
||||
registerFloater("help tutorial",boost::bind(&LLFloaterHUD::showHUD));
|
||||
registerFloater("inspect", boost::bind(LLFloaterInspect::showInstance));
|
||||
registerFloater("inventory", boost::bind(LLInventoryView::toggleVisibility, (void*)NULL), boost::bind(is_visible_view, static_cast<boost::function<LLView* ()> >(LLInventoryView::getActiveInventory)));
|
||||
//registerFloater("lag meter", boost::bind(&LLFloaterLagMeter::showInstance,LLSD()));
|
||||
registerFloater("local assets", boost::bind(FloaterLocalAssetBrowser::show, (void*)0));
|
||||
registerFloater("mean events", boost::bind(LLFloaterBump::show, (void*)NULL));
|
||||
registerFloater("media ticker", boost::bind(handle_ticker_toggle, (void*)NULL), boost::bind(SHFloaterMediaTicker::instanceExists));
|
||||
registerFloater("my land", boost::bind(&LLFloaterLandHoldings::show,(void*)NULL));
|
||||
registerFloater("outfit", boost::bind(show_outfit_dialog));
|
||||
registerFloater("preferences", boost::bind(&LLFloaterPreference::show,(void*)NULL));
|
||||
registerFloater("radar", boost::bind(LLFloaterAvatarList::toggle, (void*)NULL), boost::bind(LLFloaterAvatarList::instanceVisible));
|
||||
registerFloater("script errors",boost::bind(&LLFloaterScriptDebug::show,LLUUID::null));
|
||||
//registerFloater("script info", boost::bind(&LLFloaterScriptLimits::showInstance,LLSD()));
|
||||
registerFloater("search", boost::bind(LLFloaterSearch::showInstance, LLFloaterSearch::SearchQuery(), false));
|
||||
registerFloater("snapshot", boost::bind(LLFloaterSnapshot::show, (void*)NULL));
|
||||
// Phoenix: Wolfspirit: Enabled Show Floater out of viewer menu
|
||||
registerFloater("toolbar", boost::bind(&LLToolBar::toggle,(void*)NULL), boost::bind(&LLToolBar::visible,(void*)NULL));
|
||||
registerFloater("web", boost::bind(LLFloaterWebContent::showInstance, "dict web", LLFloaterWebContent::Params()));
|
||||
registerFloater("world map", boost::bind(&LLFloaterWorldMap::toggle));
|
||||
registerFloater("anims_explorer", boost::bind(LLFloaterExploreAnimations::show));
|
||||
registerFloater("sound_explorer", boost::bind(&LLFloaterExploreSounds::toggle), boost::bind(&LLFloaterExploreSounds::visible));
|
||||
registerFloater("asset_blacklist", boost::bind(&LLFloaterBlacklist::toggle), boost::bind(&LLFloaterBlacklist::visible));
|
||||
registerFloater("DayCycle", boost::bind(LLFloaterDayCycle::show), boost::bind(LLFloaterDayCycle::isOpen));
|
||||
registerFloater("EnvSettings", boost::bind(LLFloaterEnvSettings::show), boost::bind(LLFloaterEnvSettings::isOpen));
|
||||
registerFloater("PostProcess", boost::bind(LLFloaterPostProcess::show));
|
||||
registerFloater("RegionDebugConsole", boost::bind(handle_singleton_toggle<LLFloaterRegionDebugConsole>, (void*)NULL), boost::bind(LLFloaterRegionDebugConsole::instanceExists));
|
||||
registerFloater("WaterSettings", boost::bind(LLFloaterWater::show), boost::bind(LLFloaterWater::isOpen));
|
||||
registerFloater<CommWrapper> ("im");
|
||||
registerFloater<LLFloaterLand> ("about land");
|
||||
registerFloater<LLFloaterRegionInfo> ("about region");
|
||||
registerFloater<LLFloaterActiveSpeakers> ("active speakers");
|
||||
registerFloater<JCFloaterAreaSearch> ("areasearch");
|
||||
registerFloater<LLFloaterBeacons> ("beacons");
|
||||
registerFloater<LLFloaterCamera> ("camera controls");
|
||||
registerFloater<LLFloaterChat> ("chat history");
|
||||
registerFloater<LLFloaterChatterBox> ("communicate");
|
||||
registerFloater<LLFloaterMyFriends> ("friends",0);
|
||||
registerFloater<LLFloaterMyFriends> ("groups",1);
|
||||
registerFloater<LLFloaterLagMeter> ("lag meter");
|
||||
registerFloater<SLFloaterMediaFilter> ("media filter");
|
||||
registerFloater<LLFloaterMap> ("mini map");
|
||||
registerFloater<LLFloaterMove> ("movement controls");
|
||||
registerFloater<LLFloaterMute> ("mute list");
|
||||
registerFloater<LLFloaterOutbox> ("outbox");
|
||||
registerFloater<LLFloaterPerms> ("perm prefs");
|
||||
registerFloater<LLFloaterScriptLimits> ("script info");
|
||||
registerFloater<LLFloaterStats> ("stat bar");
|
||||
registerFloater<LLFloaterTeleportHistory> ("teleport history");
|
||||
registerFloater<LLFloaterVoiceEffect> ("voice effect");
|
||||
registerFloater<LLFloaterPathfindingCharacters> ("pathfinding_characters");
|
||||
registerFloater<LLFloaterPathfindingLinksets> ("pathfinding_linksets");
|
||||
// [RLVa:LF]
|
||||
registerFloater<RlvFloaterBehaviours>("rlv restrictions");
|
||||
registerFloater<RlvFloaterLocks>("rlv locks");
|
||||
registerFloater<RlvFloaterStrings>("rlv strings");
|
||||
// [/RLVa:LF]
|
||||
|
||||
}
|
||||
void registerFloater(const std::string& name, boost::function<void ()> show, boost::function<bool ()> visible = NULL)
|
||||
{
|
||||
mEntries.insert( std::make_pair( name, std::make_pair( show, visible ) ) );
|
||||
}
|
||||
template <typename T>
|
||||
void registerFloater(const std::string& name, const LLSD& key = LLSD())
|
||||
{
|
||||
registerFloater(name, boost::bind(&T::toggleInstance,key), boost::bind(&T::instanceVisible,key));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// TomY TODO: Move!
|
||||
void show_floater(const std::string& floater_name);
|
||||
class LLShowFloater : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
std::string floater_name = userdata.asString();
|
||||
if (floater_name.empty()) return false;
|
||||
MenuFloaterDict::menu_floater_map_t::iterator it = MenuFloaterDict::instance().mEntries.find(floater_name);
|
||||
if(it != MenuFloaterDict::instance().mEntries.end() && it->second.first != NULL)
|
||||
{
|
||||
it->second.first();
|
||||
}
|
||||
else // Simple codeless floater
|
||||
{
|
||||
LLFloater* floater = LLUICtrlFactory::getInstance()->getBuiltFloater(floater_name);
|
||||
if (floater)
|
||||
gFloaterView->bringToFront(floater);
|
||||
else
|
||||
LLUICtrlFactory::getInstance()->buildFloater(new LLFloater(), floater_name);
|
||||
}
|
||||
show_floater(userdata.asString());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
bool floater_visible(const std::string& floater_name);
|
||||
class LLFloaterVisible : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
std::string control_name = userdata["control"].asString();
|
||||
std::string floater_name = userdata["data"].asString();
|
||||
bool new_value = false;
|
||||
MenuFloaterDict::menu_floater_map_t::iterator it = MenuFloaterDict::instance().mEntries.find(floater_name);
|
||||
if(it != MenuFloaterDict::instance().mEntries.end() && it->second.second != NULL)
|
||||
{
|
||||
new_value = it->second.second();
|
||||
}
|
||||
gMenuHolder->findControl(control_name)->setValue(new_value);
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(floater_visible(userdata["data"].asString()));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -8958,15 +8694,6 @@ class LLEditTakeOff : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
class LLWorldChat : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
handle_chat(NULL);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class LLToolsSelectTool : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -9503,7 +9230,6 @@ void initialize_menus()
|
||||
addMenu(new LLEditCopy(), "Edit.Copy");
|
||||
addMenu(new LLEditPaste(), "Edit.Paste");
|
||||
addMenu(new LLEditDelete(), "Edit.Delete");
|
||||
addMenu(new LLEditSearch(), "Edit.Search");
|
||||
addMenu(new LLEditSelectAll(), "Edit.SelectAll");
|
||||
addMenu(new LLEditDeselect(), "Edit.Deselect");
|
||||
addMenu(new LLEditDuplicate(), "Edit.Duplicate");
|
||||
@@ -9523,7 +9249,6 @@ void initialize_menus()
|
||||
addMenu(new LLEditEnableChangeDisplayname(), "Edit.EnableChangeDisplayname");
|
||||
|
||||
// View menu
|
||||
addMenu(new LLViewMouselook(), "View.Mouselook");
|
||||
addMenu(new LLViewJoystickFlycam(), "View.JoystickFlycam");
|
||||
addMenu(new LLViewResetView(), "View.ResetView");
|
||||
addMenu(new LLViewResetPresetAngles(), "View.ResetPresetAngles");
|
||||
@@ -9549,8 +9274,6 @@ void initialize_menus()
|
||||
addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments");
|
||||
|
||||
// World menu
|
||||
addMenu(new LLWorldChat(), "World.Chat");
|
||||
addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun");
|
||||
addMenu(new LLWorldSitOnGround(), "World.SitOnGround");
|
||||
addMenu(new LLWorldEnableSitOnGround(), "World.EnableSitOnGround");
|
||||
addMenu(new LLWorldFly(), "World.Fly");
|
||||
@@ -9566,8 +9289,6 @@ void initialize_menus()
|
||||
addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation");
|
||||
addMenu(new LLWorldEnableTeleportHome(), "World.EnableTeleportHome");
|
||||
addMenu(new LLWorldEnableBuyLand(), "World.EnableBuyLand");
|
||||
|
||||
addMenu(new LLWorldCheckAlwaysRun(), "World.CheckAlwaysRun");
|
||||
(new LLWorldEnvSettings())->registerListener(gMenuHolder, "World.EnvSettings");
|
||||
|
||||
|
||||
|
||||
@@ -299,8 +299,8 @@ void RlvUIEnabler::onToggleShowNames(bool fQuitting)
|
||||
// Close the "Active Speakers" panel if it's currently visible
|
||||
LLFloaterChat::getInstance()->childSetVisible("active_speakers_panel", false);
|
||||
// Close the "Avatar List/Radar" floater if it's currently visible
|
||||
if ( LLFloaterAvatarList::instanceExists() && LLFloaterAvatarList::getInstance()->getVisible() )
|
||||
LLFloaterAvatarList::toggle(NULL);
|
||||
if (LLFloaterAvatarList::instanceVisible())
|
||||
LLFloaterAvatarList::toggleInstance();
|
||||
LLAvatarNameCache::setForceDisplayNames(true);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
mouse_opaque="true" name="separator2" width="153" />
|
||||
<menu_item_call bottom="-159" enabled="true" height="19" label="Search..." left="0"
|
||||
mouse_opaque="true" name="Search..." shortcut="control|F" width="153">
|
||||
<on_click function="Edit.Search" userdata="" />
|
||||
<on_click function="ShowFloater" userdata="search"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator bottom="-167" enabled="true" height="8" label="-----------" left="0"
|
||||
mouse_opaque="true" name="separator3" width="153" />
|
||||
@@ -285,12 +285,12 @@
|
||||
mouse_opaque="true" name="~~~~~~~~~~~" width="211" />
|
||||
<menu_item_call bottom="-29" enabled="true" height="19" label="Mouselook" left="0"
|
||||
mouse_opaque="true" name="Mouselook" shortcut="M" width="211">
|
||||
<on_click function="View.Mouselook" userdata="" />
|
||||
<on_click function="ShowFloater" userdata="mouselook"/>
|
||||
<on_enable function="View.EnableMouselook" />
|
||||
</menu_item_call>
|
||||
<menu_item_check bottom="-48" enabled="true" height="19" label="Build" left="0"
|
||||
mouse_opaque="true" name="Build" shortcut="B" width="211">
|
||||
<on_click function="View.BuildMode" userdata="" />
|
||||
<on_click function="ShowFloater" userdata="build" />
|
||||
<on_check function="View.CheckBuildMode" />
|
||||
</menu_item_check>
|
||||
<menu_item_check bottom="-48" enabled="true" height="19" label="Joystick Flycam" left="0"
|
||||
@@ -495,12 +495,12 @@
|
||||
opaque="true" tear_off="true" width="185">
|
||||
<menu_item_call bottom="-29" enabled="true" height="19" label="Chat" left="0"
|
||||
mouse_opaque="true" name="Chat" shortcut="" width="185">
|
||||
<on_click function="World.Chat" userdata="" />
|
||||
<on_click function="FloaterShow" userdata="chatbar" />
|
||||
</menu_item_call>
|
||||
<menu_item_check bottom="-67" enabled="true" height="19" label="Always Run" left="0"
|
||||
mouse_opaque="true" name="Always Run" shortcut="control|R" width="185">
|
||||
<on_click function="World.AlwaysRun" userdata="" />
|
||||
<on_check function="World.CheckAlwaysRun" userdata="" />
|
||||
<on_click function="ShowFloater" userdata="always run" />
|
||||
<on_check function="FloaterVisible" userdata="always run" />
|
||||
</menu_item_check>
|
||||
<menu_item_call bottom="-67" enabled="true" height="19" label="Sit on Ground" left="0"
|
||||
mouse_opaque="true" name="Sit on Ground" shortcut="control|alt|S" width="185">
|
||||
@@ -509,7 +509,7 @@
|
||||
</menu_item_call>
|
||||
<menu_item_check bottom="-86" enabled="true" height="19" label="Fly" left="0"
|
||||
mouse_opaque="true" name="Fly" shortcut="Home" width="185">
|
||||
<on_click function="World.Fly" userdata="" />
|
||||
<on_click function="ShowFloater" userdata="fly"/>
|
||||
<on_enable function="World.EnableFly" />
|
||||
<on_check control="FlyBtnState" />
|
||||
</menu_item_check>
|
||||
@@ -917,8 +917,7 @@
|
||||
<on_click function="PromptShowURL" name="ScriptingPortal_url"
|
||||
userdata="WebLaunchLSLWiki,http://wiki.secondlife.com/wiki/LSL_Portal" />
|
||||
</menu_item_call>
|
||||
<menu_item_separator bottom="-148" enabled="true" height="8" label="-----------" left="0"
|
||||
mouse_opaque="true" name="separator3" width="166" />
|
||||
<menu_item_separator name="separator3"/>
|
||||
<menu_item_call bottom="-194" enabled="true" height="19" label="Report Abuse..." left="0"
|
||||
mouse_opaque="true" name="Report Abuse..." width="166">
|
||||
<on_click function="ShowFloater" userdata="complaint reporter" />
|
||||
@@ -931,8 +930,7 @@
|
||||
<menu_item_call label="Lag Meter" name="Lag Meter">
|
||||
<on_click function="ShowFloater" userdata="lag meter" />
|
||||
</menu_item_call>
|
||||
<menu_item_separator bottom="-411" enabled="true" height="8" label="-----------" left="0"
|
||||
mouse_opaque="true" name="separator7" width="250" />
|
||||
<menu_item_separator name="separator7"/>
|
||||
<menu bottom="-554" create_jump_keys="true" drop_shadow="true" enabled="true"
|
||||
height="109" label="Bug Reporting" left="0" mouse_opaque="false"
|
||||
name="Bug Reporting" opaque="true" tear_off="true" width="118">
|
||||
@@ -951,8 +949,7 @@
|
||||
<on_click function="PromptShowURL" name="SinguIssueTracker_url"
|
||||
userdata="WebLaunchSinguIssue,http://links.singularityviewer.org/?to=issues" />
|
||||
</menu_item_call>
|
||||
<menu_item_separator bottom="-411" enabled="true" height="8" label="-----------" left="0"
|
||||
mouse_opaque="true" name="separator7" width="250" />
|
||||
<menu_item_separator name="separator7" />
|
||||
<menu_item_call bottom="-94" enabled="true" height="19" label="Bug Reporting 101..." left="0"
|
||||
mouse_opaque="true" name="Bug Reporting 101..." width="166">
|
||||
<on_click function="PromptShowURL" name="BugReporting101_url"
|
||||
@@ -968,8 +965,7 @@
|
||||
<on_click function="PromptShowURL" name="QAWiki_url"
|
||||
userdata="WebLaunchQAWiki,http://wiki.secondlife.com/wiki/QA_Portal" />
|
||||
</menu_item_call>
|
||||
<menu_item_separator bottom="-411" enabled="true" height="8" label="-----------" left="0"
|
||||
mouse_opaque="true" name="separator9" width="250" />
|
||||
<menu_item_separator name="separator9"/>
|
||||
<menu_item_call bottom="-240" enabled="true" height="19" label="Report Bug..." left="0"
|
||||
mouse_opaque="true" name="Report Bug..." width="166">
|
||||
<on_click function="PromptShowURL" name="ReportBug_url"
|
||||
|
||||
@@ -9,40 +9,58 @@
|
||||
<icon image_name="spacer24.tga" width="2" height="2" follows="left|right" color="0,0,0,0" left="0" />
|
||||
</layout_panel>
|
||||
<layout_panel name="panel2" height="24" width="50" auto_resize="false" user_resize="false">
|
||||
<button bottom="0" height="24" image_selected="btn_chatbar_selected.tga" scale_image="true" image_unselected="btn_chatbar.tga" label="" left="2" name="chat_btn" image_overlay="icn_chatbar.tga" tool_tip="Show Chat Bar. (Enter)" width="50" follows="left|right" />
|
||||
</layout_panel>
|
||||
<layout_panel name="panel3" height="2" width="2" auto_resize="false" user_resize="false">
|
||||
<icon image_name="spacer24.tga" width="2" height="2" follows="left|right" color="0,0,0,0"/>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel4" height="24" width="50" user_resize="false">
|
||||
<flyout_button bottom="0" font="SansSerif" height="24" label="Communicate" left="0" name="communicate_btn" tool_tip="Communicate with your Friends and Groups.(Ctrl-T)" list_position="above" width="50" follows="left|right"/>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel5" height="2" width="2" auto_resize="false" user_resize="false">
|
||||
<icon image_name="spacer24.tga" width="2" height="2" follows="left|right" auto_resize="false" color="0,0,0,0"/>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel6" height="24" width="50" user_resize="false">
|
||||
<button bottom="0" height="24" label="Radar" image_overlay="icn_toolbar_radar.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" label_selected="Radar" name="radar_list_btn" tool_tip="View a list of nearby avatars.(Ctrl-Shift-A)" width="50" follows="left|right"/>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel7" height="24" width="50" user_resize="false">
|
||||
<button bottom="0" height="24" label="Fly" image_overlay="icn_toolbar_fly.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" label_selected="Stop Flying" name="fly_btn" tool_tip="Start flying(F or Home). Use E/C or PgUp/PgDn to fly up and down." width="50" follows="left|right"/>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel8" height="24" width="50" user_resize="false">
|
||||
<button bottom="0" height="24" label="Snapshot" image_overlay="icn_toolbar_snapshot.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" name="snapshot_btn" tool_tip="Save a screen shot to disk or inventory.(Ctrl-Shift-S for floater, Ctrl-`(~) takes snapshot w/o floater)" width="50" follows="left|right"/>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel9" height="24" width="50" user_resize="false">
|
||||
<button bottom="0" height="24" label="Search" image_overlay="icn_toolbar_search.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" name="directory_btn" tool_tip="Search for places, events, people, and more.(Ctrl-F)" width="50" follows="left|right"/>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel10" height="24" width="50" user_resize="false">
|
||||
<button bottom="0" height="24" label="Build" name="build_btn" image_overlay="icn_toolbar_build.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" tool_tip="Create new objects. (B)" width="50" follows="left|right"/>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel11" height="24" width="50" user_resize="false">
|
||||
<button bottom="0" height="24" label="Map" name="map_btn" image_overlay="icn_toolbar_map.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" tool_tip="Map of the world. (Ctrl-M)" width="50" follows="left|right"/>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel12" height="24" width="50" user_resize="false">
|
||||
<button bottom="0" height="24" label="Mini-Map" image_overlay="icn_toolbar_minimap.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" name="radar_btn" tool_tip="Map of the area around you. (Ctrl-Shift-M)" width="50" follows="left|right"/>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel13" height="24" width="50" user_resize="false">
|
||||
<button bottom="0" height="24" label="Inventory" image_overlay="icn_toolbar_inventory.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" name="inventory_btn" tool_tip="Your items. (Ctrl-I)" width="50" follows="left|right"/>
|
||||
</layout_panel>
|
||||
<button bottom="0" height="24" image_selected="btn_chatbar_selected.tga" scale_image="true" image_unselected="btn_chatbar.tga" label="" left="2" name="chat_btn" image_overlay="icn_chatbar.tga" tool_tip="Show Chat Bar. (Enter)" width="50" follows="left|right" control_name="ChatVisible">
|
||||
<button.commit_callback function="ShowFloater" parameter="chatbar"/>
|
||||
</button>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel3" height="2" width="2" auto_resize="false" user_resize="false">
|
||||
<icon image_name="spacer24.tga" width="2" height="2" follows="left|right" color="0,0,0,0"/>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel4" height="24" width="50" user_resize="false">
|
||||
<flyout_button bottom="0" font="SansSerif" height="24" label="Communicate" left="0" name="communicate_btn" tool_tip="Communicate with your Friends and Groups.(Ctrl-T)" list_position="above" width="50" follows="left|right"/>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel5" height="2" width="2" auto_resize="false" user_resize="false">
|
||||
<icon image_name="spacer24.tga" width="2" height="2" follows="left|right" auto_resize="false" color="0,0,0,0"/>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel6" height="24" width="50" user_resize="false">
|
||||
<button bottom="0" height="24" label="Radar" image_overlay="icn_toolbar_radar.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" label_selected="Radar" name="radar_list_btn" tool_tip="View a list of nearby avatars.(Ctrl-Shift-A)" width="50" follows="left|right" control_name="ShowRadar">
|
||||
<button.commit_callback function="ShowFloater" parameter="radar"/>
|
||||
</button>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel7" height="24" width="50" user_resize="false">
|
||||
<button bottom="0" height="24" label="Fly" image_overlay="icn_toolbar_fly.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" label_selected="Stop Flying" name="fly_btn" tool_tip="Start flying(F or Home). Use E/C or PgUp/PgDn to fly up and down." width="50" follows="left|right" control_name="FlyBtnState">
|
||||
<button.commit_callback function="ShowFloater" parameter="fly"/>
|
||||
</button>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel8" height="24" width="50" user_resize="false">
|
||||
<button bottom="0" height="24" label="Snapshot" image_overlay="icn_toolbar_snapshot.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" name="snapshot_btn" tool_tip="Save a screen shot to disk or inventory.(Ctrl-Shift-S for floater, Ctrl-`(~) takes snapshot w/o floater)" width="50" follows="left|right" control_name="SnapshotBtnState">
|
||||
<button.commit_callback function="ShowFloater" parameter="snapshot"/>
|
||||
</button>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel9" height="24" width="50" user_resize="false">
|
||||
<button bottom="0" height="24" label="Search" image_overlay="icn_toolbar_search.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" name="directory_btn" tool_tip="Search for places, events, people, and more.(Ctrl-F)" width="50" follows="left|right" control_name="ShowDirectory">
|
||||
<button.commit_callback function="ShowFloater" parameter="search"/>
|
||||
</button>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel10" height="24" width="50" user_resize="false">
|
||||
<button bottom="0" height="24" label="Build" name="build_btn" image_overlay="icn_toolbar_build.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" tool_tip="Create new objects. (B)" width="50" follows="left|right" control_name="BuildBtnState">
|
||||
<button.commit_callback function="ShowFloater" parameter="build"/>
|
||||
</button>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel11" height="24" width="50" user_resize="false">
|
||||
<button bottom="0" height="24" label="Map" name="map_btn" image_overlay="icn_toolbar_map.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" tool_tip="Map of the world. (Ctrl-M)" width="50" follows="left|right" control_name="ShowWorldMap">
|
||||
<button.commit_callback function="ShowFloater" parameter="world map"/>
|
||||
</button>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel12" height="24" width="50" user_resize="false">
|
||||
<button bottom="0" height="24" label="Mini-Map" image_overlay="icn_toolbar_minimap.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" name="radar_btn" tool_tip="Map of the area around you. (Ctrl-Shift-M)" width="50" follows="left|right" control_name="ShowMiniMap">
|
||||
<button.commit_callback function="ShowFloater" parameter="mini map"/>
|
||||
</button>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel13" height="24" width="50" user_resize="false">
|
||||
<button bottom="0" height="24" label="Inventory" image_overlay="icn_toolbar_inventory.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" name="inventory_btn" tool_tip="Your items. (Ctrl-I)" width="50" follows="left|right" control_name="ShowInventory">
|
||||
<button.commit_callback function="ShowFloater" parameter="inventory"/>
|
||||
</button>
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
</panel>
|
||||
|
||||
Reference in New Issue
Block a user