Windlight and graphic control attachment to the bottom right is finally in.
Added Windlight Water options to it. Known issue where it starts in collapsed mode when it should be expanded, or visa versa. While working on the overlay bar, the IM counter got mixed in a bit so that may start working soon. Rolled back some changes made in an attempt to clean up the vertical IM tabs. Signed-off-by: Beeks <HgDelirium@gmail.com>
This commit is contained in:
@@ -64,6 +64,8 @@ include_directories(
|
||||
)
|
||||
|
||||
set(viewer_SOURCE_FILES
|
||||
ascentprefssys.cpp
|
||||
ascentprefsvan.cpp
|
||||
ascentuploadbrowser.cpp
|
||||
dhparam.cpp
|
||||
dsaparam.cpp
|
||||
@@ -335,8 +337,6 @@ set(viewer_SOURCE_FILES
|
||||
llpolymesh.cpp
|
||||
llpolymorph.cpp
|
||||
llprefschat.cpp
|
||||
ascentprefssys.cpp
|
||||
ascentprefsvan.cpp
|
||||
llprefsim.cpp
|
||||
llprefsvoice.cpp
|
||||
llpreviewanim.cpp
|
||||
@@ -490,6 +490,7 @@ set(viewer_SOURCE_FILES
|
||||
noise.cpp
|
||||
pipeline.cpp
|
||||
scriptcounter.cpp
|
||||
wlfPanel_AdvSettings.cpp
|
||||
)
|
||||
|
||||
# This gets renamed in the packaging step
|
||||
@@ -513,6 +514,8 @@ endif (LINUX)
|
||||
set(viewer_HEADER_FILES
|
||||
CMakeLists.txt
|
||||
ViewerInstall.cmake
|
||||
ascentprefssys.h
|
||||
ascentprefsvan.h
|
||||
ascentuploadbrowser.h
|
||||
emerald.h
|
||||
emeraldboobutils.h
|
||||
@@ -784,8 +787,6 @@ set(viewer_HEADER_FILES
|
||||
llpolymesh.h
|
||||
llpolymorph.h
|
||||
llprefschat.h
|
||||
ascentprefssys.h
|
||||
ascentprefsvan.h
|
||||
llprefsim.h
|
||||
llprefsvoice.h
|
||||
llpreview.h
|
||||
@@ -947,6 +948,7 @@ set(viewer_HEADER_FILES
|
||||
scriptcounter.h
|
||||
VertexCache.h
|
||||
VorbisFramework.h
|
||||
wlfPanel_AdvSettings.h
|
||||
)
|
||||
|
||||
source_group("CMake Rules" FILES ViewerInstall.cmake)
|
||||
|
||||
@@ -12,6 +12,17 @@
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>AscentDisableMinZoomDist</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Allows much closer camera zooming.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>AscentFlyAlwaysEnabled</key>
|
||||
<map>
|
||||
@@ -431,6 +442,17 @@
|
||||
<key>Value</key>
|
||||
<real>0.1</real>
|
||||
</map>
|
||||
<key>wlfAdvSettingsPopup</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show Windlight popup</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>WoLfVerticalIMTabs</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -4392,7 +4414,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>EnergyFromTop</key>
|
||||
<map>
|
||||
|
||||
@@ -98,18 +98,16 @@ LLPrefsAscentSysImpl::LLPrefsAscentSysImpl()
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_system.xml");
|
||||
childSetCommitCallback("speed_rez_check", onCommitCheckBox, this);
|
||||
|
||||
childSetCommitCallback("show_look_at_check", onCommitCheckBox, this);
|
||||
refresh();
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPrefsAscentSysImpl::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
LLPrefsAscentSysImpl* self = (LLPrefsAscentSysImpl*)user_data;
|
||||
|
||||
self->childEnable("fetch_inventory_on_login_check");
|
||||
LLPrefsAscentSysImpl* self = (LLPrefsAscentSysImpl*)user_data;
|
||||
|
||||
llinfos << "Change to " << ctrl->getControlName() << llendl;
|
||||
llinfos << "Change to " << ctrl->getControlName() << " aka " << ctrl->getName() << llendl;
|
||||
|
||||
if (ctrl->getControlName() == "SpeedRez")
|
||||
{
|
||||
@@ -124,7 +122,7 @@ void LLPrefsAscentSysImpl::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
|
||||
self->childDisable("speed_rez_seconds");
|
||||
}
|
||||
}
|
||||
else if (ctrl->getControlName() == "ShowLookAt")
|
||||
else if (ctrl->getName() == "show_look_at_check")
|
||||
{
|
||||
LLHUDEffectLookAt::sDebugLookAt = self->childGetValue("show_look_at_check").asBoolean();
|
||||
}
|
||||
|
||||
@@ -94,18 +94,16 @@ LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed) :
|
||||
{
|
||||
mAutoResize = FALSE;
|
||||
|
||||
std::string chatterbox_layout;
|
||||
if(gSavedSettings.getBOOL("WoLfVerticalIMTabs"))
|
||||
|
||||
if(!gSavedSettings.getBOOL("WoLfVerticalIMTabs"))
|
||||
{
|
||||
chatterbox_layout = "floater_chatterbox_wolf.xml";
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_chatterbox.xml", NULL, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
chatterbox_layout = "floater_chatterbox.xml";
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_chatterbox_wolf.xml", NULL, FALSE);
|
||||
}
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, chatterbox_layout, NULL, FALSE);
|
||||
/*childHide("chatterbox_tabs_horiz");
|
||||
childShow("chatterbox_tabs_vert");*/
|
||||
|
||||
if (gSavedSettings.getBOOL("ContactsTornOff"))
|
||||
{
|
||||
LLFloaterMyFriends* floater_contacts = LLFloaterMyFriends::getInstance(0);
|
||||
|
||||
@@ -114,6 +114,7 @@ private:
|
||||
|
||||
protected:
|
||||
LLFloater* mActiveVoiceFloater;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -158,8 +159,6 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
LLTabContainer* mTabs;
|
||||
};
|
||||
|
||||
|
||||
@@ -521,7 +521,8 @@ void LLIMMgr::toggle(void*)
|
||||
|
||||
LLIMMgr::LLIMMgr() :
|
||||
mFriendObserver(NULL),
|
||||
mIMReceived(FALSE)
|
||||
mIMReceived(FALSE),
|
||||
mIMUnreadCount(0)
|
||||
{
|
||||
mFriendObserver = new LLIMViewFriendObserver(this);
|
||||
LLAvatarTracker::instance().addObserver(mFriendObserver);
|
||||
@@ -665,6 +666,7 @@ void LLIMMgr::addMessage(
|
||||
|
||||
//notify of a new IM
|
||||
notifyNewIM();
|
||||
mIMUnreadCount++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -708,6 +710,7 @@ void LLIMMgr::notifyNewIM()
|
||||
void LLIMMgr::clearNewIMNotification()
|
||||
{
|
||||
mIMReceived = FALSE;
|
||||
mIMUnreadCount = 0;
|
||||
}
|
||||
|
||||
BOOL LLIMMgr::getIMReceived() const
|
||||
@@ -715,6 +718,11 @@ BOOL LLIMMgr::getIMReceived() const
|
||||
return mIMReceived;
|
||||
}
|
||||
|
||||
int LLIMMgr::getIMUnreadCount()
|
||||
{
|
||||
return mIMUnreadCount;
|
||||
}
|
||||
|
||||
// This method returns TRUE if the local viewer has a session
|
||||
// currently open keyed to the uuid.
|
||||
BOOL LLIMMgr::isIMSessionOpen(const LLUUID& uuid)
|
||||
|
||||
@@ -133,6 +133,7 @@ public:
|
||||
|
||||
// IM received that you haven't seen yet
|
||||
BOOL getIMReceived() const;
|
||||
int getIMUnreadCount();
|
||||
|
||||
void setFloaterOpen(BOOL open); /*Flawfinder: ignore*/
|
||||
BOOL getFloaterOpen();
|
||||
@@ -206,6 +207,7 @@ private:
|
||||
|
||||
// An IM has been received that you haven't seen yet.
|
||||
BOOL mIMReceived;
|
||||
int mIMUnreadCount;
|
||||
|
||||
LLSD mPendingInvitations;
|
||||
LLSD mPendingAgentListUpdates;
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "lloverlaybar.h"
|
||||
|
||||
#include "llaudioengine.h"
|
||||
#include "importtracker.h"
|
||||
#include "llrender.h"
|
||||
#include "llagent.h"
|
||||
#include "llbutton.h"
|
||||
@@ -58,12 +59,14 @@
|
||||
#include "llviewerparcelmedia.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llvoiceclient.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llvoiceremotectrl.h"
|
||||
#include "llmediactrl.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "wlfPanel_AdvSettings.h" //Lower right Windlight and Rendering options
|
||||
|
||||
//
|
||||
// Globals
|
||||
@@ -72,6 +75,10 @@
|
||||
LLOverlayBar *gOverlayBar = NULL;
|
||||
|
||||
extern S32 MENU_BAR_HEIGHT;
|
||||
extern ImportTracker gImportTracker;
|
||||
|
||||
BOOL LLOverlayBar::sAdvSettingsPopup;
|
||||
BOOL LLOverlayBar::sChatVisible;
|
||||
|
||||
//
|
||||
// Functions
|
||||
@@ -93,6 +100,13 @@ void* LLOverlayBar::createVoiceRemote(void* userdata)
|
||||
return self->mVoiceRemote;
|
||||
}
|
||||
|
||||
void* LLOverlayBar::createAdvSettings(void* userdata)
|
||||
{
|
||||
LLOverlayBar *self = (LLOverlayBar*)userdata;
|
||||
self->mAdvSettings = new wlfPanel_AdvSettings();
|
||||
return self->mAdvSettings;
|
||||
}
|
||||
|
||||
void* LLOverlayBar::createChatBar(void* userdata)
|
||||
{
|
||||
gChatBar = new LLChatBar();
|
||||
@@ -103,7 +117,9 @@ LLOverlayBar::LLOverlayBar()
|
||||
: LLPanel(),
|
||||
mMediaRemote(NULL),
|
||||
mVoiceRemote(NULL),
|
||||
mMusicState(STOPPED)
|
||||
mAdvSettings(NULL),
|
||||
mMusicState(STOPPED),
|
||||
mOriginalIMLabel("")
|
||||
{
|
||||
setMouseOpaque(FALSE);
|
||||
setIsChrome(TRUE);
|
||||
@@ -113,27 +129,57 @@ LLOverlayBar::LLOverlayBar()
|
||||
LLCallbackMap::map_t factory_map;
|
||||
factory_map["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this);
|
||||
factory_map["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this);
|
||||
factory_map["Adv_Settings"] = LLCallbackMap(LLOverlayBar::createAdvSettings, this);
|
||||
factory_map["chat_bar"] = LLCallbackMap(LLOverlayBar::createChatBar, this);
|
||||
|
||||
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml", &factory_map);
|
||||
}
|
||||
|
||||
bool updateAdvSettingsPopup(const LLSD &data)
|
||||
{
|
||||
LLOverlayBar::sAdvSettingsPopup = gSavedSettings.getBOOL("wlfAdvSettingsPopup");
|
||||
gOverlayBar->childSetVisible("AdvSettings_container", !LLOverlayBar::sAdvSettingsPopup);
|
||||
gOverlayBar->childSetVisible("AdvSettings_container_exp", LLOverlayBar::sAdvSettingsPopup);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool updateChatVisible(const LLSD &data)
|
||||
{
|
||||
LLOverlayBar::sChatVisible = data.asBoolean();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
BOOL LLOverlayBar::postBuild()
|
||||
{
|
||||
childSetAction("IM Received",onClickIMReceived,this);
|
||||
childSetAction("Set Not Busy",onClickSetNotBusy,this);
|
||||
childSetAction("Mouselook",onClickMouselook,this);
|
||||
childSetAction("Stand Up",onClickStandUp,this);
|
||||
//childSetAction("Cancel TP",onClickCancelTP,this);
|
||||
childSetAction("Flycam",onClickFlycam,this);
|
||||
childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible"));
|
||||
|
||||
//mCancelBtn = getChild<LLButton>("Cancel TP");
|
||||
setFocusRoot(TRUE);
|
||||
mBuilt = true;
|
||||
|
||||
mOriginalIMLabel = getChild<LLButton>("IM Received")->getLabelSelected();
|
||||
|
||||
layoutButtons();
|
||||
|
||||
sAdvSettingsPopup = gSavedSettings.getBOOL("wlfAdvSettingsPopup");
|
||||
sChatVisible = gSavedSettings.getBOOL("ChatVisible");
|
||||
|
||||
gSavedSettings.getControl("wlfAdvSettingsPopup")->getSignal()->connect(&updateAdvSettingsPopup);
|
||||
gSavedSettings.getControl("ChatVisible")->getSignal()->connect(&updateChatVisible);
|
||||
childSetVisible("AdvSettings_container", !sAdvSettingsPopup);
|
||||
childSetVisible("AdvSettings_container_exp", sAdvSettingsPopup);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
LLOverlayBar::~LLOverlayBar()
|
||||
{
|
||||
// LLView destructor cleans up children
|
||||
@@ -193,9 +239,25 @@ void LLOverlayBar::refresh()
|
||||
BOOL buttons_changed = FALSE;
|
||||
|
||||
BOOL im_received = gIMMgr->getIMReceived();
|
||||
int unread_count = gIMMgr->getIMUnreadCount();
|
||||
LLButton* button = getChild<LLButton>("IM Received");
|
||||
if (button && button->getVisible() != im_received)
|
||||
|
||||
if ((button && button->getVisible() != im_received) ||
|
||||
(button && button->getVisible()))
|
||||
{
|
||||
if (unread_count > 0)
|
||||
{
|
||||
if (unread_count > 1)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << unread_count << " " << getString("unread_count_string_plural");
|
||||
button->setLabel(ss.str());
|
||||
}
|
||||
else
|
||||
{
|
||||
button->setLabel("1 " + mOriginalIMLabel);
|
||||
}
|
||||
}
|
||||
button->setVisible(im_received);
|
||||
sendChildToFront(button);
|
||||
moveChildToBackOfTabGroup(button);
|
||||
@@ -253,21 +315,36 @@ void LLOverlayBar::refresh()
|
||||
|
||||
moveChildToBackOfTabGroup(mMediaRemote);
|
||||
moveChildToBackOfTabGroup(mVoiceRemote);
|
||||
moveChildToBackOfTabGroup(mAdvSettings);
|
||||
|
||||
// turn off the whole bar in mouselook
|
||||
if (gAgent.cameraMouselook())
|
||||
static BOOL last_mouselook = FALSE;
|
||||
|
||||
BOOL in_mouselook = gAgent.cameraMouselook();
|
||||
|
||||
if(last_mouselook != in_mouselook)
|
||||
{
|
||||
childSetVisible("media_remote_container", FALSE);
|
||||
childSetVisible("voice_remote_container", FALSE);
|
||||
childSetVisible("state_buttons", FALSE);
|
||||
last_mouselook = in_mouselook;
|
||||
if (in_mouselook)
|
||||
{
|
||||
childSetVisible("media_remote_container", FALSE);
|
||||
childSetVisible("voice_remote_container", FALSE);
|
||||
childSetVisible("AdvSettings_container", FALSE);
|
||||
childSetVisible("AdvSettings_container_exp", FALSE);
|
||||
childSetVisible("state_buttons", FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
// update "remotes"
|
||||
childSetVisible("media_remote_container", TRUE);
|
||||
//childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled());
|
||||
childSetVisible("AdvSettings_container", !sAdvSettingsPopup);//!gSavedSettings.getBOOL("wlfAdvSettingsPopup"));
|
||||
childSetVisible("AdvSettings_container_exp", sAdvSettingsPopup);//gSavedSettings.getBOOL("wlfAdvSettingsPopup"));
|
||||
childSetVisible("state_buttons", TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// update "remotes"
|
||||
childSetVisible("media_remote_container", TRUE);
|
||||
if(!in_mouselook)
|
||||
childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled());
|
||||
childSetVisible("state_buttons", TRUE);
|
||||
}
|
||||
|
||||
// always let user toggle into and out of chatbar
|
||||
childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible"));
|
||||
|
||||
@@ -50,6 +50,7 @@ class LLFrameTimer;
|
||||
class LLStatGraph;
|
||||
class LLSlider;
|
||||
class LLVoiceRemoteCtrl;
|
||||
class wlfPanel_AdvSettings;
|
||||
|
||||
class LLOverlayBar
|
||||
: public LLPanel
|
||||
@@ -71,6 +72,8 @@ public:
|
||||
static void onClickSetNotBusy(void* data);
|
||||
static void onClickMouselook(void* data);
|
||||
static void onClickStandUp(void* data);
|
||||
static void onClickCancelTP(void* data);
|
||||
static void onClickCancelImport(void* data);
|
||||
static void onClickResetView(void* data);
|
||||
static void onClickFlycam(void* data);
|
||||
|
||||
@@ -83,9 +86,15 @@ public:
|
||||
|
||||
static void toggleAudioVolumeFloater(void*);
|
||||
|
||||
void setCancelTPButtonVisible(BOOL b, const std::string& label);
|
||||
|
||||
static BOOL sAdvSettingsPopup;
|
||||
static BOOL sChatVisible;
|
||||
|
||||
protected:
|
||||
static void* createMediaRemote(void* userdata);
|
||||
static void* createVoiceRemote(void* userdata);
|
||||
static void* createAdvSettings(void* userdata);
|
||||
static void* createChatBar(void* userdata);
|
||||
|
||||
void enableMediaButtons();
|
||||
@@ -93,9 +102,20 @@ protected:
|
||||
protected:
|
||||
LLMediaRemoteCtrl* mMediaRemote;
|
||||
LLVoiceRemoteCtrl* mVoiceRemote;
|
||||
LLButton* mCancelBtn;
|
||||
wlfPanel_AdvSettings* mAdvSettings;
|
||||
bool mBuilt; // dialog constructed yet?
|
||||
enum { STOPPED=0, PLAYING=1, PAUSED=2 };
|
||||
S32 mMusicState;
|
||||
std::string mOriginalIMLabel;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
/*static bool updateAdvSettingsPopup(const LLSD &data);
|
||||
static void updateChatVisible(const LLSD &data);*/
|
||||
|
||||
};
|
||||
|
||||
extern LLOverlayBar* gOverlayBar;
|
||||
|
||||
@@ -197,6 +197,7 @@
|
||||
#include "llpanellogin.h"
|
||||
//#include "llfloateravatars.h"
|
||||
//#include "llactivation.h"
|
||||
#include "wlfPanel_AdvSettings.h" //Lower right Windlight and Rendering options
|
||||
#include "llao.h"
|
||||
#include "llfloaterblacklist.h"
|
||||
#include "scriptcounter.h"
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<multi_floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
|
||||
height="390" name="floater_chatterbox"
|
||||
rect_control="ChatterboxRect" title="Communicate" width="392">
|
||||
<icon enabled="false" image_name="tabarea.tga"
|
||||
bg_alpha_color="blue" color="DefaultShadowLight" border="false"
|
||||
bottom="-388" follows="left|right|bottom" height="17" left="1" scale_image="true"
|
||||
mouse_opaque="false" name="chatterbox_tab_container" width="391"></icon>
|
||||
height="390" name="floater_chatterbox"
|
||||
rect_control="ChatterboxRect" title="Communicate" width="392">
|
||||
<icon enabled="false" image_name="tabarea.tga"
|
||||
bg_alpha_color="blue" color="DefaultShadowLight" border="false"
|
||||
bottom="-388" follows="left|right|bottom" height="17" left="1" scale_image="true"
|
||||
mouse_opaque="false" name="chatterbox_tab_container" width="391"></icon>
|
||||
<tab_container bottom="2" follows="left|right|top|bottom" height="370" left="0"
|
||||
name="chatterbox_tabs" tab_position="bottom" tab_width="80" width="395" />
|
||||
name="chatterbox_tabs_horiz" tab_position="bottom" tab_width="80" width="395" />
|
||||
<!--<tab_container bottom="2" follows="left|right|top|bottom" height="370" left="0"
|
||||
name="chatterbox_tabs_vert" tab_position="left" tab_width="110" width="395" />-->
|
||||
</multi_floater>
|
||||
|
||||
|
||||
@@ -185,6 +185,7 @@
|
||||
follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
|
||||
label="Enable speed-rezzing via draw distance stepping" left="10"
|
||||
mouse_opaque="true" name="speed_rez_check" radio_style="false"
|
||||
tool_tip="When active, this will progressively increase your draw distance, which allows closer objects/people to rez first."
|
||||
width="400" />
|
||||
<spinner bottom_delta="-20" control_name="SpeedRezInterval" enabled="true" decimal_digits="0"
|
||||
follows="left|top" font="SansSerifSmall" height="16" left="30" width="230"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<panel bg_visible="false" border="false" border_visible="false" bottom="0"
|
||||
enabled="true" follows="left|bottom" height="20" left="0"
|
||||
name="Adv_Settings" use_bounding_rect="true" width="30" >
|
||||
<panel bottom="1" filename="panel_bg_tab.xml" height="22" left="0" width="30" />
|
||||
<button bottom="0" height="22" label=""
|
||||
left="5" name="expand" scale_image="true" toggle="true"
|
||||
tool_tip="Show the Settings Panel" width="22" />
|
||||
</panel>
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<panel bg_visible="false" border="false" border_visible="false" bottom="1"
|
||||
follows="left|bottom" height="198" left="0" name="Adv_Settings"
|
||||
use_bounding_rect="true" width="220" >
|
||||
<panel bottom="0" filename="panel_bg_tab.xml" height="198" left="0" width="205" />
|
||||
<slider bottom="175" left="10" control_name="RenderFarClip"
|
||||
decimal_digits="0" enabled="true" follows="left|bottom" height="20"
|
||||
increment="8" label="Draw Dist.:" can_edit_text="true"
|
||||
label_width="55" max_val="1024" min_val="24" mouse_opaque="true"
|
||||
name="DrawDistance" show_text="true" width="195" tool_tip="Change your Draw Distance"/>
|
||||
<slider bottom_delta="-20" left_delta="-0" control_name="ThrottleBandwidthKBPS"
|
||||
decimal_digits="0" enabled="true" follows="left|bottom" height="20"
|
||||
increment="50" label="Bandwidth:" can_edit_text="true"
|
||||
label_width="60" max_val="5000" min_val="50" mouse_opaque="true"
|
||||
name="max_bandwidth" show_text="true" width="195" tool_tip="Set your Network bandwidth in kbps (kilobits per second)"/>
|
||||
<slider bottom_delta="-20" left_delta="-0" control_name="RenderMaxPartCount"
|
||||
decimal_digits="0" enabled="true" follows="left|bottom" height="20"
|
||||
increment="256" label="Particles:" can_edit_text="true"
|
||||
label_width="55" max_val="8192" min_val="0" mouse_opaque="true"
|
||||
name="MaxParticleCount" show_text="true" width="195" tool_tip="Amount of particles to render"/>
|
||||
<slider bottom_delta="-20" left_delta="0" control_name="RenderAvatarMaxVisible"
|
||||
decimal_digits="0" enabled="true" follows="left|bottom" height="20"
|
||||
increment="1" label="Max Avatars:" can_edit_text="true"
|
||||
label_width="65" max_val="50" min_val="1" mouse_opaque="true"
|
||||
name="RenderAvatarMaxVisible" show_text="true" width="195" tool_tip="How many avatars to fully render on screen. Lowering this greatly improves FPS in crowded situations. Requires Avatar Impostors to be on. [Default 35]"/>
|
||||
<slider bottom_delta="-20" left_delta="-0" control_name="RenderMaxNodeSize"
|
||||
decimal_digits="0" enabled="true" follows="left|bottom" height="20"
|
||||
increment="64" label="Max Node:" can_edit_text="true"
|
||||
label_width="55" max_val="16382" min_val="64" mouse_opaque="true"
|
||||
name="RenderMaxNodeSize" show_text="true" width="195" tool_tip="Maximum memory size limit for rendering NEW objects, in Kb. Anything over the limit will not be rendered. [Default 4096]"/>
|
||||
<text bottom_delta="-18" follows="left|top" font="SansSerifSmall" height="16" left_delta="0"
|
||||
name="cmd_line_text_7" width="512">
|
||||
Windlight Sky Preset:
|
||||
</text>
|
||||
<combo_box name="WLSkyPresetsCombo" bottom_delta="-20" left="40" follows="left|top" height="18" width="150" max_chars="20"
|
||||
mouse_opaque="true" allow_text_entry="false" tool_tip="WindLight Presets for your Sky." />
|
||||
<text bottom_delta="-18" follows="left|bottom" font="SansSerifSmall" height="16" left="10"
|
||||
name="cmd_line_text_7" width="512">
|
||||
Windlight Water Preset:
|
||||
</text>
|
||||
<combo_box name="WLWaterPresetsCombo" bottom_delta="-20" left="40" follows="left|top" height="18" width="150" max_chars="20"
|
||||
mouse_opaque="true" allow_text_entry="false" tool_tip="WindLight Presets for your Sky." />
|
||||
<button bottom="1" height="22" label="" left="5" name="expand" scale_image="true" toggle="true"
|
||||
tool_tip="Hide the Settings Panel" width="22" />
|
||||
</panel>
|
||||
175
indra/newview/wlfPanel_AdvSettings.cpp
Normal file
175
indra/newview/wlfPanel_AdvSettings.cpp
Normal file
@@ -0,0 +1,175 @@
|
||||
/* Copyright (c) 2009
|
||||
*
|
||||
* Modular Systems All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or
|
||||
* without modification, are permitted provided that the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution.
|
||||
* 3. Neither the name Modular Systems nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS AND CONTRIBUTORS <20>AS IS<49>
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "wlfPanel_AdvSettings.h"
|
||||
|
||||
#include "llbutton.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "lliconctrl.h"
|
||||
#include "lloverlaybar.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llwlparammanager.h"
|
||||
#include "llwaterparammanager.h"
|
||||
#include "llstartup.h"
|
||||
|
||||
|
||||
BOOL firstBuildDone;
|
||||
void* fixPointer;
|
||||
std::string current_preset = "Default";
|
||||
|
||||
wlfPanel_AdvSettings::wlfPanel_AdvSettings()
|
||||
{
|
||||
setIsChrome(TRUE);
|
||||
setFocusRoot(TRUE);
|
||||
build();
|
||||
}
|
||||
void wlfPanel_AdvSettings::build()
|
||||
{
|
||||
deleteAllChildren();
|
||||
if (!gSavedSettings.getBOOL("wlfAdvSettingsPopup"))
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildPanel(this, "wlfPanel_AdvSettings_expanded.xml", &getFactoryMap());
|
||||
}
|
||||
else
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildPanel(this, "wlfPanel_AdvSettings.xml", &getFactoryMap());
|
||||
}
|
||||
}
|
||||
|
||||
void wlfPanel_AdvSettings::refresh()
|
||||
{
|
||||
if (gSavedSettings.getBOOL("wlfAdvSettingsPopup"))
|
||||
{
|
||||
childSetEnabled("WLSkyPresetsCombo", true);
|
||||
childSetEnabled("WLWaterPresetsCombo", true);
|
||||
}
|
||||
}
|
||||
|
||||
void wlfPanel_AdvSettings::fixPanel()
|
||||
{
|
||||
if(!firstBuildDone)
|
||||
{
|
||||
llinfos << "firstbuild done" << llendl;
|
||||
firstBuildDone = TRUE;
|
||||
onClickExpandBtn(fixPointer);
|
||||
}
|
||||
}
|
||||
BOOL wlfPanel_AdvSettings::postBuild()
|
||||
{
|
||||
childSetAction("expand", onClickExpandBtn, this);
|
||||
|
||||
LLComboBox* comboBoxSky = getChild<LLComboBox>("WLSkyPresetsCombo");
|
||||
if(comboBoxSky != NULL)
|
||||
{
|
||||
std::map<std::string, LLWLParamSet>::iterator mIt = LLWLParamManager::instance()->mParamList.begin();
|
||||
for(; mIt != LLWLParamManager::instance()->mParamList.end(); mIt++)
|
||||
{
|
||||
if (mIt->first.length() > 0)
|
||||
comboBoxSky->add(mIt->first);
|
||||
}
|
||||
comboBoxSky->add(LLStringUtil::null);
|
||||
comboBoxSky->selectByValue(LLSD(current_preset));
|
||||
}
|
||||
comboBoxSky->setCommitCallback(onChangePresetName);
|
||||
|
||||
LLComboBox* comboBoxWater = getChild<LLComboBox>("WLWaterPresetsCombo");
|
||||
if(comboBoxWater != NULL)
|
||||
{
|
||||
std::map<std::string, LLWaterParamSet>::iterator mIt = LLWaterParamManager::instance()->mParamList.begin();
|
||||
for(; mIt != LLWaterParamManager::instance()->mParamList.end(); mIt++)
|
||||
{
|
||||
if (mIt->first.length() > 0)
|
||||
comboBoxWater->add(mIt->first);
|
||||
}
|
||||
comboBoxWater->add(LLStringUtil::null);
|
||||
comboBoxWater->selectByValue(LLSD(current_preset));
|
||||
}
|
||||
comboBoxWater->setCommitCallback(onChangePresetName);
|
||||
fixPointer = this;
|
||||
return TRUE;
|
||||
}
|
||||
void wlfPanel_AdvSettings::draw()
|
||||
{
|
||||
LLButton* expand_button = getChild<LLButton>("expand");
|
||||
if (expand_button)
|
||||
{
|
||||
if (expand_button->getToggleState())
|
||||
{
|
||||
expand_button->setImageOverlay("arrow_down.tga");
|
||||
}
|
||||
else
|
||||
{
|
||||
expand_button->setImageOverlay("arrow_up.tga");
|
||||
}
|
||||
}
|
||||
refresh();
|
||||
LLPanel::draw();
|
||||
}
|
||||
wlfPanel_AdvSettings::~wlfPanel_AdvSettings ()
|
||||
{
|
||||
}
|
||||
void wlfPanel_AdvSettings::onClickExpandBtn(void* user_data)
|
||||
{
|
||||
gSavedSettings.setBOOL("wlfAdvSettingsPopup",!gSavedSettings.getBOOL("wlfAdvSettingsPopup"));
|
||||
wlfPanel_AdvSettings* remotep = (wlfPanel_AdvSettings*)user_data;
|
||||
remotep->build();
|
||||
gOverlayBar->layoutButtons();
|
||||
}
|
||||
void wlfPanel_AdvSettings::onChangePresetName(LLUICtrl* ctrl, void * userData)
|
||||
{
|
||||
LLWLParamManager::instance()->mAnimator.mIsRunning = false;
|
||||
LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
|
||||
|
||||
LLComboBox * combo_box = static_cast<LLComboBox*>(ctrl);
|
||||
llinfos << "Combobox is " << combo_box->getControlName() << " aka " << combo_box->getName() << llendl;
|
||||
if (combo_box->getName() == "WLSkyPresetsCombo")
|
||||
{
|
||||
if(combo_box->getSimple() == "")
|
||||
{
|
||||
return;
|
||||
}
|
||||
current_preset = combo_box->getSelectedValue().asString();
|
||||
LLWLParamManager::instance()->loadPreset(current_preset);
|
||||
}
|
||||
else if (combo_box->getName() == "WLWaterPresetsCombo")
|
||||
{
|
||||
if(combo_box->getSimple() == "")
|
||||
{
|
||||
return;
|
||||
}
|
||||
current_preset = combo_box->getSelectedValue().asString();
|
||||
LLWaterParamManager::instance()->loadPreset(current_preset);
|
||||
}
|
||||
}
|
||||
56
indra/newview/wlfPanel_AdvSettings.h
Normal file
56
indra/newview/wlfPanel_AdvSettings.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/* Copyright (c) 2009
|
||||
*
|
||||
* Modular Systems All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or
|
||||
* without modification, are permitted provided that the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution.
|
||||
* 3. Neither the name Modular Systems nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS AND CONTRIBUTORS <20>AS IS<49>
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef LL_wlfPanel_AdvSettings_H
|
||||
#define LL_wlfPanel_AdvSettings_H
|
||||
|
||||
#include "llpanel.h"
|
||||
|
||||
class wlfPanel_AdvSettings : public LLPanel
|
||||
{
|
||||
public:
|
||||
wlfPanel_AdvSettings ();
|
||||
|
||||
~wlfPanel_AdvSettings ();
|
||||
BOOL postBuild();
|
||||
void draw();
|
||||
void refresh();
|
||||
static void fixPanel();
|
||||
|
||||
static void onClickExpandBtn(void* user_data);
|
||||
static void onChangePresetName(LLUICtrl* ctrl, void* userData);
|
||||
|
||||
protected:
|
||||
void build();
|
||||
|
||||
};
|
||||
|
||||
#endif // LL_wlfPanel_AdvSettings_H
|
||||
Reference in New Issue
Block a user