merge -r 124105-124625 skinning-13 -> viewer-2.0.0-3
parent
9ec432034d
commit
ade6bbb06c
|
|
@ -64,17 +64,11 @@ public:
|
|||
mLeft(left), mTop(top), mRight(right), mBottom(bottom)
|
||||
{}
|
||||
|
||||
LLRectBase(const LLSD& sd)
|
||||
explicit LLRectBase(const LLSD& sd)
|
||||
{
|
||||
setValue(sd);
|
||||
}
|
||||
|
||||
const LLRectBase& operator=(const LLSD& sd)
|
||||
{
|
||||
setValue(sd);
|
||||
return *this;
|
||||
}
|
||||
|
||||
void setValue(const LLSD& sd)
|
||||
{
|
||||
mLeft = sd[0].asInteger();
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class LLVector3d
|
|||
inline LLVector3d(const F64 x, const F64 y, const F64 z); // Initializes LLVector3d to (x. y, z)
|
||||
inline explicit LLVector3d(const F64 *vec); // Initializes LLVector3d to (vec[0]. vec[1], vec[2])
|
||||
inline explicit LLVector3d(const LLVector3 &vec);
|
||||
LLVector3d(const LLSD& sd)
|
||||
explicit LLVector3d(const LLSD& sd)
|
||||
{
|
||||
setValue(sd);
|
||||
}
|
||||
|
|
@ -65,12 +65,6 @@ class LLVector3d
|
|||
mdV[2] = sd[2].asReal();
|
||||
}
|
||||
|
||||
const LLVector3d& operator=(const LLSD& sd)
|
||||
{
|
||||
setValue(sd);
|
||||
return *this;
|
||||
}
|
||||
|
||||
LLSD getValue() const
|
||||
{
|
||||
LLSD ret;
|
||||
|
|
|
|||
|
|
@ -314,12 +314,6 @@ void LLVector3::setValue(const LLSD& sd)
|
|||
mV[2] = (F32) sd[2].asReal();
|
||||
}
|
||||
|
||||
const LLVector3& LLVector3::operator=(const LLSD& sd)
|
||||
{
|
||||
setValue(sd);
|
||||
return *this;
|
||||
}
|
||||
|
||||
const LLVector3& operator*=(LLVector3 &a, const LLQuaternion &rot)
|
||||
{
|
||||
const F32 rw = - rot.mQ[VX] * a.mV[VX] - rot.mQ[VY] * a.mV[VY] - rot.mQ[VZ] * a.mV[VZ];
|
||||
|
|
|
|||
|
|
@ -67,14 +67,12 @@ class LLVector3
|
|||
explicit LLVector3(const LLVector2 &vec); // Initializes LLVector3 to (vec[0]. vec[1], 0)
|
||||
explicit LLVector3(const LLVector3d &vec); // Initializes LLVector3 to (vec[0]. vec[1], vec[2])
|
||||
explicit LLVector3(const LLVector4 &vec); // Initializes LLVector4 to (vec[0]. vec[1], vec[2])
|
||||
LLVector3(const LLSD& sd);
|
||||
explicit LLVector3(const LLSD& sd);
|
||||
|
||||
LLSD getValue() const;
|
||||
|
||||
void setValue(const LLSD& sd);
|
||||
|
||||
const LLVector3& operator=(const LLSD& sd);
|
||||
|
||||
inline BOOL isFinite() const; // checks to see if all values of LLVector3 are finite
|
||||
BOOL clamp(F32 min, F32 max); // Clamps all values to (min,max), returns TRUE if data changed
|
||||
BOOL clampLength( F32 length_limit ); // Scales vector to limit length to a value
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class LLColor4
|
|||
LLColor4(U32 clr); // Initializes LLColor4 to (r=clr>>24, etc))
|
||||
LLColor4(const F32 *vec); // Initializes LLColor4 to (vec[0]. vec[1], vec[2], 1)
|
||||
LLColor4(const LLColor3 &vec, F32 a = 1.f); // Initializes LLColor4 to (vec, a)
|
||||
LLColor4(const LLSD& sd);
|
||||
explicit LLColor4(const LLSD& sd);
|
||||
explicit LLColor4(const LLColor4U& color4u); // "explicit" to avoid automatic conversion
|
||||
explicit LLColor4(const LLVector4& vector4); // "explicit" to avoid automatic conversion
|
||||
|
||||
|
|
@ -113,7 +113,6 @@ class LLColor4
|
|||
F32 &operator[](int idx) { return mV[idx]; }
|
||||
|
||||
const LLColor4& operator=(const LLColor3 &a); // Assigns vec3 to vec4 and returns vec4
|
||||
const LLColor4& operator=(const LLSD& sd);
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& s, const LLColor4 &a); // Print a
|
||||
friend LLColor4 operator+(const LLColor4 &a, const LLColor4 &b); // Return vector a + b
|
||||
|
|
@ -634,12 +633,5 @@ void LLColor4::clamp()
|
|||
}
|
||||
}
|
||||
|
||||
inline const LLColor4& LLColor4::operator=(const LLSD& sd)
|
||||
{
|
||||
setValue(sd);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public:
|
|||
LLColor4U(U8 r, U8 g, U8 b); // Initializes LLColor4U to (r, g, b, 1)
|
||||
LLColor4U(U8 r, U8 g, U8 b, U8 a); // Initializes LLColor4U to (r. g, b, a)
|
||||
LLColor4U(const U8 *vec); // Initializes LLColor4U to (vec[0]. vec[1], vec[2], 1)
|
||||
LLColor4U(const LLSD& sd)
|
||||
explicit LLColor4U(const LLSD& sd)
|
||||
{
|
||||
setValue(sd);
|
||||
}
|
||||
|
|
@ -79,12 +79,6 @@ public:
|
|||
mV[3] = sd[3].asInteger();
|
||||
}
|
||||
|
||||
const LLColor4U& operator=(const LLSD& sd)
|
||||
{
|
||||
setValue(sd);
|
||||
return *this;
|
||||
}
|
||||
|
||||
LLSD getValue() const
|
||||
{
|
||||
LLSD ret;
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ LLButton::LLButton(const LLButton::Params& p)
|
|||
mFadeWhenDisabled(FALSE)
|
||||
{
|
||||
static LLUICachedControl<S32> llbutton_orig_h_pad ("UIButtonOrigHPad", 0);
|
||||
static LLButton::Params default_params(LLUICtrlFactory::getDefaultParams<LLButton::Params>());
|
||||
static Params default_params(LLUICtrlFactory::getDefaultParams<Params>());
|
||||
|
||||
//if we aren't a picture_style button set label as name if not provided
|
||||
if (!p.picture_style.isProvided() || !p.picture_style)
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public:
|
|||
Optional<LLTextBox::Params> label_text;
|
||||
Optional<LLButton::Params> check_button;
|
||||
|
||||
Deprecated radio_style;
|
||||
Ignored radio_style;
|
||||
|
||||
Params();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -640,15 +640,17 @@ void LLComboBox::onButtonDown()
|
|||
{
|
||||
if (!mList->getVisible())
|
||||
{
|
||||
// this might change selection, so do it first
|
||||
prearrangeList();
|
||||
|
||||
// highlight the last selected item from the original selection before potentially selecting a new item
|
||||
// as visual cue to original value of combo box
|
||||
LLScrollListItem* last_selected_item = mList->getLastSelectedItem();
|
||||
if (last_selected_item)
|
||||
{
|
||||
// highlight the original selection before potentially selecting a new item
|
||||
mList->mouseOverHighlightNthItem(mList->getItemIndex(last_selected_item));
|
||||
}
|
||||
|
||||
prearrangeList();
|
||||
|
||||
if (mList->getItemCount() != 0)
|
||||
{
|
||||
showList();
|
||||
|
|
|
|||
|
|
@ -188,6 +188,13 @@ bool LLFloater::KeyCompare::equate(const LLSD& a, const LLSD& b)
|
|||
|
||||
//************************************
|
||||
|
||||
//static
|
||||
const LLFloater::Params& LLFloater::getDefaultParams()
|
||||
{
|
||||
return LLUICtrlFactory::getDefaultParams<LLFloater::Params>();
|
||||
}
|
||||
|
||||
|
||||
LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
|
||||
: LLPanel(),
|
||||
mDragHandle(NULL),
|
||||
|
|
|
|||
|
|
@ -141,7 +141,10 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
LLFloater(const LLSD& key = LLSD(), const LLFloater::Params& params = LLFloater::Params());
|
||||
// use this to avoid creating your own default LLFloater::Param instance
|
||||
static const Params& getDefaultParams();
|
||||
|
||||
LLFloater(const LLSD& key = LLSD(), const Params& params = getDefaultParams());
|
||||
|
||||
virtual ~LLFloater();
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
// file includes
|
||||
#include "llflyoutbutton.h"
|
||||
|
||||
static LLDefaultWidgetRegistry::Register<LLFlyoutButton> r2("flyout_button");
|
||||
//static LLDefaultWidgetRegistry::Register<LLFlyoutButton> r2("flyout_button");
|
||||
|
||||
const S32 FLYOUT_BUTTON_ARROW_WIDTH = 24;
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public:
|
|||
{
|
||||
Optional<LLUIImage*> image;
|
||||
Optional<LLUIColor> color;
|
||||
Deprecated scale_image;
|
||||
Ignored scale_image;
|
||||
Params();
|
||||
};
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ public:
|
|||
Optional<S32> text_pad_left,
|
||||
text_pad_right;
|
||||
|
||||
Deprecated is_unicode,
|
||||
Ignored is_unicode,
|
||||
drop_shadow_visible,
|
||||
border_drop_shadow_visible,
|
||||
bg_visible;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public:
|
|||
Optional<KEY> jump_key;
|
||||
Optional<bool> use_mac_ctrl;
|
||||
|
||||
Deprecated rect,
|
||||
Ignored rect,
|
||||
left,
|
||||
top,
|
||||
right,
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
class LLMultiFloater : public LLFloater
|
||||
{
|
||||
public:
|
||||
LLMultiFloater(const LLFloater::Params& params = LLFloater::Params());
|
||||
LLMultiFloater(const LLFloater::Params& params = LLFloater::getDefaultParams());
|
||||
virtual ~LLMultiFloater() {};
|
||||
|
||||
void buildTabContainer();
|
||||
|
|
|
|||
|
|
@ -299,8 +299,8 @@ public:
|
|||
|
||||
struct Functor : public LLInitParam::Choice<Functor>
|
||||
{
|
||||
Option<std::string> name;
|
||||
Option<LLNotificationFunctorRegistry::ResponseFunctor> function;
|
||||
Alternative<std::string> name;
|
||||
Alternative<LLNotificationFunctorRegistry::ResponseFunctor> function;
|
||||
|
||||
Functor()
|
||||
: name("functor_name"),
|
||||
|
|
|
|||
|
|
@ -58,6 +58,11 @@
|
|||
|
||||
static LLDefaultWidgetRegistry::Register<LLPanel> r1("panel", &LLPanel::fromXML);
|
||||
|
||||
const LLPanel::Params& LLPanel::getDefaultParams()
|
||||
{
|
||||
return LLUICtrlFactory::getDefaultParams<LLPanel::Params>();
|
||||
}
|
||||
|
||||
LLPanel::Params::Params()
|
||||
: has_border("border", false),
|
||||
bg_opaque_color("bg_opaque_color"),
|
||||
|
|
@ -114,6 +119,14 @@ void LLPanel::addBorder(LLViewBorder::Params p)
|
|||
addChild( mBorder );
|
||||
}
|
||||
|
||||
void LLPanel::addBorder()
|
||||
{
|
||||
LLViewBorder::Params p;
|
||||
p.border_thickness(LLPANEL_BORDER_WIDTH);
|
||||
addBorder(p);
|
||||
}
|
||||
|
||||
|
||||
void LLPanel::removeBorder()
|
||||
{
|
||||
if (mBorder)
|
||||
|
|
@ -885,10 +898,11 @@ LLView* LLPanel::getChildView(const std::string& name, BOOL recurse, BOOL create
|
|||
}
|
||||
if (!view && create_if_missing)
|
||||
{
|
||||
view = getDummyWidget<LLView>(name);
|
||||
view = getDefaultWidget<LLView>(name);
|
||||
if (!view)
|
||||
{
|
||||
view = LLUICtrlFactory::createDummyWidget<LLView>(name);
|
||||
// create LLViews explicitly, as they are not registered widget types
|
||||
view = LLUICtrlFactory::createDefaultWidget<LLView>(name);
|
||||
}
|
||||
}
|
||||
return view;
|
||||
|
|
|
|||
|
|
@ -96,10 +96,10 @@ public:
|
|||
protected:
|
||||
friend class LLUICtrlFactory;
|
||||
// RN: for some reason you can't just use LLUICtrlFactory::getDefaultParams as a default argument in VC8
|
||||
static const Params& defaultParams() { return LLUICtrlFactory::getDefaultParams<LLPanel::Params>(); }
|
||||
static const LLPanel::Params& getDefaultParams();
|
||||
|
||||
// Panels can get constructed directly
|
||||
LLPanel(const Params& params = defaultParams());
|
||||
LLPanel(const LLPanel::Params& params = getDefaultParams());
|
||||
|
||||
public:
|
||||
// LLPanel(const std::string& name, const LLRect& rect = LLRect(), BOOL bordered = TRUE);
|
||||
|
|
@ -122,7 +122,7 @@ public:
|
|||
|
||||
// Border controls
|
||||
void addBorder( LLViewBorder::Params p);
|
||||
void addBorder() { LLViewBorder::Params p; p.border_thickness(LLPANEL_BORDER_WIDTH); addBorder(p); }
|
||||
void addBorder();
|
||||
void removeBorder();
|
||||
BOOL hasBorder() const { return mBorder != NULL; }
|
||||
void setBorderVisible( BOOL b );
|
||||
|
|
|
|||
|
|
@ -48,8 +48,8 @@ class LLRadioCtrl : public LLCheckBoxCtrl
|
|||
public:
|
||||
struct Params : public LLInitParam::Block<Params, LLCheckBoxCtrl::Params>
|
||||
{
|
||||
Deprecated length;
|
||||
Deprecated type;
|
||||
Ignored length;
|
||||
Ignored type;
|
||||
|
||||
Params()
|
||||
: length("length"),
|
||||
|
|
|
|||
|
|
@ -285,6 +285,16 @@ void LLScrollListColumn::SortNames::declareValues()
|
|||
declare("descending", LLScrollListColumn::DESCENDING);
|
||||
}
|
||||
|
||||
//
|
||||
// LLScrollListColumn
|
||||
//
|
||||
//static
|
||||
const LLScrollListColumn::Params& LLScrollListColumn::getDefaultParams()
|
||||
{
|
||||
return LLUICtrlFactory::getDefaultParams<LLScrollListColumn::Params>();
|
||||
}
|
||||
|
||||
|
||||
LLScrollListColumn::LLScrollListColumn(const Params& p, LLScrollListCtrl* parent)
|
||||
: mWidth(0),
|
||||
mIndex (-1),
|
||||
|
|
|
|||
|
|
@ -116,9 +116,9 @@ public:
|
|||
|
||||
struct Width : public LLInitParam::Choice<Width>
|
||||
{
|
||||
Option<bool> dynamic_width;
|
||||
Option<S32> pixel_width;
|
||||
Option<F32> relative_width;
|
||||
Alternative<bool> dynamic_width;
|
||||
Alternative<S32> pixel_width;
|
||||
Alternative<F32> relative_width;
|
||||
|
||||
Width()
|
||||
: dynamic_width("dynamicwidth", false),
|
||||
|
|
@ -133,8 +133,8 @@ public:
|
|||
// either an image or label is used in column header
|
||||
struct Header : public LLInitParam::Choice<Header>
|
||||
{
|
||||
Option<std::string> label;
|
||||
Option<LLUIImage*> image;
|
||||
Alternative<std::string> label;
|
||||
Alternative<LLUIImage*> image;
|
||||
|
||||
Header()
|
||||
: label("label"),
|
||||
|
|
@ -160,8 +160,10 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
static const Params& getDefaultParams();
|
||||
|
||||
//NOTE: this is default constructible so we can store it in a map.
|
||||
LLScrollListColumn(const Params& p = Params(), LLScrollListCtrl* = NULL);
|
||||
LLScrollListColumn(const Params& p = getDefaultParams(), LLScrollListCtrl* = NULL);
|
||||
|
||||
void setWidth(S32 width);
|
||||
S32 getWidth() const { return mWidth; }
|
||||
|
|
|
|||
|
|
@ -1246,14 +1246,14 @@ const std::string LLScrollListCtrl::getSelectedItemLabel(S32 column) const
|
|||
// "StringUUID" interface: use this when you're creating a list that contains non-unique strings each of which
|
||||
// has an associated, unique UUID, and only one of which can be selected at a time.
|
||||
|
||||
LLScrollListItem* LLScrollListCtrl::addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos, BOOL enabled, S32 column_width)
|
||||
LLScrollListItem* LLScrollListCtrl::addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos, BOOL enabled)
|
||||
{
|
||||
if (getItemCount() < mMaxItemCount)
|
||||
{
|
||||
LLScrollListItem::Params item_p;
|
||||
item_p.enabled(enabled);
|
||||
item_p.value(id);
|
||||
item_p.cells.add().value(item_text).width(column_width).type("text");
|
||||
item_p.cells.add().value(item_text).type("text");
|
||||
|
||||
return addRow( item_p, pos );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ public:
|
|||
// DEPRECATED: Use LLSD versions of setCommentText() and getSelectedValue().
|
||||
// "StringUUID" interface: use this when you're creating a list that contains non-unique strings each of which
|
||||
// has an associated, unique UUID, and only one of which can be selected at a time.
|
||||
LLScrollListItem* addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE, S32 column_width = 0);
|
||||
LLScrollListItem* addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE);
|
||||
LLUUID getStringUUIDSelectedItem() const;
|
||||
|
||||
LLScrollListItem* getFirstSelected() const;
|
||||
|
|
|
|||
|
|
@ -64,9 +64,9 @@ public:
|
|||
Optional<void*> userdata;
|
||||
Optional<LLSD> value;
|
||||
|
||||
Deprecated name; // use for localization tools
|
||||
Deprecated type;
|
||||
Deprecated length;
|
||||
Ignored name; // use for localization tools
|
||||
Ignored type;
|
||||
Ignored length;
|
||||
|
||||
Multiple<LLScrollListCell::Params> cells;
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
#include "llsearcheditor.h"
|
||||
|
||||
static LLDefaultWidgetRegistry::Register<LLSearchEditor> r2("search_editor");
|
||||
//static LLDefaultWidgetRegistry::Register<LLSearchEditor> r2("search_editor");
|
||||
|
||||
LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)
|
||||
: LLUICtrl(p)
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public:
|
|||
|
||||
Optional<LLFontGL::ShadowType> font_shadow;
|
||||
|
||||
Deprecated drop_shadow_visible,
|
||||
Ignored drop_shadow_visible,
|
||||
type,
|
||||
length;
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public:
|
|||
|
||||
Optional<LLViewBorder::Params> border;
|
||||
|
||||
Deprecated type,
|
||||
Ignored type,
|
||||
length,
|
||||
is_unicode;
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,10 @@
|
|||
#include "llmenugl.h"
|
||||
#include "llwindow.h"
|
||||
|
||||
// for registration
|
||||
#include "llsearcheditor.h"
|
||||
#include "llflyoutbutton.h"
|
||||
|
||||
// for XUIParse
|
||||
#include "llquaternion.h"
|
||||
#include <boost/tokenizer.hpp>
|
||||
|
|
@ -85,6 +89,10 @@ std::list<std::string> gUntranslated;
|
|||
|
||||
/*static*/ std::vector<std::string> LLUI::sXUIPaths;
|
||||
|
||||
// register searcheditor here
|
||||
static LLDefaultWidgetRegistry::Register<LLSearchEditor> register_search_editor("search_editor");
|
||||
static LLDefaultWidgetRegistry::Register<LLFlyoutButton> register_flyout_button("flyout_button");
|
||||
|
||||
|
||||
//
|
||||
// Functions
|
||||
|
|
|
|||
|
|
@ -665,8 +665,8 @@ template <typename T> LLRegisterWith<LLDestroyClassList> LLDestroyClass<T>::sReg
|
|||
// useful parameter blocks
|
||||
struct TimeIntervalParam : public LLInitParam::Choice<TimeIntervalParam>
|
||||
{
|
||||
Option<F32> seconds;
|
||||
Option<S32> frames;
|
||||
Alternative<F32> seconds;
|
||||
Alternative<S32> frames;
|
||||
TimeIntervalParam()
|
||||
: seconds("seconds"),
|
||||
frames("frames")
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ class LLUIColorTable : public LLSingleton<LLUIColorTable>
|
|||
public:
|
||||
struct ColorParams : LLInitParam::Choice<ColorParams>
|
||||
{
|
||||
Option<LLColor4> value;
|
||||
Option<std::string> reference;
|
||||
Alternative<LLColor4> value;
|
||||
Alternative<std::string> reference;
|
||||
|
||||
ColorParams();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -111,6 +111,13 @@ void LLFocusableElement::setFocus(BOOL b)
|
|||
{
|
||||
}
|
||||
|
||||
//static
|
||||
const LLUICtrl::Params& LLUICtrl::getDefaultParams()
|
||||
{
|
||||
return LLUICtrlFactory::getDefaultParams<LLUICtrl::Params>();
|
||||
}
|
||||
|
||||
|
||||
LLUICtrl::LLUICtrl(const LLUICtrl::Params& p, const LLViewModelPtr& viewmodel)
|
||||
: LLView(p),
|
||||
mTentative(FALSE),
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public:
|
|||
|
||||
struct CallbackParam : public LLInitParam::Block<CallbackParam>
|
||||
{
|
||||
Deprecated name;
|
||||
Ignored name;
|
||||
|
||||
Optional<std::string> function_name;
|
||||
Optional<LLSD> parameter;
|
||||
|
|
@ -116,8 +116,8 @@ public:
|
|||
|
||||
struct EnableControls : public LLInitParam::Choice<EnableControls>
|
||||
{
|
||||
Option<std::string> enabled;
|
||||
Option<std::string> disabled;
|
||||
Alternative<std::string> enabled;
|
||||
Alternative<std::string> disabled;
|
||||
|
||||
EnableControls()
|
||||
: enabled("enabled_control"),
|
||||
|
|
@ -126,8 +126,8 @@ public:
|
|||
};
|
||||
struct ControlVisibility : public LLInitParam::Choice<ControlVisibility>
|
||||
{
|
||||
Option<std::string> visible;
|
||||
Option<std::string> invisible;
|
||||
Alternative<std::string> visible;
|
||||
Alternative<std::string> invisible;
|
||||
|
||||
ControlVisibility()
|
||||
: visible("make_visible_control"),
|
||||
|
|
@ -160,7 +160,8 @@ public:
|
|||
void initFromParams(const Params& p);
|
||||
protected:
|
||||
friend class LLUICtrlFactory;
|
||||
LLUICtrl(const Params& p = LLUICtrl::Params(),
|
||||
static const Params& getDefaultParams();
|
||||
LLUICtrl(const Params& p = getDefaultParams(),
|
||||
const LLViewModelPtr& viewmodel=LLViewModelPtr(new LLViewModel));
|
||||
|
||||
void initCommitCallback(const CommitCallbackParam& cb, commit_signal_t& sig);
|
||||
|
|
|
|||
|
|
@ -154,9 +154,15 @@ struct LLCompareTypeID
|
|||
|
||||
class LLWidgetTemplateRegistry
|
||||
: public LLRegistrySingleton<const std::type_info*, std::string, LLWidgetTemplateRegistry, LLCompareTypeID>
|
||||
{
|
||||
{};
|
||||
|
||||
};
|
||||
// function used to create new default widgets via LLView::getChild<T>
|
||||
typedef LLView* (*dummy_widget_creator_func_t)(const std::string&);
|
||||
|
||||
// used to register factory functions for default widget instances
|
||||
class LLDummyWidgetRegistry
|
||||
: public LLRegistrySingleton<const std::type_info*, dummy_widget_creator_func_t, LLDummyWidgetRegistry, LLCompareTypeID>
|
||||
{};
|
||||
|
||||
extern LLFastTimer::DeclareTimer FTM_WIDGET_SETUP;
|
||||
extern LLFastTimer::DeclareTimer FTM_WIDGET_CONSTRUCTION;
|
||||
|
|
@ -295,10 +301,16 @@ fail:
|
|||
return widget;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static T* createDummyWidget(const std::string& name)
|
||||
template<class T>
|
||||
static T* getDefaultWidget(const std::string& name)
|
||||
{
|
||||
dummy_widget_creator_func_t* dummy_func = LLDummyWidgetRegistry::instance().getValue(&typeid(T));
|
||||
return dynamic_cast<T*>((*dummy_func)(name));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static LLView* createDefaultWidget(const std::string& name)
|
||||
{
|
||||
//#pragma message("Generating LLUICtrlFactory::createDummyWidget")
|
||||
typename T::Params params;
|
||||
params.name(name);
|
||||
|
||||
|
|
@ -389,8 +401,10 @@ template<typename T, typename PARAM_BLOCK>
|
|||
LLWidgetRegistry<DERIVED>::Register<T, PARAM_BLOCK>::Register(const char* tag, LLWidgetCreatorFunc func)
|
||||
: LLWidgetRegistry<DERIVED>::StaticRegistrar(tag, func.empty() ? (LLWidgetCreatorFunc)&LLUICtrlFactory::defaultBuilder<T, PARAM_BLOCK> : func)
|
||||
{
|
||||
//FIXME: inventory_panel will register itself with LLPanel::Params but it does have its own params...:(
|
||||
// associate parameter block type with template .xml file
|
||||
LLWidgetTemplateRegistry::instance().defaultRegistrar().add(&typeid(PARAM_BLOCK), tag);
|
||||
// associate widget type with factory function
|
||||
LLDummyWidgetRegistry::instance().defaultRegistrar().add(&typeid(T), &LLUICtrlFactory::createDefaultWidget<T>);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ LLView::LLView(const LLView::Params& p)
|
|||
mDefaultTabGroup(p.default_tab_group),
|
||||
mLastTabGroup(0),
|
||||
mToolTipMsg((LLStringExplicit)p.tool_tip()),
|
||||
mDummyWidgets(NULL)
|
||||
mDefaultWidgets(NULL)
|
||||
{
|
||||
// create rect first, as this will supply initial follows flags
|
||||
setShape(p.rect);
|
||||
|
|
@ -157,12 +157,12 @@ LLView::~LLView()
|
|||
mParentView->removeChild(this);
|
||||
}
|
||||
|
||||
if (mDummyWidgets)
|
||||
if (mDefaultWidgets)
|
||||
{
|
||||
std::for_each(mDummyWidgets->begin(), mDummyWidgets->end(),
|
||||
std::for_each(mDefaultWidgets->begin(), mDefaultWidgets->end(),
|
||||
DeletePairedPointer());
|
||||
delete mDummyWidgets;
|
||||
mDummyWidgets = NULL;
|
||||
delete mDefaultWidgets;
|
||||
mDefaultWidgets = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1710,10 +1710,10 @@ LLView* LLView::getChildView(const std::string& name, BOOL recurse, BOOL create_
|
|||
|
||||
if (create_if_missing)
|
||||
{
|
||||
LLView* view = getDummyWidget<LLView>(name);
|
||||
LLView* view = getDefaultWidget<LLView>(name);
|
||||
if (!view)
|
||||
{
|
||||
view = LLUICtrlFactory::createDummyWidget<LLView>(name);
|
||||
view = LLUICtrlFactory::createDefaultWidget<LLView>(name);
|
||||
}
|
||||
return view;
|
||||
}
|
||||
|
|
@ -2750,11 +2750,11 @@ LLView::tree_iterator_t LLView::endTree()
|
|||
|
||||
// only create maps on demand, as they incur heap allocation/deallocation cost
|
||||
// when a view is constructed/deconstructed
|
||||
LLView::dummy_widget_map_t& LLView::getDummyWidgetMap() const
|
||||
LLView::default_widget_map_t& LLView::getDefaultWidgetMap() const
|
||||
{
|
||||
if (!mDummyWidgets)
|
||||
if (!mDefaultWidgets)
|
||||
{
|
||||
mDummyWidgets = new dummy_widget_map_t();
|
||||
mDefaultWidgets = new default_widget_map_t();
|
||||
}
|
||||
return *mDummyWidgets;
|
||||
return *mDefaultWidgets;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,8 +143,8 @@ class LLView : public LLMouseHandler, public LLMortician
|
|||
public:
|
||||
struct Follows : public LLInitParam::Choice<Follows>
|
||||
{
|
||||
Option<std::string> string;
|
||||
Option<U32> flags;
|
||||
Alternative<std::string> string;
|
||||
Alternative<U32> flags;
|
||||
|
||||
Follows()
|
||||
: string(""),
|
||||
|
|
@ -190,7 +190,7 @@ public:
|
|||
|
||||
// these are nested attributes for LLLayoutPanel
|
||||
//FIXME: get parent context involved in parsing traversal
|
||||
Deprecated user_resize,
|
||||
Ignored user_resize,
|
||||
auto_resize,
|
||||
needs_translate;
|
||||
|
||||
|
|
@ -486,10 +486,10 @@ public:
|
|||
|
||||
virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const;
|
||||
|
||||
template <class T> T* getDummyWidget(const std::string& name) const
|
||||
template <class T> T* getDefaultWidget(const std::string& name) const
|
||||
{
|
||||
dummy_widget_map_t::const_iterator found_it = getDummyWidgetMap().find(name);
|
||||
if (found_it == getDummyWidgetMap().end())
|
||||
default_widget_map_t::const_iterator found_it = getDefaultWidgetMap().find(name);
|
||||
if (found_it == getDefaultWidgetMap().end())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -592,11 +592,11 @@ private:
|
|||
|
||||
static LLWindow* sWindow; // All root views must know about their window.
|
||||
|
||||
typedef std::map<std::string, LLView*> dummy_widget_map_t;
|
||||
typedef std::map<std::string, LLView*> default_widget_map_t;
|
||||
// allocate this map no demand, as it is rarely needed
|
||||
mutable dummy_widget_map_t* mDummyWidgets;
|
||||
mutable default_widget_map_t* mDefaultWidgets;
|
||||
|
||||
dummy_widget_map_t& getDummyWidgetMap() const;
|
||||
default_widget_map_t& getDefaultWidgetMap() const;
|
||||
|
||||
public:
|
||||
static BOOL sDebugRects; // Draw debug rects behind everything.
|
||||
|
|
@ -640,10 +640,10 @@ template <class T> T* LLView::getChild(const std::string& name, BOOL recurse, BO
|
|||
}
|
||||
if (create_if_missing)
|
||||
{
|
||||
result = getDummyWidget<T>(name);
|
||||
result = getDefaultWidget<T>(name);
|
||||
if (!result)
|
||||
{
|
||||
result = LLUICtrlFactory::createDummyWidget<T>(name);
|
||||
result = LLUICtrlFactory::getDefaultWidget<T>(name);
|
||||
|
||||
if (result)
|
||||
{
|
||||
|
|
@ -655,7 +655,7 @@ template <class T> T* LLView::getChild(const std::string& name, BOOL recurse, BO
|
|||
return NULL;
|
||||
}
|
||||
|
||||
getDummyWidgetMap()[name] = result;
|
||||
getDefaultWidgetMap()[name] = result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1176,7 +1176,7 @@ template<>
|
|||
LLVector3 convert_from_llsd<LLVector3>(const LLSD& sd, eControlType type, const std::string& control_name)
|
||||
{
|
||||
if (type == TYPE_VEC3)
|
||||
return sd;
|
||||
return (LLVector3)sd;
|
||||
else
|
||||
{
|
||||
CONTROL_ERRS << "Invalid LLVector3 value" << llendl;
|
||||
|
|
@ -1188,7 +1188,7 @@ template<>
|
|||
LLVector3d convert_from_llsd<LLVector3d>(const LLSD& sd, eControlType type, const std::string& control_name)
|
||||
{
|
||||
if (type == TYPE_VEC3D)
|
||||
return sd;
|
||||
return (LLVector3d)sd;
|
||||
else
|
||||
{
|
||||
CONTROL_ERRS << "Invalid LLVector3d value" << llendl;
|
||||
|
|
@ -1200,7 +1200,7 @@ template<>
|
|||
LLRect convert_from_llsd<LLRect>(const LLSD& sd, eControlType type, const std::string& control_name)
|
||||
{
|
||||
if (type == TYPE_RECT)
|
||||
return sd;
|
||||
return LLRect(sd);
|
||||
else
|
||||
{
|
||||
CONTROL_ERRS << "Invalid rect value" << llendl;
|
||||
|
|
|
|||
|
|
@ -278,7 +278,6 @@ set(viewer_SOURCE_FILES
|
|||
llpaneldirland.cpp
|
||||
llpaneldirpeople.cpp
|
||||
llpaneldirplaces.cpp
|
||||
llpaneldisplay.cpp
|
||||
llpanelevent.cpp
|
||||
llpanelface.cpp
|
||||
llpanelgroup.cpp
|
||||
|
|
@ -694,7 +693,6 @@ set(viewer_HEADER_FILES
|
|||
llpaneldirland.h
|
||||
llpaneldirpeople.h
|
||||
llpaneldirplaces.h
|
||||
llpaneldisplay.h
|
||||
llpanelevent.h
|
||||
llpanelface.h
|
||||
llpanelgroup.h
|
||||
|
|
|
|||
|
|
@ -1715,7 +1715,7 @@ void LLAppViewer::loadColorSettings()
|
|||
if(control->isType(TYPE_COL4))
|
||||
{
|
||||
LLUIColorTable::ColorParams color;
|
||||
color.value = control->getValue();
|
||||
color.value = (LLColor4)control->getValue();
|
||||
|
||||
LLUIColorTable::ColorEntryParams color_entry;
|
||||
color_entry.name = name;
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ BOOL LLFavoritesBarCtrl::postBuild()
|
|||
LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_favorites.xml", gMenuHolder);
|
||||
if (!menu)
|
||||
{
|
||||
menu = LLUICtrlFactory::createDummyWidget<LLMenuGL>("inventory_menu");
|
||||
menu = LLUICtrlFactory::getDefaultWidget<LLMenuGL>("inventory_menu");
|
||||
}
|
||||
menu->setBackgroundColor(gSavedSkinSettings.getColor("MenuPopupBgColor"));
|
||||
mInventoryItemsPopupMenuHandle = menu->getHandle();
|
||||
|
|
|
|||
|
|
@ -75,7 +75,9 @@ LLFloaterAuction::LLFloaterAuction(const LLSD& key)
|
|||
: LLFloater(),
|
||||
mParcelID(-1)
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_auction.xml");
|
||||
// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_auction.xml");
|
||||
mCommitCallbackRegistrar.add("ClickSnapshot", boost::bind(&LLFloaterAuction::onClickSnapshot, this));
|
||||
mCommitCallbackRegistrar.add("ClickOK", boost::bind(&LLFloaterAuction::onClickOK, this));
|
||||
}
|
||||
|
||||
// Destroys the object
|
||||
|
|
@ -85,11 +87,6 @@ LLFloaterAuction::~LLFloaterAuction()
|
|||
|
||||
BOOL LLFloaterAuction::postBuild()
|
||||
{
|
||||
childSetValue("fence_check", LLSD( gSavedSettings.getBOOL("AuctionShowFence") ) );
|
||||
getChild<LLUICtrl>("fence_check")->setCommitCallback(boost::bind(LLSavedSettingsGlue::setBOOL, _1, "AuctionShowFence"));
|
||||
|
||||
childSetAction("snapshot_btn", onClickSnapshot, this);
|
||||
childSetAction("ok_btn", onClickOK, this);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,9 +55,9 @@ public:
|
|||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
/*virtual*/ void draw();
|
||||
|
||||
private:
|
||||
LLFloaterAuction(const LLSD& key);
|
||||
~LLFloaterAuction();
|
||||
private:
|
||||
void initialize();
|
||||
|
||||
static void onClickSnapshot(void* data);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
LLFloaterBuildOptions::LLFloaterBuildOptions(const LLSD& key)
|
||||
: LLFloater()
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_build_options.xml");
|
||||
//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_build_options.xml");
|
||||
}
|
||||
|
||||
LLFloaterBuildOptions::~LLFloaterBuildOptions()
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class LLFloaterBuildOptions
|
|||
: public LLFloater, public LLFloaterSingleton<LLFloaterBuildOptions>
|
||||
{
|
||||
friend class LLUISingleton<LLFloaterBuildOptions, VisibilityPolicy<LLFloater> >;
|
||||
protected:
|
||||
public:
|
||||
LLFloaterBuildOptions(const LLSD& key);
|
||||
~LLFloaterBuildOptions();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
LLFloaterBump::LLFloaterBump(const LLSD& key)
|
||||
: LLFloater()
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_bumps.xml");
|
||||
//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_bumps.xml");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -44,13 +44,12 @@ class LLFloaterBump
|
|||
{
|
||||
friend class LLUISingleton<LLFloaterBump, VisibilityPolicy<LLFloater> >;
|
||||
protected:
|
||||
LLFloaterBump(const LLSD& key);
|
||||
virtual ~LLFloaterBump();
|
||||
|
||||
void add(LLScrollListCtrl* list, LLMeanCollisionData *mcd);
|
||||
|
||||
public:
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
LLFloaterBump(const LLSD& key);
|
||||
virtual ~LLFloaterBump();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -47,20 +47,24 @@ const F32 CAMERA_BUTTON_DELAY = 0.0f;
|
|||
//
|
||||
// Member functions
|
||||
//
|
||||
|
||||
|
||||
LLFloaterCamera::LLFloaterCamera(const LLSD& val)
|
||||
: LLFloater()
|
||||
{
|
||||
setIsChrome(TRUE);
|
||||
|
||||
// For now, only used for size and tooltip strings
|
||||
const BOOL DONT_OPEN = FALSE;
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_camera.xml", DONT_OPEN);
|
||||
|
||||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLFloaterCamera::postBuild()
|
||||
{
|
||||
setIsChrome(TRUE);
|
||||
|
||||
mRotate = getChild<LLJoystickCameraRotate>("cam_rotate_stick");
|
||||
mZoom = getChild<LLJoystickCameraZoom>("zoom");
|
||||
mTrack = getChild<LLJoystickCameraTrack>("cam_track_stick");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
@ -79,3 +83,4 @@ void LLFloaterCamera::onClose(bool app_quitting)
|
|||
gSavedSettings.setBOOL("ShowCameraControls", FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ private:
|
|||
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
public:
|
||||
LLJoystickCameraRotate* mRotate;
|
||||
LLJoystickCameraZoom* mZoom;
|
||||
|
|
|
|||
|
|
@ -53,21 +53,22 @@ const std::string LAG_GOOD_IMAGE_NAME = "lag_status_good.tga";
|
|||
LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key)
|
||||
: LLFloater()
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_lagmeter.xml");
|
||||
|
||||
// Don't let this window take keyboard focus -- it's confusing to
|
||||
// lose arrow-key driving when testing lag.
|
||||
setIsChrome(TRUE);
|
||||
|
||||
// were we shrunk last time?
|
||||
if (gSavedSettings.getBOOL("LagMeterShrunk"))
|
||||
{
|
||||
onClickShrink(this);
|
||||
}
|
||||
// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_lagmeter.xml");
|
||||
mCommitCallbackRegistrar.add("LagMeter.ClickShrink", boost::bind(&LLFloaterLagMeter::onClickShrink, this));
|
||||
}
|
||||
|
||||
BOOL LLFloaterLagMeter::postBuild()
|
||||
{
|
||||
// Don't let this window take keyboard focus -- it's confusing to
|
||||
// lose arrow-key driving when testing lag.
|
||||
setIsChrome(TRUE);
|
||||
|
||||
// were we shrunk last time?
|
||||
if (gSavedSettings.getBOOL("LagMeterShrunk"))
|
||||
{
|
||||
onClickShrink();
|
||||
}
|
||||
|
||||
mClientButton = getChild<LLButton>("client_lagmeter");
|
||||
mClientText = getChild<LLTextBox>("client_text");
|
||||
mClientCause = getChild<LLTextBox>("client_lag_cause");
|
||||
|
|
@ -102,7 +103,7 @@ BOOL LLFloaterLagMeter::postBuild()
|
|||
config_string = getString("server_single_process_max_time_ms", mStringArgs);
|
||||
mServerSingleProcessMaxTime = (float)atof( config_string.c_str() );
|
||||
|
||||
mShrunk = false;
|
||||
// mShrunk = false;
|
||||
config_string = getString("max_width_px", mStringArgs);
|
||||
mMaxWidth = atoi( config_string.c_str() );
|
||||
config_string = getString("min_width_px", mStringArgs);
|
||||
|
|
@ -120,18 +121,18 @@ BOOL LLFloaterLagMeter::postBuild()
|
|||
mStringArgs["[SERVER_FRAME_RATE_CRITICAL]"] = getString("server_frame_rate_critical_fps");
|
||||
mStringArgs["[SERVER_FRAME_RATE_WARNING]"] = getString("server_frame_rate_warning_fps");
|
||||
|
||||
childSetAction("minimize", onClickShrink, this);
|
||||
// childSetAction("minimize", onClickShrink, this);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
LLFloaterLagMeter::~LLFloaterLagMeter()
|
||||
{
|
||||
// save shrunk status for next time
|
||||
gSavedSettings.setBOOL("LagMeterShrunk", mShrunk);
|
||||
// gSavedSettings.setBOOL("LagMeterShrunk", mShrunk);
|
||||
// expand so we save the large window rectangle
|
||||
if (mShrunk)
|
||||
if (gSavedSettings.getBOOL("LagMeterShrunk"))
|
||||
{
|
||||
onClickShrink(this);
|
||||
onClickShrink();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -311,58 +312,61 @@ void LLFloaterLagMeter::determineServer()
|
|||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterLagMeter::onClickShrink(void * data)
|
||||
{
|
||||
LLFloaterLagMeter * self = (LLFloaterLagMeter*)data;
|
||||
|
||||
LLButton * button = self->getChild<LLButton>("minimize");
|
||||
S32 delta_width = self->mMaxWidth - self->mMinWidth;
|
||||
LLRect r = self->getRect();
|
||||
if(self->mShrunk)
|
||||
void LLFloaterLagMeter::onClickShrink() // toggle "LagMeterShrunk"
|
||||
{
|
||||
// LLFloaterLagMeter * self = (LLFloaterLagMeter*)data;
|
||||
|
||||
LLButton * button = getChild<LLButton>("minimize");
|
||||
S32 delta_width = mMaxWidth -mMinWidth;
|
||||
LLRect r = getRect();
|
||||
bool shrunk = gSavedSettings.getBOOL("LagMeterShrunk");
|
||||
|
||||
if(shrunk)
|
||||
{
|
||||
self->setTitle( self->getString("max_title_msg", self->mStringArgs) );
|
||||
setTitle(getString("max_title_msg", mStringArgs) );
|
||||
// make left edge appear to expand
|
||||
r.translate(-delta_width, 0);
|
||||
self->setRect(r);
|
||||
self->reshape(self->mMaxWidth, self->getRect().getHeight());
|
||||
setRect(r);
|
||||
reshape(mMaxWidth, getRect().getHeight());
|
||||
|
||||
self->childSetText("client", self->getString("client_text_msg", self->mStringArgs) + ":");
|
||||
self->childSetText("network", self->getString("network_text_msg", self->mStringArgs) + ":");
|
||||
self->childSetText("server", self->getString("server_text_msg", self->mStringArgs) + ":");
|
||||
childSetText("client", getString("client_text_msg", mStringArgs) + ":");
|
||||
childSetText("network", getString("network_text_msg",mStringArgs) + ":");
|
||||
childSetText("server", getString("server_text_msg", mStringArgs) + ":");
|
||||
|
||||
// usually "<<"
|
||||
button->setLabel( self->getString("smaller_label", self->mStringArgs) );
|
||||
button->setLabel( getString("smaller_label", mStringArgs) );
|
||||
}
|
||||
else
|
||||
{
|
||||
self->setTitle( self->getString("min_title_msg", self->mStringArgs) );
|
||||
setTitle( getString("min_title_msg", mStringArgs) );
|
||||
// make left edge appear to collapse
|
||||
r.translate(delta_width, 0);
|
||||
self->setRect(r);
|
||||
self->reshape(self->mMinWidth, self->getRect().getHeight());
|
||||
setRect(r);
|
||||
reshape(mMinWidth, getRect().getHeight());
|
||||
|
||||
self->childSetText("client", self->getString("client_text_msg", self->mStringArgs) );
|
||||
self->childSetText("network", self->getString("network_text_msg", self->mStringArgs) );
|
||||
self->childSetText("server", self->getString("server_text_msg", self->mStringArgs) );
|
||||
childSetText("client", getString("client_text_msg", mStringArgs) );
|
||||
childSetText("network",getString("network_text_msg",mStringArgs) );
|
||||
childSetText("server", getString("server_text_msg", mStringArgs) );
|
||||
|
||||
// usually ">>"
|
||||
button->setLabel( self->getString("bigger_label", self->mStringArgs) );
|
||||
button->setLabel( getString("bigger_label", mStringArgs) );
|
||||
}
|
||||
// Don't put keyboard focus on the button
|
||||
button->setFocus(FALSE);
|
||||
|
||||
self->mClientText->setVisible(self->mShrunk);
|
||||
self->mClientCause->setVisible(self->mShrunk);
|
||||
self->childSetVisible("client_help", self->mShrunk);
|
||||
// self->mClientText->setVisible(self->mShrunk);
|
||||
// self->mClientCause->setVisible(self->mShrunk);
|
||||
// self->childSetVisible("client_help", self->mShrunk);
|
||||
|
||||
self->mNetworkText->setVisible(self->mShrunk);
|
||||
self->mNetworkCause->setVisible(self->mShrunk);
|
||||
self->childSetVisible("network_help", self->mShrunk);
|
||||
// self->mNetworkText->setVisible(self->mShrunk);
|
||||
// self->mNetworkCause->setVisible(self->mShrunk);
|
||||
// self->childSetVisible("network_help", self->mShrunk);
|
||||
|
||||
self->mServerText->setVisible(self->mShrunk);
|
||||
self->mServerCause->setVisible(self->mShrunk);
|
||||
self->childSetVisible("server_help", self->mShrunk);
|
||||
// self->mServerText->setVisible(self->mShrunk);
|
||||
// self->mServerCause->setVisible(self->mShrunk);
|
||||
// self->childSetVisible("server_help", self->mShrunk);
|
||||
|
||||
self->mShrunk = !self->mShrunk;
|
||||
// self->mShrunk = !self->mShrunk;
|
||||
gSavedSettings.setBOOL("LagMeterShrunk", !gSavedSettings.getBOOL("LagMeterShrunk"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,17 +42,18 @@ class LLFloaterLagMeter : public LLFloater, public LLFloaterSingleton<LLFloaterL
|
|||
friend class LLUISingleton<LLFloaterLagMeter, VisibilityPolicy<LLFloater> >;
|
||||
|
||||
public:
|
||||
LLFloaterLagMeter(const LLSD& key);
|
||||
/*virtual*/ ~LLFloaterLagMeter();
|
||||
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ BOOL postBuild();
|
||||
private:
|
||||
LLFloaterLagMeter(const LLSD& key);
|
||||
/*virtual*/ ~LLFloaterLagMeter();
|
||||
|
||||
void determineClient();
|
||||
void determineNetwork();
|
||||
void determineServer();
|
||||
|
||||
static void onClickShrink(void * data);
|
||||
void onClickShrink();
|
||||
|
||||
bool mShrunk;
|
||||
S32 mMaxWidth, mMinWidth;
|
||||
|
|
|
|||
|
|
@ -44,11 +44,11 @@
|
|||
#include "lluserauth.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llradiogroup.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "llfloaterauction.h"
|
||||
#include "llfloatergroups.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
|
|
@ -889,7 +889,8 @@ void LLPanelLandGeneral::onClickStartAuction(void* data)
|
|||
}
|
||||
else
|
||||
{
|
||||
LLFloaterAuction::showInstance();
|
||||
//LLFloaterAuction::showInstance();
|
||||
LLFloaterReg::showInstance("auction");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,7 +163,9 @@ bool LLNotificationChannelPanel::update(const LLSD& payload, bool passed_filter)
|
|||
LLFloaterNotificationConsole::LLFloaterNotificationConsole(const LLSD& key)
|
||||
: LLFloater()
|
||||
{
|
||||
LLUICtrlFactory::instance().buildFloater(this, "floater_notifications_console.xml");
|
||||
mCommitCallbackRegistrar.add("ClickAdd", boost::bind(&LLFloaterNotificationConsole::onClickAdd, this));
|
||||
|
||||
//LLUICtrlFactory::instance().buildFloater(this, "floater_notifications_console.xml");
|
||||
}
|
||||
|
||||
void LLFloaterNotificationConsole::onClose(bool app_quitting)
|
||||
|
|
@ -187,7 +189,7 @@ BOOL LLFloaterNotificationConsole::postBuild()
|
|||
addChannel("Notifications");
|
||||
addChannel("NotificationTips");
|
||||
|
||||
getChild<LLButton>("add_notification")->setClickedCallback(onClickAdd, this);
|
||||
// getChild<LLButton>("add_notification")->setClickedCallback(onClickAdd, this);
|
||||
|
||||
LLComboBox* notifications = getChild<LLComboBox>("notification_types");
|
||||
LLNotifications::TemplateNames names = LLNotifications::instance().getTemplateNames();
|
||||
|
|
@ -236,11 +238,9 @@ void LLFloaterNotificationConsole::updateResizeLimits()
|
|||
setResizeLimits(getMinWidth(), floater_header_size + HEADER_PADDING + ((NOTIFICATION_PANEL_HEADER_HEIGHT + 3) * stack.getNumPanels()));
|
||||
}
|
||||
|
||||
void LLFloaterNotificationConsole::onClickAdd(void* user_data)
|
||||
void LLFloaterNotificationConsole::onClickAdd()
|
||||
{
|
||||
LLFloaterNotificationConsole* floater = (LLFloaterNotificationConsole*)user_data;
|
||||
|
||||
std::string message_name = floater->getChild<LLComboBox>("notification_types")->getValue().asString();
|
||||
std::string message_name = getChild<LLComboBox>("notification_types")->getValue().asString();
|
||||
if (!message_name.empty())
|
||||
{
|
||||
LLNotifications::instance().add(message_name, LLSD());
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public:
|
|||
void updateResizeLimits();
|
||||
|
||||
private:
|
||||
static void onClickAdd(void* user_data);
|
||||
void onClickAdd();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -57,18 +57,61 @@
|
|||
#include "llfloatervoicedevicesettings.h"
|
||||
#include "llkeyboard.h"
|
||||
#include "llmodaldialog.h"
|
||||
#include "llpaneldisplay.h"
|
||||
#include "llpanellogin.h"
|
||||
#include "llradiogroup.h"
|
||||
#include "llsky.h"
|
||||
#include "llstylemap.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llsliderctrl.h"
|
||||
#include "lltabcontainer.h"
|
||||
#include "lltrans.h"
|
||||
#include "lltexteditor.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewercamera.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llviewermessage.h"
|
||||
#include "llviewershadermgr.h"
|
||||
#include "llvotree.h"
|
||||
#include "llvosky.h"
|
||||
|
||||
// linden library includes
|
||||
#include "llerror.h"
|
||||
#include "llfontgl.h"
|
||||
#include "llrect.h"
|
||||
#include "llstring.h"
|
||||
|
||||
// project includes
|
||||
|
||||
#include "llbutton.h"
|
||||
#include "llflexibleobject.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llresmgr.h"
|
||||
#include "llspinctrl.h"
|
||||
#include "llstartup.h"
|
||||
#include "lltextbox.h"
|
||||
|
||||
#include "llui.h"
|
||||
|
||||
#include "llviewerimage.h"
|
||||
#include "llviewerimagelist.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
|
||||
#include "llvoavatar.h"
|
||||
#include "llvovolume.h"
|
||||
#include "llwindow.h"
|
||||
#include "llworld.h"
|
||||
#include "pipeline.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llboost.h"
|
||||
|
||||
|
||||
//RN temporary includes for resolution switching
|
||||
#include "llglheaders.h"
|
||||
const F32 MAX_USER_FAR_CLIP = 512.f;
|
||||
const F32 MIN_USER_FAR_CLIP = 64.f;
|
||||
|
||||
const S32 ASPECT_RATIO_STR_LEN = 100;
|
||||
|
||||
class LLVoiceSetKeyDialog : public LLModalDialog
|
||||
{
|
||||
|
|
@ -136,6 +179,9 @@ bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response
|
|||
bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater);
|
||||
bool callback_reset_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater);
|
||||
|
||||
bool extractWindowSizeFromString(const std::string& instr, U32 &width, U32 &height);
|
||||
void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator);
|
||||
|
||||
LLMediaBase *get_web_media()
|
||||
{
|
||||
LLMediaBase *media_source;
|
||||
|
|
@ -223,8 +269,41 @@ bool callback_reset_dialogs(const LLSD& notification, const LLSD& response, LLFl
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Extract from strings of the form "<width> x <height>", e.g. "640 x 480".
|
||||
bool extractWindowSizeFromString(const std::string& instr, U32 &width, U32 &height)
|
||||
{
|
||||
using namespace boost;
|
||||
cmatch what;
|
||||
const regex expression("([0-9]+) x ([0-9]+)");
|
||||
if (regex_match(instr.c_str(), what, expression))
|
||||
{
|
||||
width = atoi(what[1].first);
|
||||
height = atoi(what[2].first);
|
||||
return true;
|
||||
}
|
||||
|
||||
width = height = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator)
|
||||
{
|
||||
numerator = 0;
|
||||
denominator = 0;
|
||||
for (F32 test_denominator = 1.f; test_denominator < 30.f; test_denominator += 1.f)
|
||||
{
|
||||
if (fmodf((decimal_val * test_denominator) + 0.01f, 1.f) < 0.02f)
|
||||
{
|
||||
numerator = llround(decimal_val * test_denominator);
|
||||
denominator = llround(test_denominator);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// static
|
||||
std::string LLFloaterPreference::sSkin = "";
|
||||
F32 LLFloaterPreference::sAspectRatio = 0.0;
|
||||
//////////////////////////////////////////////
|
||||
// LLFloaterPreference
|
||||
|
||||
|
|
@ -235,9 +314,6 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
|
|||
{
|
||||
//Build Floater is now Called from LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
|
||||
|
||||
mFactoryMap["display"] = LLCallbackMap((LLCallbackMap::callback_t)LLCallbackMap::buildPanel<LLPanelDisplay>); /// done fixing the callbacks
|
||||
|
||||
|
||||
mCommitCallbackRegistrar.add("Pref.Apply", boost::bind(&LLFloaterPreference::onBtnApply, this));
|
||||
mCommitCallbackRegistrar.add("Pref.Cancel", boost::bind(&LLFloaterPreference::onBtnCancel, this));
|
||||
mCommitCallbackRegistrar.add("Pref.OK", boost::bind(&LLFloaterPreference::onBtnOK, this));
|
||||
|
|
@ -261,9 +337,14 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
|
|||
mCommitCallbackRegistrar.add("Pref.HardwareSettings", boost::bind(&LLFloaterPreference::onOpenHardwareSettings, this));
|
||||
mCommitCallbackRegistrar.add("Pref.HardwareDefaults", boost::bind(&LLFloaterPreference::setHardwareDefaults, this));
|
||||
mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreference::onVertexShaderEnable, this));
|
||||
gSavedSkinSettings.getControl("HTMLLinkColor")->getCommitSignal()->connect(boost::bind(&handleHTMLLinkColorChanged, _2));
|
||||
//gSavedSettings.getControl("UseExternalBrowser")->getCommitSignal()->connect(boost::bind(&LLPanelPreference::handleUseExternalBrowserChanged, this));
|
||||
mCommitCallbackRegistrar.add("Pref.WindowedMod", boost::bind(&LLFloaterPreference::onCommitWindowedMode, this));
|
||||
mCommitCallbackRegistrar.add("Pref.UpdateSliderText", boost::bind(&LLFloaterPreference::onUpdateSliderText,this, _1,_2));
|
||||
mCommitCallbackRegistrar.add("Pref.AutoDetectAspect", boost::bind(&LLFloaterPreference::onCommitAutoDetectAspect, this));
|
||||
mCommitCallbackRegistrar.add("Pref.onSelectAspectRatio", boost::bind(&LLFloaterPreference::onKeystrokeAspectRatio, this));
|
||||
mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2));
|
||||
|
||||
gSavedSkinSettings.getControl("HTMLLinkColor")->getCommitSignal()->connect(boost::bind(&handleHTMLLinkColorChanged, _2));
|
||||
|
||||
}
|
||||
|
||||
BOOL LLFloaterPreference::postBuild()
|
||||
|
|
@ -271,20 +352,27 @@ BOOL LLFloaterPreference::postBuild()
|
|||
LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
|
||||
if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab")))
|
||||
tabcontainer->selectFirstTab();
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LLFloaterPreference::~LLFloaterPreference()
|
||||
{
|
||||
// clean up user data
|
||||
LLComboBox* ctrl_aspect_ratio = getChild<LLComboBox>( "aspect_ratio");
|
||||
LLComboBox* ctrl_window_size = getChild<LLComboBox>("windowsize combo");
|
||||
for (S32 i = 0; i < ctrl_aspect_ratio->getItemCount(); i++)
|
||||
{
|
||||
ctrl_aspect_ratio->setCurrentByIndex(i);
|
||||
}
|
||||
for (S32 i = 0; i < ctrl_window_size->getItemCount(); i++)
|
||||
{
|
||||
ctrl_window_size->setCurrentByIndex(i);
|
||||
}
|
||||
}
|
||||
void LLFloaterPreference::draw()
|
||||
{
|
||||
BOOL has_first_selected = (getChildRef<LLScrollListCtrl>("disabled_popups").getFirstSelected()!=NULL);
|
||||
gSavedSettings.setBOOL("FirstSelectedDisabledPopups", has_first_selected);
|
||||
|
||||
|
||||
LLFloater::draw();
|
||||
}
|
||||
|
||||
|
|
@ -368,6 +456,14 @@ void LLFloaterPreference::apply()
|
|||
}
|
||||
}
|
||||
|
||||
applyResolution();
|
||||
|
||||
// Only set window size if we're not in fullscreen mode
|
||||
if(gSavedSettings.getBOOL("NotFullScreen"))
|
||||
{
|
||||
applyWindowSize();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void LLFloaterPreference::cancel()
|
||||
|
|
@ -396,7 +492,11 @@ void LLFloaterPreference::cancel()
|
|||
{
|
||||
voice_device_settings ->cancel();
|
||||
}
|
||||
|
||||
LLFloaterReg::hideInstance("pref_voicedevicesettings");
|
||||
|
||||
gSavedSettings.setF32("FullScreenAspectRatio", sAspectRatio);
|
||||
|
||||
}
|
||||
|
||||
void LLFloaterPreference::onOpen(const LLSD& key)
|
||||
|
|
@ -517,32 +617,17 @@ void LLFloaterPreference::onChangeCustom()
|
|||
|
||||
refreshEnabledGraphics();
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// static Note:(angela) NOT touching LLPanelDisplay for this milestone (skinning-11)
|
||||
|
||||
void LLFloaterPreference::refreshEnabledGraphics()
|
||||
{
|
||||
LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
|
||||
if(instance)
|
||||
{
|
||||
LLFloaterHardwareSettings::instance()->refreshEnabledState();
|
||||
|
||||
LLTabContainer* tabcontainer = instance->getChild<LLTabContainer>("pref core");
|
||||
for (child_list_t::const_iterator iter = tabcontainer->getChildList()->begin();
|
||||
iter != tabcontainer->getChildList()->end(); ++iter)
|
||||
{
|
||||
LLView* view = *iter;
|
||||
if(!view)
|
||||
return;
|
||||
if(view->getName()=="display")
|
||||
{
|
||||
LLPanelDisplay* display_panel = dynamic_cast<LLPanelDisplay*>(view);
|
||||
if(!display_panel)
|
||||
return;
|
||||
display_panel->refreshEnabledState();
|
||||
}
|
||||
}
|
||||
instance->refreshEnabledState();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterPreference::updateMeterText(LLUICtrl* ctrl)
|
||||
{
|
||||
// get our UI widgets
|
||||
|
|
@ -693,6 +778,208 @@ void LLFloaterPreference::buildLists(void* data)
|
|||
}
|
||||
}
|
||||
|
||||
void LLFloaterPreference::refreshEnabledState()
|
||||
{
|
||||
|
||||
// disable graphics settings and exit if it's not set to custom
|
||||
if(!gSavedSettings.getBOOL("RenderCustomSettings"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLCheckBoxCtrl* ctrl_reflections = getChild<LLCheckBoxCtrl>("Reflections");
|
||||
LLRadioGroup* radio_reflection_detail = getChild<LLRadioGroup>("ReflectionDetailRadio");
|
||||
|
||||
// Reflections
|
||||
BOOL reflections = gSavedSettings.getBOOL("VertexShaderEnable")
|
||||
&& gGLManager.mHasCubeMap
|
||||
&& LLCubeMap::sUseCubeMaps;
|
||||
ctrl_reflections->setEnabled(reflections);
|
||||
|
||||
// Bump & Shiny
|
||||
bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump");
|
||||
getChild<LLCheckBoxCtrl>("BumpShiny")->setEnabled(bumpshiny ? TRUE : FALSE);
|
||||
|
||||
for (S32 i = 0; i < radio_reflection_detail->getItemCount(); ++i)
|
||||
{
|
||||
radio_reflection_detail->setIndexEnabled(i, ctrl_reflections->get() && reflections);
|
||||
}
|
||||
|
||||
// Avatar Mode
|
||||
// Enable Avatar Shaders
|
||||
LLCheckBoxCtrl* ctrl_avatar_vp = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
|
||||
// Avatar Render Mode
|
||||
LLCheckBoxCtrl* ctrl_avatar_cloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
|
||||
|
||||
S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel;
|
||||
ctrl_avatar_vp->setEnabled((max_avatar_shader > 0) ? TRUE : FALSE);
|
||||
|
||||
if (gSavedSettings.getBOOL("VertexShaderEnable") == FALSE ||
|
||||
gSavedSettings.getBOOL("RenderAvatarVP") == FALSE)
|
||||
{
|
||||
ctrl_avatar_cloth->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
ctrl_avatar_cloth->setEnabled(true);
|
||||
}
|
||||
|
||||
// Vertex Shaders
|
||||
// Global Shader Enable
|
||||
LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
|
||||
// radio set for terrain detail mode
|
||||
LLRadioGroup* mRadioTerrainDetail = getChild<LLRadioGroup>("TerrainDetailRadio"); // can be linked with control var
|
||||
|
||||
ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
|
||||
|
||||
BOOL shaders = ctrl_shader_enable->get();
|
||||
if (shaders)
|
||||
{
|
||||
mRadioTerrainDetail->setValue(1);
|
||||
mRadioTerrainDetail->setEnabled(FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
mRadioTerrainDetail->setEnabled(TRUE);
|
||||
}
|
||||
|
||||
// WindLight
|
||||
LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
|
||||
|
||||
// *HACK just checks to see if we can use shaders...
|
||||
// maybe some cards that use shaders, but don't support windlight
|
||||
ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
|
||||
// now turn off any features that are unavailable
|
||||
disableUnavailableSettings();
|
||||
}
|
||||
|
||||
void LLFloaterPreference::disableUnavailableSettings()
|
||||
{
|
||||
LLCheckBoxCtrl* ctrl_reflections = getChild<LLCheckBoxCtrl>("Reflections");
|
||||
LLCheckBoxCtrl* ctrl_avatar_vp = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
|
||||
LLCheckBoxCtrl* ctrl_avatar_cloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
|
||||
LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
|
||||
LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
|
||||
LLCheckBoxCtrl* ctrl_avatar_impostors = getChild<LLCheckBoxCtrl>("AvatarImpostors");
|
||||
|
||||
// if vertex shaders off, disable all shader related products
|
||||
if(!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"))
|
||||
{
|
||||
ctrl_shader_enable->setEnabled(FALSE);
|
||||
ctrl_shader_enable->setValue(FALSE);
|
||||
|
||||
ctrl_wind_light->setEnabled(FALSE);
|
||||
ctrl_wind_light->setValue(FALSE);
|
||||
|
||||
ctrl_reflections->setEnabled(FALSE);
|
||||
ctrl_reflections->setValue(FALSE);
|
||||
|
||||
ctrl_avatar_vp->setEnabled(FALSE);
|
||||
ctrl_avatar_vp->setValue(FALSE);
|
||||
|
||||
ctrl_avatar_cloth->setEnabled(FALSE);
|
||||
ctrl_avatar_cloth->setValue(FALSE);
|
||||
}
|
||||
|
||||
// disabled windlight
|
||||
if(!LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders"))
|
||||
{
|
||||
ctrl_wind_light->setEnabled(FALSE);
|
||||
ctrl_wind_light->setValue(FALSE);
|
||||
}
|
||||
|
||||
// disabled reflections
|
||||
if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderWaterReflections"))
|
||||
{
|
||||
ctrl_reflections->setEnabled(FALSE);
|
||||
ctrl_reflections->setValue(FALSE);
|
||||
}
|
||||
|
||||
// disabled av
|
||||
if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarVP"))
|
||||
{
|
||||
ctrl_avatar_vp->setEnabled(FALSE);
|
||||
ctrl_avatar_vp->setValue(FALSE);
|
||||
|
||||
ctrl_avatar_cloth->setEnabled(FALSE);
|
||||
ctrl_avatar_cloth->setValue(FALSE);
|
||||
}
|
||||
// disabled cloth
|
||||
if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarCloth"))
|
||||
{
|
||||
ctrl_avatar_cloth->setEnabled(FALSE);
|
||||
ctrl_avatar_cloth->setValue(FALSE);
|
||||
}
|
||||
// disabled impostors
|
||||
if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseImpostors"))
|
||||
{
|
||||
ctrl_avatar_impostors->setEnabled(FALSE);
|
||||
ctrl_avatar_impostors->setValue(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterPreference::onCommitAutoDetectAspect()
|
||||
{
|
||||
BOOL auto_detect = getChild<LLCheckBoxCtrl>("aspect_auto_detect")->get();
|
||||
F32 ratio;
|
||||
|
||||
if (auto_detect)
|
||||
{
|
||||
S32 numerator = 0;
|
||||
S32 denominator = 0;
|
||||
|
||||
// clear any aspect ratio override
|
||||
gViewerWindow->mWindow->setNativeAspectRatio(0.f);
|
||||
fractionFromDecimal(gViewerWindow->mWindow->getNativeAspectRatio(), numerator, denominator);
|
||||
|
||||
std::string aspect;
|
||||
if (numerator != 0)
|
||||
{
|
||||
aspect = llformat("%d:%d", numerator, denominator);
|
||||
}
|
||||
else
|
||||
{
|
||||
aspect = llformat("%.3f", gViewerWindow->mWindow->getNativeAspectRatio());
|
||||
}
|
||||
|
||||
getChild<LLComboBox>( "aspect_ratio")->setLabel(aspect);
|
||||
|
||||
ratio = gViewerWindow->mWindow->getNativeAspectRatio();
|
||||
gSavedSettings.setF32("FullScreenAspectRatio", ratio);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterPreference::refresh()
|
||||
{
|
||||
LLPanel::refresh();
|
||||
|
||||
// sliders and their text boxes
|
||||
// mPostProcess = gSavedSettings.getS32("RenderGlowResolutionPow");
|
||||
// slider text boxes
|
||||
updateSliderText(getChild<LLSliderCtrl>("ObjectMeshDetail"), getChild<LLTextBox>("ObjectMeshDetailText"));
|
||||
updateSliderText(getChild<LLSliderCtrl>("FlexibleMeshDetail"), getChild<LLTextBox>("FlexibleMeshDetailText"));
|
||||
updateSliderText(getChild<LLSliderCtrl>("TreeMeshDetail"), getChild<LLTextBox>("TreeMeshDetailText"));
|
||||
updateSliderText(getChild<LLSliderCtrl>("AvatarMeshDetail"), getChild<LLTextBox>("AvatarMeshDetailText"));
|
||||
updateSliderText(getChild<LLSliderCtrl>("TerrainMeshDetail"), getChild<LLTextBox>("TerrainMeshDetailText"));
|
||||
updateSliderText(getChild<LLSliderCtrl>("RenderPostProcess"), getChild<LLTextBox>("PostProcessText"));
|
||||
updateSliderText(getChild<LLSliderCtrl>("SkyMeshDetail"), getChild<LLTextBox>("SkyMeshDetailText"));
|
||||
|
||||
refreshEnabledState();
|
||||
}
|
||||
|
||||
void LLFloaterPreference::onCommitWindowedMode()
|
||||
{
|
||||
refresh();
|
||||
}
|
||||
|
||||
void LLFloaterPreference::onChangeQuality(const LLSD& data)
|
||||
{
|
||||
U32 level = (U32)(data.asReal());
|
||||
LLFeatureManager::getInstance()->setGraphicsLevel(level, true);
|
||||
refreshEnabledGraphics();
|
||||
refresh();
|
||||
}
|
||||
|
||||
// static
|
||||
// DEV-24146 - needs to be removed at a later date. jan-2009
|
||||
void LLFloaterPreference::cleanupBadSetting()
|
||||
|
|
@ -790,9 +1077,9 @@ void LLFloaterPreference::onCommitLogging()
|
|||
{
|
||||
enableHistory();
|
||||
}
|
||||
|
||||
void LLFloaterPreference::enableHistory()
|
||||
{
|
||||
|
||||
if (childGetValue("log_instant_messages").asBoolean() || childGetValue("log_chat").asBoolean())
|
||||
{
|
||||
childEnable("log_show_history");
|
||||
|
|
@ -850,6 +1137,158 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im
|
|||
|
||||
}
|
||||
|
||||
void LLFloaterPreference::onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name)
|
||||
{
|
||||
if(name.asString() =="" || !hasChild("name"))
|
||||
return;
|
||||
|
||||
LLTextBox* text_box = getChild<LLTextBox>(name.asString());
|
||||
LLSliderCtrl* slider = dynamic_cast<LLSliderCtrl*>(ctrl);
|
||||
updateSliderText(slider, text_box);
|
||||
}
|
||||
|
||||
void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box)
|
||||
{
|
||||
if(text_box == NULL || ctrl== NULL)
|
||||
return;
|
||||
|
||||
// get range and points when text should change
|
||||
F32 value = (F32)ctrl->getValue().asReal();
|
||||
F32 min = ctrl->getMinValue();
|
||||
F32 max = ctrl->getMaxValue();
|
||||
F32 range = max - min;
|
||||
llassert(range > 0);
|
||||
F32 midPoint = min + range / 3.0f;
|
||||
F32 highPoint = min + (2.0f * range / 3.0f);
|
||||
|
||||
// choose the right text
|
||||
if(value < midPoint)
|
||||
{
|
||||
text_box->setText(LLTrans::getString("GraphicsQualityLow"));
|
||||
}
|
||||
else if (value < highPoint)
|
||||
{
|
||||
text_box->setText(LLTrans::getString("GraphicsQualityMid"));
|
||||
}
|
||||
else
|
||||
{
|
||||
text_box->setText(LLTrans::getString("GraphicsQualityHigh"));
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterPreference::onKeystrokeAspectRatio()
|
||||
{
|
||||
getChild<LLCheckBoxCtrl>("aspect_auto_detect")->set(FALSE);
|
||||
}
|
||||
|
||||
void LLFloaterPreference::applyWindowSize()
|
||||
{
|
||||
LLComboBox* ctrl_windowSize = getChild<LLComboBox>("windowsize combo");
|
||||
if (ctrl_windowSize->getVisible() && (ctrl_windowSize->getCurrentIndex() != -1))
|
||||
{
|
||||
U32 width = 0;
|
||||
U32 height = 0;
|
||||
if (extractWindowSizeFromString(ctrl_windowSize->getValue().asString().c_str(), width,height))
|
||||
{
|
||||
LLViewerWindow::movieSize(width, height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterPreference::applyResolution()
|
||||
{
|
||||
LLComboBox* ctrl_aspect_ratio = getChild<LLComboBox>( "aspect_ratio");
|
||||
gGL.flush();
|
||||
char aspect_ratio_text[ASPECT_RATIO_STR_LEN]; /*Flawfinder: ignore*/
|
||||
if (ctrl_aspect_ratio->getCurrentIndex() == -1)
|
||||
{
|
||||
// *Can't pass const char* from c_str() into strtok
|
||||
strncpy(aspect_ratio_text, ctrl_aspect_ratio->getSimple().c_str(), sizeof(aspect_ratio_text) -1); /*Flawfinder: ignore*/
|
||||
aspect_ratio_text[sizeof(aspect_ratio_text) -1] = '\0';
|
||||
char *element = strtok(aspect_ratio_text, ":/\\");
|
||||
if (!element)
|
||||
{
|
||||
sAspectRatio = 0.f; // will be clamped later
|
||||
}
|
||||
else
|
||||
{
|
||||
LLLocale locale(LLLocale::USER_LOCALE);
|
||||
sAspectRatio = (F32)atof(element);
|
||||
}
|
||||
|
||||
// look for denominator
|
||||
element = strtok(NULL, ":/\\");
|
||||
if (element)
|
||||
{
|
||||
LLLocale locale(LLLocale::USER_LOCALE);
|
||||
|
||||
F32 denominator = (F32)atof(element);
|
||||
if (denominator != 0.f)
|
||||
{
|
||||
sAspectRatio /= denominator;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sAspectRatio = (F32)ctrl_aspect_ratio->getValue().asReal();
|
||||
}
|
||||
|
||||
// presumably, user entered a non-numeric value if aspect_ratio == 0.f
|
||||
if (sAspectRatio != 0.f)
|
||||
{
|
||||
sAspectRatio = llclamp(sAspectRatio, 0.2f, 5.f);
|
||||
gSavedSettings.setF32("FullScreenAspectRatio", sAspectRatio);
|
||||
}
|
||||
|
||||
// Screen resolution
|
||||
S32 num_resolutions;
|
||||
LLWindow::LLWindowResolution* supported_resolutions =
|
||||
gViewerWindow->getWindow()->getSupportedResolutions(num_resolutions);
|
||||
U32 resIndex = getChild<LLComboBox>("fullscreen combo")->getCurrentIndex();
|
||||
gSavedSettings.setS32("FullScreenWidth", supported_resolutions[resIndex].mWidth);
|
||||
gSavedSettings.setS32("FullScreenHeight", supported_resolutions[resIndex].mHeight);
|
||||
|
||||
gViewerWindow->requestResolutionUpdate(!gSavedSettings.getBOOL("NotFullScreen"));
|
||||
|
||||
send_agent_update(TRUE);
|
||||
|
||||
// Update enable/disable
|
||||
refresh();
|
||||
}
|
||||
|
||||
void LLFloaterPreference::initWindowSizeControls(LLPanel* panelp)
|
||||
{
|
||||
// Window size
|
||||
// mWindowSizeLabel = getChild<LLTextBox>("WindowSizeLabel");
|
||||
LLComboBox* ctrl_window_size = panelp->getChild<LLComboBox>("windowsize combo");
|
||||
|
||||
// Look to see if current window size matches existing window sizes, if so then
|
||||
// just set the selection value...
|
||||
const U32 height = gViewerWindow->getWindowDisplayHeight();
|
||||
const U32 width = gViewerWindow->getWindowDisplayWidth();
|
||||
for (S32 i=0; i < ctrl_window_size->getItemCount(); i++)
|
||||
{
|
||||
U32 height_test = 0;
|
||||
U32 width_test = 0;
|
||||
ctrl_window_size->setCurrentByIndex(i);
|
||||
if (extractWindowSizeFromString(ctrl_window_size->getValue().asString(), width_test, height_test))
|
||||
{
|
||||
if ((height_test == height) && (width_test == width))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ...otherwise, add a new entry with the current window height/width.
|
||||
LLUIString resolution_label = panelp->getString("resolution_format");
|
||||
resolution_label.setArg("[RES_X]", llformat("%d", width));
|
||||
resolution_label.setArg("[RES_Y]", llformat("%d", height));
|
||||
ctrl_window_size->add(resolution_label, ADD_TOP);
|
||||
ctrl_window_size->setCurrentByIndex(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static LLRegisterPanelClassWrapper<LLPanelPreference> t_places("panel_preference");
|
||||
|
|
@ -858,14 +1297,12 @@ LLPanelPreference::LLPanelPreference()
|
|||
{
|
||||
//
|
||||
mCommitCallbackRegistrar.add("setControlFalse", boost::bind(&LLPanelPreference::setControlFalse,this, _2));
|
||||
|
||||
}
|
||||
//virtual
|
||||
BOOL LLPanelPreference::postBuild()
|
||||
{
|
||||
if (hasChild("maturity_desired_combobox"))
|
||||
{
|
||||
|
||||
/////////////////////////// From LLPanelGeneral //////////////////////////
|
||||
// if we have no agent, we can't let them choose anything
|
||||
// if we have an agent, then we only let them choose if they have a choice
|
||||
|
|
@ -935,6 +1372,94 @@ BOOL LLPanelPreference::postBuild()
|
|||
childSetText("busy_response", getString("log_in_to_change"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(hasChild("fullscreen combo"))
|
||||
{
|
||||
//============================================================================
|
||||
// Resolution
|
||||
|
||||
S32 num_resolutions = 0;
|
||||
LLWindow::LLWindowResolution* supported_resolutions = gViewerWindow->getWindow()->getSupportedResolutions(num_resolutions);
|
||||
|
||||
S32 fullscreen_mode = num_resolutions - 1;
|
||||
|
||||
LLComboBox*ctrl_full_screen = getChild<LLComboBox>( "fullscreen combo");
|
||||
LLUIString resolution_label = getString("resolution_format");
|
||||
|
||||
for (S32 i = 0; i < num_resolutions; i++)
|
||||
{
|
||||
resolution_label.setArg("[RES_X]", llformat("%d", supported_resolutions[i].mWidth));
|
||||
resolution_label.setArg("[RES_Y]", llformat("%d", supported_resolutions[i].mHeight));
|
||||
ctrl_full_screen->add( resolution_label, ADD_BOTTOM );
|
||||
}
|
||||
|
||||
{
|
||||
BOOL targetFullscreen;
|
||||
S32 targetWidth;
|
||||
S32 targetHeight;
|
||||
|
||||
gViewerWindow->getTargetWindow(targetFullscreen, targetWidth, targetHeight);
|
||||
|
||||
if (targetFullscreen)
|
||||
{
|
||||
fullscreen_mode = 0; // default to 800x600
|
||||
for (S32 i = 0; i < num_resolutions; i++)
|
||||
{
|
||||
if (targetWidth == supported_resolutions[i].mWidth
|
||||
&& targetHeight == supported_resolutions[i].mHeight)
|
||||
{
|
||||
fullscreen_mode = i;
|
||||
}
|
||||
}
|
||||
ctrl_full_screen->setCurrentByIndex(fullscreen_mode);
|
||||
}
|
||||
else
|
||||
{
|
||||
// set to windowed mode
|
||||
//fullscreen_mode = mCtrlFullScreen->getItemCount() - 1;
|
||||
ctrl_full_screen->setCurrentByIndex(0);
|
||||
}
|
||||
}
|
||||
|
||||
LLFloaterPreference::initWindowSizeControls(this);
|
||||
|
||||
if (gSavedSettings.getBOOL("FullScreenAutoDetectAspectRatio"))
|
||||
{
|
||||
LLFloaterPreference::sAspectRatio = gViewerWindow->getDisplayAspectRatio();
|
||||
}
|
||||
else
|
||||
{
|
||||
LLFloaterPreference::sAspectRatio = gSavedSettings.getF32("FullScreenAspectRatio");
|
||||
}
|
||||
|
||||
getChild<LLComboBox>("aspect_ratio")->setTextEntryCallback(boost::bind(&LLPanelPreference::setControlFalse, this, LLSD("FullScreenAutoDetectAspectRatio") ));
|
||||
|
||||
|
||||
S32 numerator = 0;
|
||||
S32 denominator = 0;
|
||||
fractionFromDecimal(LLFloaterPreference::sAspectRatio, numerator, denominator);
|
||||
|
||||
LLUIString aspect_ratio_text = getString("aspect_ratio_text");
|
||||
if (numerator != 0)
|
||||
{
|
||||
aspect_ratio_text.setArg("[NUM]", llformat("%d", numerator));
|
||||
aspect_ratio_text.setArg("[DEN]", llformat("%d", denominator));
|
||||
}
|
||||
else
|
||||
{
|
||||
aspect_ratio_text = llformat("%.3f", LLFloaterPreference::sAspectRatio);
|
||||
}
|
||||
|
||||
LLComboBox* ctrl_aspect_ratio = getChild<LLComboBox>( "aspect_ratio");
|
||||
//mCtrlAspectRatio->setCommitCallback(onSelectAspectRatio, this);
|
||||
// add default aspect ratios
|
||||
ctrl_aspect_ratio->add(aspect_ratio_text, &LLFloaterPreference::sAspectRatio, ADD_TOP);
|
||||
ctrl_aspect_ratio->setCurrentByIndex(0);
|
||||
|
||||
refresh();
|
||||
}
|
||||
|
||||
apply();
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,12 +43,22 @@
|
|||
|
||||
class LLPanelPreference;
|
||||
class LLPanelLCD;
|
||||
class LLPanelDisplay;
|
||||
class LLPanelDebug;
|
||||
class LLMessageSystem;
|
||||
class LLScrollListCtrl;
|
||||
|
||||
class LLSliderCtrl;
|
||||
class LLSD;
|
||||
class LLTextBox;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GS_LOW_GRAPHICS,
|
||||
GS_MID_GRAPHICS,
|
||||
GS_HIGH_GRAPHICS,
|
||||
GS_ULTRA_GRAPHICS
|
||||
|
||||
} EGraphicsSettings;
|
||||
|
||||
|
||||
// Floater to control preferences (display, audio, bandwidth, general.
|
||||
class LLFloaterPreference : public LLFloater
|
||||
|
|
@ -88,6 +98,8 @@ protected:
|
|||
void setHardwareDefaults();
|
||||
// callback for when client turns on shaders
|
||||
void onVertexShaderEnable();
|
||||
|
||||
|
||||
public:
|
||||
|
||||
void onClickSetCache();
|
||||
|
|
@ -106,11 +118,29 @@ public:
|
|||
void enableHistory();
|
||||
void onCommitLogging();
|
||||
void setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email);
|
||||
void refreshEnabledState();
|
||||
void disableUnavailableSettings();
|
||||
void onCommitWindowedMode();
|
||||
void refresh(); // Refresh enable/disable
|
||||
// if the quality radio buttons are changed
|
||||
void onChangeQuality(const LLSD& data);
|
||||
|
||||
void updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box);
|
||||
void onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name);
|
||||
void onKeystrokeAspectRatio();
|
||||
// void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator);
|
||||
// bool extractWindowSizeFromString(const std::string& instr, U32 &width, U32 &height);
|
||||
|
||||
void onCommitAutoDetectAspect();
|
||||
void applyResolution();
|
||||
void applyWindowSize();
|
||||
|
||||
static void initWindowSizeControls(LLPanel* panelp);
|
||||
|
||||
static void buildLists(void* data);
|
||||
static void refreshSkin(void* data);
|
||||
static void cleanupBadSetting();
|
||||
|
||||
static F32 sAspectRatio;
|
||||
private:
|
||||
static std::string sSkin;
|
||||
bool mGotPersonalInfo;
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ BOOL LLFloaterReporter::postBuild()
|
|||
LLLineEditor* le = getChild<LLLineEditor>("abuser_name_edit");
|
||||
le->setEnabled( FALSE );
|
||||
|
||||
setPosBox(mPosition.getValue());
|
||||
setPosBox((LLVector3d)mPosition.getValue());
|
||||
LLButton* pick_btn = getChild<LLButton>("pick_btn");
|
||||
pick_btn->setImages(std::string("tool_face.tga"),
|
||||
std::string("tool_face_active.tga") );
|
||||
|
|
|
|||
|
|
@ -44,7 +44,11 @@
|
|||
LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key)
|
||||
: LLFloater(key)
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_settings_debug.xml");
|
||||
//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_settings_debug.xml");
|
||||
mCommitCallbackRegistrar.add("SettingSelect", boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this,_1));
|
||||
mCommitCallbackRegistrar.add("CommitSettings", boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this));
|
||||
mCommitCallbackRegistrar.add("ClickDefault", boost::bind(&LLFloaterSettingsDebug::onClickDefault, this));
|
||||
|
||||
}
|
||||
|
||||
LLFloaterSettingsDebug::~LLFloaterSettingsDebug()
|
||||
|
|
@ -82,17 +86,7 @@ BOOL LLFloaterSettingsDebug::postBuild()
|
|||
}
|
||||
|
||||
settings_combo->sortByName();
|
||||
settings_combo->setCommitCallback(onSettingSelect, this);
|
||||
settings_combo->updateSelection();
|
||||
|
||||
childSetCommitCallback("val_spinner_1", onCommitSettings, this);
|
||||
childSetCommitCallback("val_spinner_2", onCommitSettings, this);
|
||||
childSetCommitCallback("val_spinner_3", onCommitSettings, this);
|
||||
childSetCommitCallback("val_spinner_4", onCommitSettings, this);
|
||||
childSetCommitCallback("val_text", onCommitSettings, this);
|
||||
childSetCommitCallback("boolean_combo", onCommitSettings, this);
|
||||
childSetCommitCallback("color_swatch", onCommitSettings, this);
|
||||
childSetAction("default_btn", onClickDefault, this);
|
||||
mComment = getChild<LLTextEditor>("comment_text");
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -107,21 +101,17 @@ void LLFloaterSettingsDebug::draw()
|
|||
}
|
||||
|
||||
//static
|
||||
void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl, void* user_data)
|
||||
void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl)
|
||||
{
|
||||
LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data;
|
||||
LLComboBox* combo_box = (LLComboBox*)ctrl;
|
||||
LLControlVariable* controlp = (LLControlVariable*)combo_box->getCurrentUserdata();
|
||||
|
||||
floaterp->updateControl(controlp);
|
||||
updateControl(controlp);
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data)
|
||||
void LLFloaterSettingsDebug::onCommitSettings()
|
||||
{
|
||||
LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data;
|
||||
|
||||
LLComboBox* settings_combo = floaterp->getChild<LLComboBox>("settings_combo");
|
||||
LLComboBox* settings_combo = getChild<LLComboBox>("settings_combo");
|
||||
LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata();
|
||||
|
||||
LLVector3 vector;
|
||||
|
|
@ -135,46 +125,46 @@ void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data)
|
|||
switch(controlp->type())
|
||||
{
|
||||
case TYPE_U32:
|
||||
controlp->set(floaterp->childGetValue("val_spinner_1"));
|
||||
controlp->set(childGetValue("val_spinner_1"));
|
||||
break;
|
||||
case TYPE_S32:
|
||||
controlp->set(floaterp->childGetValue("val_spinner_1"));
|
||||
controlp->set(childGetValue("val_spinner_1"));
|
||||
break;
|
||||
case TYPE_F32:
|
||||
controlp->set(LLSD(floaterp->childGetValue("val_spinner_1").asReal()));
|
||||
controlp->set(LLSD(childGetValue("val_spinner_1").asReal()));
|
||||
break;
|
||||
case TYPE_BOOLEAN:
|
||||
controlp->set(floaterp->childGetValue("boolean_combo"));
|
||||
controlp->set(childGetValue("boolean_combo"));
|
||||
break;
|
||||
case TYPE_STRING:
|
||||
controlp->set(LLSD(floaterp->childGetValue("val_text").asString()));
|
||||
controlp->set(LLSD(childGetValue("val_text").asString()));
|
||||
break;
|
||||
case TYPE_VEC3:
|
||||
vector.mV[VX] = (F32)floaterp->childGetValue("val_spinner_1").asReal();
|
||||
vector.mV[VY] = (F32)floaterp->childGetValue("val_spinner_2").asReal();
|
||||
vector.mV[VZ] = (F32)floaterp->childGetValue("val_spinner_3").asReal();
|
||||
vector.mV[VX] = (F32)childGetValue("val_spinner_1").asReal();
|
||||
vector.mV[VY] = (F32)childGetValue("val_spinner_2").asReal();
|
||||
vector.mV[VZ] = (F32)childGetValue("val_spinner_3").asReal();
|
||||
controlp->set(vector.getValue());
|
||||
break;
|
||||
case TYPE_VEC3D:
|
||||
vectord.mdV[VX] = floaterp->childGetValue("val_spinner_1").asReal();
|
||||
vectord.mdV[VY] = floaterp->childGetValue("val_spinner_2").asReal();
|
||||
vectord.mdV[VZ] = floaterp->childGetValue("val_spinner_3").asReal();
|
||||
vectord.mdV[VX] = childGetValue("val_spinner_1").asReal();
|
||||
vectord.mdV[VY] = childGetValue("val_spinner_2").asReal();
|
||||
vectord.mdV[VZ] = childGetValue("val_spinner_3").asReal();
|
||||
controlp->set(vectord.getValue());
|
||||
break;
|
||||
case TYPE_RECT:
|
||||
rect.mLeft = floaterp->childGetValue("val_spinner_1").asInteger();
|
||||
rect.mRight = floaterp->childGetValue("val_spinner_2").asInteger();
|
||||
rect.mBottom = floaterp->childGetValue("val_spinner_3").asInteger();
|
||||
rect.mTop = floaterp->childGetValue("val_spinner_4").asInteger();
|
||||
rect.mLeft = childGetValue("val_spinner_1").asInteger();
|
||||
rect.mRight = childGetValue("val_spinner_2").asInteger();
|
||||
rect.mBottom = childGetValue("val_spinner_3").asInteger();
|
||||
rect.mTop = childGetValue("val_spinner_4").asInteger();
|
||||
controlp->set(rect.getValue());
|
||||
break;
|
||||
case TYPE_COL4:
|
||||
col3.setValue(floaterp->childGetValue("color_swatch"));
|
||||
col4 = LLColor4(col3, (F32)floaterp->childGetValue("val_spinner_4").asReal());
|
||||
col3.setValue(childGetValue("val_color_swatch"));
|
||||
col4 = LLColor4(col3, (F32)childGetValue("val_spinner_4").asReal());
|
||||
controlp->set(col4.getValue());
|
||||
break;
|
||||
case TYPE_COL3:
|
||||
controlp->set(floaterp->childGetValue("color_swatch"));
|
||||
controlp->set(childGetValue("val_color_swatch"));
|
||||
//col3.mV[VRED] = (F32)floaterp->childGetValue("val_spinner_1").asC();
|
||||
//col3.mV[VGREEN] = (F32)floaterp->childGetValue("val_spinner_2").asReal();
|
||||
//col3.mV[VBLUE] = (F32)floaterp->childGetValue("val_spinner_3").asReal();
|
||||
|
|
@ -186,16 +176,15 @@ void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data)
|
|||
}
|
||||
|
||||
// static
|
||||
void LLFloaterSettingsDebug::onClickDefault(void* user_data)
|
||||
void LLFloaterSettingsDebug::onClickDefault()
|
||||
{
|
||||
LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data;
|
||||
LLComboBox* settings_combo = floaterp->getChild<LLComboBox>("settings_combo");
|
||||
LLComboBox* settings_combo = getChild<LLComboBox>("settings_combo");
|
||||
LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata();
|
||||
|
||||
if (controlp)
|
||||
{
|
||||
controlp->resetToDefault();
|
||||
floaterp->updateControl(controlp);
|
||||
updateControl(controlp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -206,7 +195,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
|
|||
LLSpinCtrl* spinner2 = getChild<LLSpinCtrl>("val_spinner_2");
|
||||
LLSpinCtrl* spinner3 = getChild<LLSpinCtrl>("val_spinner_3");
|
||||
LLSpinCtrl* spinner4 = getChild<LLSpinCtrl>("val_spinner_4");
|
||||
LLColorSwatchCtrl* color_swatch = getChild<LLColorSwatchCtrl>("color_swatch");
|
||||
LLColorSwatchCtrl* color_swatch = getChild<LLColorSwatchCtrl>("val_color_swatch");
|
||||
|
||||
if (!spinner1 || !spinner2 || !spinner3 || !spinner4 || !color_swatch)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@ public:
|
|||
|
||||
void updateControl(LLControlVariable* control);
|
||||
|
||||
static void onSettingSelect(LLUICtrl* ctrl, void* user_data);
|
||||
static void onCommitSettings(LLUICtrl* ctrl, void* user_data);
|
||||
static void onClickDefault(void* user_data);
|
||||
void onSettingSelect(LLUICtrl* ctrl);
|
||||
void onCommitSettings();
|
||||
void onClickDefault();
|
||||
|
||||
protected:
|
||||
LLTextEditor* mComment;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
#include "lldraghandle.h"
|
||||
#include "llfloaterbuildoptions.h"
|
||||
#include "llfloateropenobject.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "llmenugl.h"
|
||||
#include "llpanelcontents.h"
|
||||
|
|
@ -952,7 +953,7 @@ void LLFloaterTools::setObjectType( LLPCode pcode )
|
|||
void LLFloaterTools::onClickGridOptions(void* data)
|
||||
{
|
||||
//LLFloaterTools* floaterp = (LLFloaterTools*)data;
|
||||
LLFloaterBuildOptions::showInstance();
|
||||
LLFloaterReg::showInstance("build_options");
|
||||
// RN: this makes grid options dependent on build tools window
|
||||
//floaterp->addDependentFloater(LLFloaterBuildOptions::getInstance(), FALSE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ const S32 ICON_WIDTH = 16;
|
|||
const S32 TEXT_PAD = 1;
|
||||
const S32 ARROW_SIZE = 12;
|
||||
const S32 RENAME_WIDTH_PAD = 4;
|
||||
const S32 RENAME_HEIGHT_PAD = 6;
|
||||
const S32 RENAME_HEIGHT_PAD = 2;
|
||||
const S32 AUTO_OPEN_STACK_DEPTH = 16;
|
||||
const S32 MIN_ITEM_WIDTH_VISIBLE = ICON_WIDTH + ICON_PAD + ARROW_SIZE + TEXT_PAD + /*first few characters*/ 40;
|
||||
const S32 MINIMUM_RENAMER_WIDTH = 80;
|
||||
|
|
@ -2560,7 +2560,7 @@ LLFolderView::LLFolderView(const Params& p)
|
|||
LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory.xml", gMenuHolder);
|
||||
if (!menu)
|
||||
{
|
||||
menu = LLUICtrlFactory::createDummyWidget<LLMenuGL>("inventory_menu");
|
||||
menu = LLUICtrlFactory::getDefaultWidget<LLMenuGL>("inventory_menu");
|
||||
}
|
||||
menu->setBackgroundColor(gSavedSkinSettings.getColor("MenuPopupBgColor"));
|
||||
mPopupMenuHandle = menu->getHandle();
|
||||
|
|
@ -2772,6 +2772,9 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen
|
|||
reshape( llmax(min_width, total_width), running_height );
|
||||
}
|
||||
|
||||
// move item renamer text field to item's new position
|
||||
updateRenamerPosition();
|
||||
|
||||
mTargetHeight = (F32)target_height;
|
||||
return llround(mTargetHeight);
|
||||
}
|
||||
|
|
@ -3620,23 +3623,8 @@ void LLFolderView::startRenamingSelectedItem( void )
|
|||
{
|
||||
mRenameItem = item;
|
||||
|
||||
S32 x = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD - 1 + item->getIndentation();
|
||||
S32 y = llfloor(item->getRect().getHeight()-sFont->getLineHeight()-2);
|
||||
item->localPointToScreen( x, y, &x, &y );
|
||||
screenPointToLocal( x, y, &x, &y );
|
||||
mRenamer->setOrigin( x, y );
|
||||
updateRenamerPosition();
|
||||
|
||||
S32 scroller_height = 0;
|
||||
S32 scroller_width = gViewerWindow->getWindowWidth();
|
||||
BOOL dummy_bool;
|
||||
if (mScrollContainer)
|
||||
{
|
||||
mScrollContainer->calcVisibleSize( &scroller_width, &scroller_height, &dummy_bool, &dummy_bool);
|
||||
}
|
||||
|
||||
S32 width = llmax(llmin(item->getRect().getWidth() - x, scroller_width - x - getRect().mLeft), MINIMUM_RENAMER_WIDTH);
|
||||
S32 height = llfloor(sFont->getLineHeight() + RENAME_HEIGHT_PAD);
|
||||
mRenamer->reshape( width, height, TRUE );
|
||||
|
||||
mRenamer->setText(item->getName());
|
||||
mRenamer->selectAll();
|
||||
|
|
@ -4386,6 +4374,31 @@ void LLFolderView::dumpSelectionInformation()
|
|||
llinfos << "****************************************" << llendl;
|
||||
}
|
||||
|
||||
void LLFolderView::updateRenamerPosition()
|
||||
{
|
||||
if(mRenameItem)
|
||||
{
|
||||
S32 x = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD - 1 + mRenameItem->getIndentation();
|
||||
S32 y = llfloor(mRenameItem->getRect().getHeight()-sFont->getLineHeight()-2);
|
||||
mRenameItem->localPointToScreen( x, y, &x, &y );
|
||||
screenPointToLocal( x, y, &x, &y );
|
||||
mRenamer->setOrigin( x, y );
|
||||
|
||||
S32 scroller_height = 0;
|
||||
S32 scroller_width = gViewerWindow->getWindowWidth();
|
||||
BOOL dummy_bool;
|
||||
if (mScrollContainer)
|
||||
{
|
||||
mScrollContainer->calcVisibleSize( &scroller_width, &scroller_height, &dummy_bool, &dummy_bool);
|
||||
}
|
||||
|
||||
S32 width = llmax(llmin(mRenameItem->getRect().getWidth() - x, scroller_width - x - getRect().mLeft), MINIMUM_RENAMER_WIDTH);
|
||||
S32 height = llfloor(sFont->getLineHeight() + RENAME_HEIGHT_PAD);
|
||||
mRenamer->reshape( width, height, TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Local function definitions
|
||||
///----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -915,6 +915,9 @@ public:
|
|||
// DEBUG only
|
||||
void dumpSelectionInformation();
|
||||
|
||||
private:
|
||||
void updateRenamerPosition();
|
||||
|
||||
protected:
|
||||
LLScrollContainer* mScrollContainer; // NULL if this is not a child of a scroll container.
|
||||
|
||||
|
|
|
|||
|
|
@ -426,7 +426,9 @@ void LLLocationInputCtrl::rebuildLocationHistory(std::string filter)
|
|||
LLLocationHistory* lh = LLLocationHistory::getInstance();
|
||||
|
||||
if (filter.empty())
|
||||
{
|
||||
itemsp = &lh->getItems();
|
||||
}
|
||||
else
|
||||
{
|
||||
lh->getMatchingItems(filter, filtered_items);
|
||||
|
|
@ -435,7 +437,9 @@ void LLLocationInputCtrl::rebuildLocationHistory(std::string filter)
|
|||
|
||||
removeall();
|
||||
for (LLLocationHistory::location_list_t::const_reverse_iterator it = itemsp->rbegin(); it != itemsp->rend(); it++)
|
||||
{
|
||||
add(*it);
|
||||
}
|
||||
}
|
||||
|
||||
void LLLocationInputCtrl::focusTextEntry()
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@ public:
|
|||
|
||||
struct NameColumn : public LLInitParam::Choice<NameColumn>
|
||||
{
|
||||
Option<S32> column_index;
|
||||
Option<std::string> column_name;
|
||||
Alternative<S32> column_index;
|
||||
Alternative<std::string> column_name;
|
||||
NameColumn()
|
||||
: column_name("name_column"),
|
||||
column_index("name_column_index", 0)
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ static std::string PANEL_PROFILE = "panel_profile";
|
|||
static std::string PANEL_PICKS = "panel_picks";
|
||||
static std::string PANEL_NOTES = "panel_notes";
|
||||
|
||||
LLPanelProfileView::LLPanelProfileView(const LLPanel::Params& p)
|
||||
: LLPanel(p)
|
||||
LLPanelProfileView::LLPanelProfileView()
|
||||
: LLPanel()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class LLPanelProfileView : public LLPanel
|
|||
friend class LLUICtrlFactory;
|
||||
|
||||
public:
|
||||
LLPanelProfileView(const LLPanel::Params& p = defaultParams());
|
||||
LLPanelProfileView();
|
||||
|
||||
~LLPanelProfileView(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -92,15 +92,8 @@ void LLTeleportHistoryPanel::onShowOnMap()
|
|||
|
||||
S32 index = itemp->getColumn(LIST_INDEX)->getValue().asInteger();
|
||||
|
||||
const LLTeleportHistory::slurl_list_t& hist_items = mTeleportHistory->getItems();
|
||||
|
||||
LLVector3d global_pos = hist_items[index].mGlobalPos;
|
||||
|
||||
if (!global_pos.isExactlyZero())
|
||||
{
|
||||
LLFloaterWorldMap::getInstance()->trackLocation(global_pos);
|
||||
LLFloaterReg::showInstance("world_map", "center");
|
||||
}
|
||||
// teleport to existing item in history, so we don't add it again
|
||||
mTeleportHistory->goToItem(index);
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
|
|||
|
|
@ -732,7 +732,7 @@ void LLStatusBar::onClickSearch(void* data)
|
|||
// static
|
||||
void LLStatusBar::onClickStatGraph(void* data)
|
||||
{
|
||||
LLFloaterLagMeter::showInstance();
|
||||
LLFloaterReg::showInstance("lagmeter");
|
||||
}
|
||||
|
||||
BOOL can_afford_transaction(S32 cost)
|
||||
|
|
|
|||
|
|
@ -39,20 +39,26 @@
|
|||
|
||||
#include "llcompilequeue.h"
|
||||
#include "llfloaterabout.h"
|
||||
#include "llfloaterauction.h"
|
||||
#include "llfloateraddlandmark.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloaterbuildoptions.h"
|
||||
#include "llfloaterbump.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfloaterchatterbox.h"
|
||||
#include "llfloaterdirectory.h"
|
||||
#include "llfloaterjoystick.h"
|
||||
#include "llfloatervoicedevicesettings.h"
|
||||
#include "llfloaternotificationsconsole.h"
|
||||
#include "llfloaterlagmeter.h"
|
||||
#include "llfloatermap.h"
|
||||
#include "llfloatermemleak.h"
|
||||
#include "llfloatermute.h"
|
||||
#include "llfloaterpreference.h"
|
||||
#include "llfloatersnapshot.h"
|
||||
#include "llfloatersettingsdebug.h"
|
||||
#include "llfloatertools.h"
|
||||
#include "llfloateruipreview.h"
|
||||
#include "llfloatervoicedevicesettings.h"
|
||||
#include "llfloaterworldmap.h"
|
||||
#include "llinventoryview.h"
|
||||
#include "llnearbychathistory.h"
|
||||
|
|
@ -80,6 +86,13 @@ void LLViewerFloaterReg::registerFloaters()
|
|||
LLFloaterReg::add("add_landmark", "floater_add_landmark.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAddLandmark>);
|
||||
LLFloaterReg::add("mute", "floater_mute.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMute>);
|
||||
|
||||
LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
|
||||
LLFloaterReg::add("build_options", "floater_build_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBuildOptions>);
|
||||
LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBump>);
|
||||
LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationConsole>);
|
||||
LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>);
|
||||
LLFloaterReg::add("lagmeter", "floater_lagmeter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLagMeter>);
|
||||
|
||||
LLFloaterReg::add("ui_preview", "floater_ui_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterUIPreview>);
|
||||
LLFloaterReg::add("test_widgets", "floater_test_widgets.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>);
|
||||
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@
|
|||
#include "llfloaterperms.h"
|
||||
#include "llfloaterpostprocess.h"
|
||||
#include "llfloaterpreference.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llfloaterregioninfo.h"
|
||||
#include "llfloaterreporter.h"
|
||||
#include "llfloaterscriptdebug.h"
|
||||
|
|
@ -613,7 +614,8 @@ class LLAdvancedToggleConsole : public view_listener_t
|
|||
#endif
|
||||
else if ("notifications" == console_type)
|
||||
{
|
||||
LLFloaterNotificationConsole::showInstance();
|
||||
//LLFloaterNotificationConsole::showInstance();
|
||||
LLFloaterReg::showInstance("notifications_console");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -2145,7 +2147,8 @@ class LLAdvancedShowDebugSettings : public view_listener_t
|
|||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
LLFloaterSettingsDebug::showInstance(userdata);
|
||||
// LLFloaterSettingsDebug::showInstance(userdata);
|
||||
LLFloaterReg::showInstance("settings_debug",userdata);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
@ -5649,7 +5652,7 @@ class LLShowFloater : public view_listener_t
|
|||
}
|
||||
else if (floater_name == "grid options")
|
||||
{
|
||||
LLFloaterBuildOptions::showInstance();
|
||||
LLFloaterReg::showInstance("build_options");
|
||||
}
|
||||
else if (floater_name == "script errors")
|
||||
{
|
||||
|
|
@ -5673,12 +5676,13 @@ class LLShowFloater : public view_listener_t
|
|||
{
|
||||
if (!gNoRender)
|
||||
{
|
||||
LLFloaterBump::showInstance();
|
||||
//LLFloaterBump::showInstance();
|
||||
LLFloaterReg::showInstance("bumps");
|
||||
}
|
||||
}
|
||||
else if (floater_name == "lag meter")
|
||||
{
|
||||
LLFloaterLagMeter::showInstance();
|
||||
LLFloaterReg::showInstance("lagmeter");
|
||||
}
|
||||
else if (floater_name == "buy currency")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4395,8 +4395,8 @@ void handle_show_mean_events(void *)
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLFloaterBump::showInstance();
|
||||
LLFloaterReg::showInstance("bumps");
|
||||
//LLFloaterBump::showInstance();
|
||||
}
|
||||
|
||||
void mean_name_callback(const LLUUID &id, const std::string& first, const std::string& last, BOOL always_false)
|
||||
|
|
|
|||
|
|
@ -2131,7 +2131,8 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
|
|||
&& (MASK_CONTROL & mask)
|
||||
&& ('5' == key))
|
||||
{
|
||||
LLFloaterNotificationConsole::showInstance();
|
||||
//LLFloaterNotificationConsole::showInstance();
|
||||
LLFloaterReg::showInstance("notifications_console");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -2428,51 +2429,59 @@ void LLViewerWindow::updateUI()
|
|||
root_view = mRootView;
|
||||
}
|
||||
|
||||
// walk UI tree in depth-first order
|
||||
LLView::tree_iterator_t end_it;
|
||||
for (LLView::tree_iterator_t it = root_view->beginTree();
|
||||
it != end_it;
|
||||
++it)
|
||||
{
|
||||
LLView* viewp = *it;
|
||||
// calculating the screen rect involves traversing the parent, so this is less than optimal
|
||||
if (!viewp->getVisible()
|
||||
|| !viewp->calcScreenBoundingRect().pointInRect(x, y))
|
||||
{
|
||||
// skip this view and all of its children
|
||||
it.skipDescendants();
|
||||
continue;
|
||||
}
|
||||
|
||||
// if this view is mouse opaque, nothing behind it should be in mouse_hover_set
|
||||
if (viewp->getMouseOpaque())
|
||||
{
|
||||
// constrain further iteration to children of this widget
|
||||
it = viewp->beginTree();
|
||||
}
|
||||
|
||||
// we have a view that contains the mouse, add it to the set
|
||||
mouse_hover_set.insert(viewp->getHandle());
|
||||
}
|
||||
|
||||
// now do the same aggregation for the "top" ctrl, whose parent does not necessarily contain the mouse
|
||||
if (top_ctrl)
|
||||
// aggregate visible views that contain mouse cursor in display order
|
||||
|
||||
// while the top_ctrl contains the mouse cursor, only it and its descendants will receive onMouseEnter events
|
||||
if (top_ctrl && top_ctrl->calcScreenBoundingRect().pointInRect(x, y))
|
||||
{
|
||||
// iterator over contents of top_ctrl, and throw into mouse_hover_set
|
||||
for (LLView::tree_iterator_t it = top_ctrl->beginTree();
|
||||
it != root_view->endTree();
|
||||
it != top_ctrl->endTree();
|
||||
++it)
|
||||
{
|
||||
LLView* viewp = *it;
|
||||
if (!viewp->getVisible()
|
||||
|| !viewp->calcScreenBoundingRect().pointInRect(x, y))
|
||||
if (viewp->getVisible()
|
||||
&& viewp->calcScreenBoundingRect().pointInRect(x, y))
|
||||
{
|
||||
// we have a view that contains the mouse, add it to the set
|
||||
mouse_hover_set.insert(viewp->getHandle());
|
||||
}
|
||||
else
|
||||
{
|
||||
// skip this view and all of its children
|
||||
it.skipDescendants();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// walk UI tree in depth-first order
|
||||
LLView::tree_iterator_t end_it;
|
||||
for (LLView::tree_iterator_t it = root_view->beginTree();
|
||||
it != end_it;
|
||||
++it)
|
||||
{
|
||||
LLView* viewp = *it;
|
||||
// calculating the screen rect involves traversing the parent, so this is less than optimal
|
||||
if (viewp->getVisible()
|
||||
&& viewp->calcScreenBoundingRect().pointInRect(x, y))
|
||||
{
|
||||
|
||||
// we have a view that contains the mouse, add it to the set
|
||||
mouse_hover_set.insert(viewp->getHandle());
|
||||
// if this view is mouse opaque, nothing behind it should be in mouse_hover_set
|
||||
if (viewp->getMouseOpaque())
|
||||
{
|
||||
// constrain further iteration to children of this widget
|
||||
it = viewp->beginTree();
|
||||
}
|
||||
|
||||
// we have a view that contains the mouse, add it to the set
|
||||
mouse_hover_set.insert(viewp->getHandle());
|
||||
}
|
||||
else
|
||||
{
|
||||
// skip this view and all of its children
|
||||
it.skipDescendants();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2898,11 +2907,25 @@ void LLViewerWindow::updateWorldViewRect()
|
|||
if (!LLSideTray::instanceCreated()) return;
|
||||
|
||||
LLRect new_world_rect = mWindowRect;
|
||||
|
||||
// pull in right side of world view based on sidetray
|
||||
LLSideTray* sidetray = LLSideTray::getInstance();
|
||||
if (sidetray->getVisible())
|
||||
{
|
||||
new_world_rect.mRight -= llround((F32)sidetray->getTrayWidth() * mDisplayScale.mV[VX]);
|
||||
}
|
||||
|
||||
// push top of world view below nav bar
|
||||
if (LLNavigationBar::getInstance()->getVisible())
|
||||
{
|
||||
LLNavigationBar* barp = LLNavigationBar::getInstance();
|
||||
LLRect nav_bar_rect;
|
||||
if(barp->localRectToOtherView(barp->getLocalRect(), &nav_bar_rect, mRootView))
|
||||
{
|
||||
new_world_rect.mTop = llround((F32)LLNavigationBar::getInstance()->getRect().mBottom * mDisplayScale.mV[VY]);
|
||||
}
|
||||
}
|
||||
|
||||
if (mWorldViewRect != new_world_rect)
|
||||
{
|
||||
mWorldViewRect = new_world_rect;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
top_pad="12"
|
||||
width="400" />
|
||||
<check_box
|
||||
control_name="AuctionShowFence"
|
||||
follows="left|bottom"
|
||||
height="16"
|
||||
initial_value="true"
|
||||
|
|
@ -47,7 +48,10 @@
|
|||
left_delta="0"
|
||||
name="snapshot_btn"
|
||||
top_pad="4"
|
||||
width="96" />
|
||||
width="96" >
|
||||
<button.commit_callback
|
||||
function="ClickSnapshot" />
|
||||
</button>
|
||||
<button
|
||||
follows="left|bottom"
|
||||
height="20"
|
||||
|
|
@ -57,5 +61,8 @@
|
|||
left_pad="4"
|
||||
name="ok_btn"
|
||||
top_delta="0"
|
||||
width="48" />
|
||||
width="48">
|
||||
<button.commit_callback
|
||||
function="ClickOK" />
|
||||
</button>
|
||||
</floater>
|
||||
|
|
|
|||
|
|
@ -64,17 +64,17 @@
|
|||
left_delta="0"
|
||||
name="Edit"
|
||||
top_pad="4"
|
||||
width="132" />
|
||||
width="50" />
|
||||
<button
|
||||
follows="top|right"
|
||||
height="20"
|
||||
label="Find"
|
||||
label_selected="Find"
|
||||
layout="topleft"
|
||||
left_pad="30"
|
||||
left_pad="5"
|
||||
name="Find"
|
||||
top_delta="-1"
|
||||
width="95" />
|
||||
width="62" />
|
||||
<scroll_list
|
||||
follows="left|top|right|bottom"
|
||||
height="90"
|
||||
|
|
@ -196,12 +196,12 @@
|
|||
top="324"
|
||||
width="95" />
|
||||
<button
|
||||
follows="left|bottom"
|
||||
follows="right|bottom"
|
||||
height="20"
|
||||
label="Cancel"
|
||||
label_selected="Cancel"
|
||||
layout="topleft"
|
||||
left_pad="70"
|
||||
right="-10"
|
||||
name="Cancel"
|
||||
top_delta="0"
|
||||
width="95" />
|
||||
|
|
|
|||
|
|
@ -201,6 +201,7 @@
|
|||
Client:
|
||||
</text>
|
||||
<text
|
||||
make_visible_control="LagMeterShrunk"
|
||||
type="string"
|
||||
length="1"
|
||||
bottom="40"
|
||||
|
|
@ -214,6 +215,7 @@
|
|||
Normal
|
||||
</text>
|
||||
<text
|
||||
make_visible_control="LagMeterShrunk"
|
||||
bottom="56"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
|
|
@ -248,6 +250,7 @@
|
|||
Network:
|
||||
</text>
|
||||
<text
|
||||
make_visible_control="LagMeterShrunk"
|
||||
type="string"
|
||||
length="1"
|
||||
bottom="80"
|
||||
|
|
@ -261,6 +264,7 @@
|
|||
Normal
|
||||
</text>
|
||||
<text
|
||||
make_visible_control="LagMeterShrunk"
|
||||
bottom="96"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
|
|
@ -295,6 +299,7 @@
|
|||
Server:
|
||||
</text>
|
||||
<text
|
||||
make_visible_control="LagMeterShrunk"
|
||||
type="string"
|
||||
length="1"
|
||||
bottom="120"
|
||||
|
|
@ -308,6 +313,7 @@
|
|||
Normal
|
||||
</text>
|
||||
<text
|
||||
make_visible_control="LagMeterShrunk"
|
||||
bottom="136"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
|
|
@ -333,5 +339,8 @@
|
|||
left_delta="-317"
|
||||
name="minimize"
|
||||
top_delta="-2"
|
||||
width="25" />
|
||||
width="25">
|
||||
<button.commit_callback
|
||||
function="LagMeter.ClickShrink" />
|
||||
</button>
|
||||
</floater>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,10 @@
|
|||
left_pad="3"
|
||||
name="add_notification"
|
||||
top_delta="0"
|
||||
width="50" />
|
||||
width="50" >
|
||||
<button.commit_callback
|
||||
function="ClickAdd" />
|
||||
</button>
|
||||
<layout_stack
|
||||
bottom="495"
|
||||
follows="left|right|top|bottom"
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@
|
|||
layout="topleft"
|
||||
name="web" />
|
||||
<panel
|
||||
class="panel_preference"
|
||||
filename="panel_preferences_graphics1.xml"
|
||||
label="Graphics"
|
||||
layout="topleft"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,10 @@
|
|||
max_chars="255"
|
||||
name="settings_combo"
|
||||
top="30"
|
||||
width="200" />
|
||||
width="200">
|
||||
<combo_box.commit_callback
|
||||
function="SettingSelect" />
|
||||
</combo_box>
|
||||
<text_editor
|
||||
enabled="false"
|
||||
height="60"
|
||||
|
|
@ -41,6 +44,8 @@
|
|||
<combo_box.item
|
||||
label="FALSE"
|
||||
value="" />
|
||||
<combo_box.commit_callback
|
||||
function="CommitSettings" />
|
||||
</combo_box>
|
||||
<line_editor
|
||||
height="20"
|
||||
|
|
@ -49,14 +54,21 @@
|
|||
name="val_text"
|
||||
top_delta="0"
|
||||
visible="false"
|
||||
width="300" />
|
||||
width="300" >
|
||||
<line_editor.commit_callback
|
||||
function="CommitSettings" />
|
||||
</line_editor>
|
||||
<color_swatch
|
||||
bottom="185"
|
||||
can_apply_immediately="true"
|
||||
height="55"
|
||||
name="val_color_swatch"
|
||||
label="Color"
|
||||
layout="topleft"
|
||||
width="37" />
|
||||
width="37" >
|
||||
<color_swatch.commit_callback
|
||||
function="CommitSettings" />
|
||||
</color_swatch>
|
||||
<spinner
|
||||
height="20"
|
||||
label="x"
|
||||
|
|
@ -66,7 +78,10 @@
|
|||
name="val_spinner_1"
|
||||
top_delta="10"
|
||||
visible="false"
|
||||
width="120" />
|
||||
width="120" >
|
||||
<spinner.commit_callback
|
||||
function="CommitSettings" />
|
||||
</spinner>
|
||||
<spinner
|
||||
height="20"
|
||||
label="x"
|
||||
|
|
@ -76,7 +91,10 @@
|
|||
name="val_spinner_2"
|
||||
top_delta="0"
|
||||
visible="false"
|
||||
width="120" />
|
||||
width="120">
|
||||
<spinner.commit_callback
|
||||
function="CommitSettings" />
|
||||
</spinner>
|
||||
<spinner
|
||||
height="20"
|
||||
label="x"
|
||||
|
|
@ -86,7 +104,10 @@
|
|||
name="val_spinner_3"
|
||||
top="160"
|
||||
visible="false"
|
||||
width="120" />
|
||||
width="120">
|
||||
<spinner.commit_callback
|
||||
function="CommitSettings" />
|
||||
</spinner>
|
||||
<spinner
|
||||
height="20"
|
||||
label="x"
|
||||
|
|
@ -96,7 +117,10 @@
|
|||
name="val_spinner_4"
|
||||
top_delta="0"
|
||||
visible="false"
|
||||
width="120" />
|
||||
width="120" >
|
||||
<spinner.commit_callback
|
||||
function="CommitSettings" />
|
||||
</spinner>
|
||||
<button
|
||||
height="20"
|
||||
label="Reset to default"
|
||||
|
|
@ -104,5 +128,8 @@
|
|||
left="15"
|
||||
name="default_btn"
|
||||
top="190"
|
||||
width="150" />
|
||||
width="150" >
|
||||
<button.commit_callback
|
||||
function="ClickDefault" />
|
||||
</button>
|
||||
</floater>
|
||||
|
|
|
|||
|
|
@ -165,6 +165,9 @@
|
|||
enabled="true"
|
||||
label="16:9 (Widescreen)"
|
||||
value="1.7777777" />
|
||||
<combo_box.commit_callback
|
||||
function="setControlFalse"
|
||||
parameter="FullScreenAutoDetectAspectRatio" />
|
||||
</combo_box>
|
||||
<check_box
|
||||
make_invisible_control="NotFullScreen"
|
||||
|
|
@ -336,7 +339,10 @@
|
|||
name="QualityPerformanceSelection"
|
||||
show_text="false"
|
||||
top_delta="-1"
|
||||
width="150" />
|
||||
width="150">
|
||||
<slider.commit_callback
|
||||
function="Pref.QualityPerformance"/>
|
||||
</slider>
|
||||
<check_box
|
||||
control_name="RenderCustomSettings"
|
||||
height="16"
|
||||
|
|
|
|||
Loading…
Reference in New Issue