merge
commit
1e050c2ed8
|
|
@ -212,5 +212,11 @@ viewer-tut-teamcity.email = enus@lindenlab.com
|
|||
viewer-tut-teamcity.build_server = false
|
||||
viewer-tut-teamcity.build_server_tests = false
|
||||
|
||||
# ========================================
|
||||
# experience
|
||||
# ========================================
|
||||
viewer-experience.public_build = false
|
||||
viewer-experience.viewer_channel = "Second Life SkyLight Viewer"
|
||||
viewer-experience.login_channel = "Second Life SkyLight Viewer"
|
||||
|
||||
# eof
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@ set(llui_HEADER_FILES
|
|||
llnotificationslistener.h
|
||||
llnotificationsutil.h
|
||||
llnotificationtemplate.h
|
||||
llnotificationvisibilityrule.h
|
||||
llpanel.h
|
||||
llprogressbar.h
|
||||
llradiogroup.h
|
||||
|
|
|
|||
|
|
@ -88,27 +88,19 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p)
|
|||
tbparams.font(p.font);
|
||||
}
|
||||
mLabel = LLUICtrlFactory::create<LLTextBox> (tbparams);
|
||||
mLabel->reshapeToFitText();
|
||||
addChild(mLabel);
|
||||
|
||||
S32 text_width = mLabel->getTextBoundingRect().getWidth();
|
||||
S32 text_height = llround(mFont->getLineHeight());
|
||||
LLRect label_rect;
|
||||
label_rect.setOriginAndSize(
|
||||
llcheckboxctrl_hpad + llcheckboxctrl_btn_size + llcheckboxctrl_spacing,
|
||||
llcheckboxctrl_vpad + 1, // padding to get better alignment
|
||||
text_width + llcheckboxctrl_hpad,
|
||||
text_height );
|
||||
mLabel->setShape(label_rect);
|
||||
|
||||
LLRect label_rect = mLabel->getRect();
|
||||
|
||||
// Button
|
||||
// Note: button cover the label by extending all the way to the right.
|
||||
LLRect btn_rect;
|
||||
LLRect btn_rect = p.check_button.rect();
|
||||
btn_rect.setOriginAndSize(
|
||||
llcheckboxctrl_hpad,
|
||||
llcheckboxctrl_vpad,
|
||||
llcheckboxctrl_btn_size + llcheckboxctrl_spacing + text_width + llcheckboxctrl_hpad,
|
||||
llmax( text_height, llcheckboxctrl_btn_size() ) + llcheckboxctrl_vpad);
|
||||
btn_rect.mLeft,
|
||||
btn_rect.mBottom,
|
||||
llmax(btn_rect.mRight, label_rect.mRight - btn_rect.mLeft),
|
||||
llmax( label_rect.getHeight(), btn_rect.mTop));
|
||||
std::string active_true_id, active_false_id;
|
||||
std::string inactive_true_id, inactive_false_id;
|
||||
|
||||
|
|
@ -174,31 +166,20 @@ void LLCheckBoxCtrl::clear()
|
|||
|
||||
void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
{
|
||||
//stretch or shrink bounding rectangle of label when rebuilding UI at new scale
|
||||
static LLUICachedControl<S32> llcheckboxctrl_spacing ("UICheckboxctrlSpacing", 0);
|
||||
static LLUICachedControl<S32> llcheckboxctrl_hpad ("UICheckboxctrlHPad", 0);
|
||||
static LLUICachedControl<S32> llcheckboxctrl_vpad ("UICheckboxctrlVPad", 0);
|
||||
static LLUICachedControl<S32> llcheckboxctrl_btn_size ("UICheckboxctrlBtnSize", 0);
|
||||
|
||||
S32 text_width = mLabel->getTextBoundingRect().getWidth();
|
||||
S32 text_height = llround(mFont->getLineHeight());
|
||||
LLRect label_rect;
|
||||
label_rect.setOriginAndSize(
|
||||
llcheckboxctrl_hpad + llcheckboxctrl_btn_size + llcheckboxctrl_spacing,
|
||||
llcheckboxctrl_vpad,
|
||||
text_width,
|
||||
text_height );
|
||||
mLabel->setShape(label_rect);
|
||||
mLabel->reshapeToFitText();
|
||||
|
||||
LLRect btn_rect;
|
||||
LLRect label_rect = mLabel->getRect();
|
||||
|
||||
// Button
|
||||
// Note: button cover the label by extending all the way to the right.
|
||||
LLRect btn_rect = mButton->getRect();
|
||||
btn_rect.setOriginAndSize(
|
||||
llcheckboxctrl_hpad,
|
||||
llcheckboxctrl_vpad,
|
||||
llcheckboxctrl_btn_size + llcheckboxctrl_spacing + text_width,
|
||||
llmax( text_height, llcheckboxctrl_btn_size() ) );
|
||||
mButton->setShape( btn_rect );
|
||||
|
||||
LLUICtrl::reshape(width, height, called_from_parent);
|
||||
btn_rect.mLeft,
|
||||
btn_rect.mBottom,
|
||||
llmax(btn_rect.getWidth(), label_rect.mRight - btn_rect.mLeft),
|
||||
llmax(label_rect.mTop - btn_rect.mBottom, btn_rect.getHeight()));
|
||||
mButton->setShape(btn_rect);
|
||||
}
|
||||
|
||||
//virtual
|
||||
|
|
|
|||
|
|
@ -61,13 +61,6 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename Subclass>
|
||||
LLHandle<T>& operator =(const LLHandle<Subclass>& other)
|
||||
{
|
||||
mTombStone = other.mTombStone;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isDead() const
|
||||
{
|
||||
return mTombStone->getTarget() == NULL;
|
||||
|
|
@ -99,7 +92,6 @@ public:
|
|||
{
|
||||
return lhs.mTombStone > rhs.mTombStone;
|
||||
}
|
||||
protected:
|
||||
|
||||
protected:
|
||||
LLPointer<LLTombStone<T> > mTombStone;
|
||||
|
|
|
|||
|
|
@ -97,6 +97,8 @@ LLLayoutStack::Params::Params()
|
|||
: orientation("orientation"),
|
||||
animate("animate", true),
|
||||
clip("clip", true),
|
||||
open_time_constant("open_time_constant", 0.02f),
|
||||
close_time_constant("close_time_constant", 0.03f),
|
||||
border_size("border_size", LLCachedControl<S32>(*LLUI::sSettingGroups["config"], "UIResizeBarHeight", 0))
|
||||
{
|
||||
name="stack";
|
||||
|
|
@ -110,7 +112,9 @@ LLLayoutStack::LLLayoutStack(const LLLayoutStack::Params& p)
|
|||
mOrientation((p.orientation() == "vertical") ? VERTICAL : HORIZONTAL),
|
||||
mAnimate(p.animate),
|
||||
mAnimatedThisFrame(false),
|
||||
mClip(p.clip)
|
||||
mClip(p.clip),
|
||||
mOpenTimeConstant(p.open_time_constant),
|
||||
mCloseTimeConstant(p.close_time_constant)
|
||||
{}
|
||||
|
||||
LLLayoutStack::~LLLayoutStack()
|
||||
|
|
@ -303,9 +307,6 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
|
|||
S32 total_width = 0;
|
||||
S32 total_height = 0;
|
||||
|
||||
const F32 ANIM_OPEN_TIME = 0.02f;
|
||||
const F32 ANIM_CLOSE_TIME = 0.03f;
|
||||
|
||||
e_panel_list_t::iterator panel_it;
|
||||
for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
|
||||
{
|
||||
|
|
@ -316,7 +317,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
|
|||
{
|
||||
if (!mAnimatedThisFrame)
|
||||
{
|
||||
(*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 1.f, LLCriticalDamp::getInterpolant(ANIM_OPEN_TIME));
|
||||
(*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 1.f, LLCriticalDamp::getInterpolant(mOpenTimeConstant));
|
||||
if ((*panel_it)->mVisibleAmt > 0.99f)
|
||||
{
|
||||
(*panel_it)->mVisibleAmt = 1.f;
|
||||
|
|
@ -334,7 +335,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
|
|||
{
|
||||
if (!mAnimatedThisFrame)
|
||||
{
|
||||
(*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 0.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
|
||||
(*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 0.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
|
||||
if ((*panel_it)->mVisibleAmt < 0.001f)
|
||||
{
|
||||
(*panel_it)->mVisibleAmt = 0.f;
|
||||
|
|
@ -349,11 +350,11 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
|
|||
|
||||
if ((*panel_it)->mCollapsed)
|
||||
{
|
||||
(*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 1.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
|
||||
(*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 1.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
|
||||
}
|
||||
else
|
||||
{
|
||||
(*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 0.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
|
||||
(*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 0.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
|
||||
}
|
||||
|
||||
if (mOrientation == HORIZONTAL)
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ public:
|
|||
Optional<S32> border_size;
|
||||
Optional<bool> animate,
|
||||
clip;
|
||||
Optional<F32> open_time_constant,
|
||||
close_time_constant;
|
||||
|
||||
Params();
|
||||
};
|
||||
|
|
@ -137,6 +139,8 @@ private:
|
|||
bool mAnimatedThisFrame;
|
||||
bool mAnimate;
|
||||
bool mClip;
|
||||
F32 mOpenTimeConstant;
|
||||
F32 mCloseTimeConstant;
|
||||
}; // end class LLLayoutStack
|
||||
|
||||
class LLLayoutPanel : public LLPanel
|
||||
|
|
|
|||
|
|
@ -1529,6 +1529,8 @@ void LLLineEditor::drawBackground()
|
|||
{
|
||||
image = mBgImage;
|
||||
}
|
||||
|
||||
if (!image) return;
|
||||
|
||||
F32 alpha = getDrawContext().mAlpha;
|
||||
// optionally draw programmatic border
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ protected:
|
|||
std::vector<S32> mPreeditPositions;
|
||||
LLPreeditor::standouts_t mPreeditStandouts;
|
||||
|
||||
LLHandle<LLView> mContextMenuHandle;
|
||||
LLHandle<LLContextMenu> mContextMenuHandle;
|
||||
|
||||
private:
|
||||
// Instances that by default point to the statics but can be overidden in XML.
|
||||
|
|
|
|||
|
|
@ -1462,7 +1462,7 @@ BOOL LLMenuItemBranchDownGL::handleAcceleratorKey(KEY key, MASK mask)
|
|||
{
|
||||
BOOL branch_visible = getBranch()->getVisible();
|
||||
BOOL handled = getBranch()->handleAcceleratorKey(key, mask);
|
||||
if (handled && !branch_visible && getVisible())
|
||||
if (handled && !branch_visible && isInVisibleChain())
|
||||
{
|
||||
// flash this menu entry because we triggered an invisible menu item
|
||||
LLMenuHolderGL::setActivatedItem(this);
|
||||
|
|
@ -2611,6 +2611,7 @@ LLMenuItemGL* LLMenuGL::getHighlightedItem()
|
|||
|
||||
LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disabled)
|
||||
{
|
||||
if (mItems.empty()) return NULL;
|
||||
// highlighting first item on a torn off menu is the
|
||||
// same as giving focus to it
|
||||
if (!cur_item && getTornOff())
|
||||
|
|
@ -2711,6 +2712,8 @@ LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disa
|
|||
|
||||
LLMenuItemGL* LLMenuGL::highlightPrevItem(LLMenuItemGL* cur_item, BOOL skip_disabled)
|
||||
{
|
||||
if (mItems.empty()) return NULL;
|
||||
|
||||
// highlighting first item on a torn off menu is the
|
||||
// same as giving focus to it
|
||||
if (!cur_item && getTornOff())
|
||||
|
|
@ -3045,6 +3048,11 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y)
|
|||
const S32 CURSOR_HEIGHT = 22; // Approximate "normal" cursor size
|
||||
const S32 CURSOR_WIDTH = 12;
|
||||
|
||||
if(menu->getChildList()->empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Save click point for detecting cursor moves before mouse-up.
|
||||
// Must be in local coords to compare with mouseUp events.
|
||||
// If the mouse doesn't move, the menu will stay open ala the Mac.
|
||||
|
|
@ -3125,7 +3133,10 @@ BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask)
|
|||
mAltKeyTrigger = FALSE;
|
||||
}
|
||||
|
||||
if(!result && (key == KEY_F10 && mask == MASK_CONTROL) && !gKeyboard->getKeyRepeated(key))
|
||||
if(!result
|
||||
&& (key == KEY_F10 && mask == MASK_CONTROL)
|
||||
&& !gKeyboard->getKeyRepeated(key)
|
||||
&& isInVisibleChain())
|
||||
{
|
||||
if (getHighlightedItem())
|
||||
{
|
||||
|
|
@ -3508,8 +3519,10 @@ BOOL LLMenuHolderGL::handleKey(KEY key, MASK mask, BOOL called_from_parent)
|
|||
else
|
||||
{
|
||||
//highlight first enabled one
|
||||
pMenu->highlightNextItem(NULL);
|
||||
handled = true;
|
||||
if(pMenu->highlightNextItem(NULL))
|
||||
{
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3742,9 +3755,7 @@ public:
|
|||
LLContextMenuBranch(const Params&);
|
||||
|
||||
virtual ~LLContextMenuBranch()
|
||||
{
|
||||
delete mBranch;
|
||||
}
|
||||
{}
|
||||
|
||||
// called to rebuild the draw label
|
||||
virtual void buildDrawLabel( void );
|
||||
|
|
@ -3752,21 +3763,21 @@ public:
|
|||
// onCommit() - do the primary funcationality of the menu item.
|
||||
virtual void onCommit( void );
|
||||
|
||||
LLContextMenu* getBranch() { return mBranch; }
|
||||
LLContextMenu* getBranch() { return mBranch.get(); }
|
||||
void setHighlight( BOOL highlight );
|
||||
|
||||
protected:
|
||||
void showSubMenu();
|
||||
|
||||
LLContextMenu* mBranch;
|
||||
LLHandle<LLContextMenu> mBranch;
|
||||
};
|
||||
|
||||
LLContextMenuBranch::LLContextMenuBranch(const LLContextMenuBranch::Params& p)
|
||||
: LLMenuItemGL(p),
|
||||
mBranch( p.branch )
|
||||
mBranch( p.branch()->getHandle() )
|
||||
{
|
||||
mBranch->hide();
|
||||
mBranch->setParentMenuItem(this);
|
||||
mBranch.get()->hide();
|
||||
mBranch.get()->setParentMenuItem(this);
|
||||
}
|
||||
|
||||
// called to rebuild the draw label
|
||||
|
|
@ -3775,12 +3786,12 @@ void LLContextMenuBranch::buildDrawLabel( void )
|
|||
{
|
||||
// default enablement is this -- if any of the subitems are
|
||||
// enabled, this item is enabled. JC
|
||||
U32 sub_count = mBranch->getItemCount();
|
||||
U32 sub_count = mBranch.get()->getItemCount();
|
||||
U32 i;
|
||||
BOOL any_enabled = FALSE;
|
||||
for (i = 0; i < sub_count; i++)
|
||||
{
|
||||
LLMenuItemGL* item = mBranch->getItem(i);
|
||||
LLMenuItemGL* item = mBranch.get()->getItem(i);
|
||||
item->buildDrawLabel();
|
||||
if (item->getEnabled() && !item->getDrawTextDisabled() )
|
||||
{
|
||||
|
|
@ -3802,13 +3813,13 @@ void LLContextMenuBranch::buildDrawLabel( void )
|
|||
|
||||
void LLContextMenuBranch::showSubMenu()
|
||||
{
|
||||
LLMenuItemGL* menu_item = mBranch->getParentMenuItem();
|
||||
LLMenuItemGL* menu_item = mBranch.get()->getParentMenuItem();
|
||||
if (menu_item != NULL && menu_item->getVisible())
|
||||
{
|
||||
S32 center_x;
|
||||
S32 center_y;
|
||||
localPointToScreen(getRect().getWidth(), getRect().getHeight() , ¢er_x, ¢er_y);
|
||||
mBranch->show(center_x, center_y);
|
||||
mBranch.get()->show(center_x, center_y);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3828,7 +3839,7 @@ void LLContextMenuBranch::setHighlight( BOOL highlight )
|
|||
}
|
||||
else
|
||||
{
|
||||
mBranch->hide();
|
||||
mBranch.get()->hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3859,6 +3870,11 @@ void LLContextMenu::setVisible(BOOL visible)
|
|||
// Takes cursor position in screen space?
|
||||
void LLContextMenu::show(S32 x, S32 y)
|
||||
{
|
||||
if (getChildList()->empty())
|
||||
{
|
||||
// nothing to show, so abort
|
||||
return;
|
||||
}
|
||||
// Save click point for detecting cursor moves before mouse-up.
|
||||
// Must be in local coords to compare with mouseUp events.
|
||||
// If the mouse doesn't move, the menu will stay open ala the Mac.
|
||||
|
|
|
|||
|
|
@ -678,9 +678,12 @@ public:
|
|||
|
||||
BOOL appendContextSubMenu(LLContextMenu *menu);
|
||||
|
||||
LLHandle<LLContextMenu> getHandle() { mHandle.bind(this); return mHandle; }
|
||||
|
||||
protected:
|
||||
BOOL mHoveredAnyItem;
|
||||
LLMenuItemGL* mHoverItem;
|
||||
BOOL mHoveredAnyItem;
|
||||
LLMenuItemGL* mHoverItem;
|
||||
LLRootHandle<LLContextMenu> mHandle;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "llnotifications.h"
|
||||
#include "llnotificationtemplate.h"
|
||||
#include "llnotificationvisibilityrule.h"
|
||||
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llinstantmessage.h"
|
||||
|
|
@ -137,12 +138,6 @@ private:
|
|||
|
||||
bool filterIgnoredNotifications(LLNotificationPtr notification)
|
||||
{
|
||||
// filter everything if we are to ignore ALL
|
||||
if(LLNotifications::instance().getIgnoreAllNotifications())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
LLNotificationFormPtr form = notification->getForm();
|
||||
// Check to see if the user wants to ignore this alert
|
||||
return !notification->getForm()->getIgnored();
|
||||
|
|
@ -177,6 +172,28 @@ bool handleIgnoredNotification(const LLSD& payload)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool defaultResponse(const LLSD& payload)
|
||||
{
|
||||
if (payload["sigtype"].asString() == "add")
|
||||
{
|
||||
LLNotificationPtr pNotif = LLNotifications::instance().find(payload["id"].asUUID());
|
||||
if (pNotif)
|
||||
{
|
||||
// supply default response
|
||||
pNotif->respond(pNotif->getResponseTemplate(LLNotification::WITH_DEFAULT_BUTTON));
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool visibilityRuleMached(const LLSD& payload)
|
||||
{
|
||||
// This is needed because LLNotifications::isVisibleByRules may have cancelled the notification.
|
||||
// Returning true here makes LLNotificationChannelBase::updateItem do an early out, which prevents things from happening in the wrong order.
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
namespace LLNotificationFilters
|
||||
{
|
||||
// a sample filter
|
||||
|
|
@ -406,10 +423,47 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par
|
|||
{
|
||||
mUniqueContext.push_back(it->key);
|
||||
}
|
||||
|
||||
lldebugs << "notification \"" << mName << "\": tag count is " << p.tags.size() << llendl;
|
||||
|
||||
for(LLInitParam::ParamIterator<LLNotificationTemplate::Tag>::const_iterator it = p.tags.begin(),
|
||||
end_it = p.tags.end();
|
||||
it != end_it;
|
||||
++it)
|
||||
{
|
||||
lldebugs << " tag \"" << std::string(it->value) << "\"" << llendl;
|
||||
mTags.push_back(it->value);
|
||||
}
|
||||
|
||||
mForm = LLNotificationFormPtr(new LLNotificationForm(p.name, p.form_ref.form));
|
||||
}
|
||||
|
||||
LLNotificationVisibilityRule::LLNotificationVisibilityRule(const LLNotificationVisibilityRule::Rule &p)
|
||||
{
|
||||
if (p.show.isChosen())
|
||||
{
|
||||
mType = p.show.type;
|
||||
mTag = p.show.tag;
|
||||
mName = p.show.name;
|
||||
mVisible = true;
|
||||
}
|
||||
else if (p.hide.isChosen())
|
||||
{
|
||||
mType = p.hide.type;
|
||||
mTag = p.hide.tag;
|
||||
mName = p.hide.name;
|
||||
mVisible = false;
|
||||
}
|
||||
else if (p.respond.isChosen())
|
||||
{
|
||||
mType = p.respond.type;
|
||||
mTag = p.respond.tag;
|
||||
mName = p.respond.name;
|
||||
mVisible = false;
|
||||
mResponse = p.respond.response;
|
||||
}
|
||||
}
|
||||
|
||||
LLNotification::LLNotification(const LLNotification::Params& p) :
|
||||
mTimestamp(p.time_stamp),
|
||||
mSubstitutions(p.substitutions),
|
||||
|
|
@ -679,6 +733,25 @@ bool LLNotification::hasUniquenessConstraints() const
|
|||
return (mTemplatep ? mTemplatep->mUnique : false);
|
||||
}
|
||||
|
||||
bool LLNotification::matchesTag(const std::string& tag)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if(mTemplatep)
|
||||
{
|
||||
std::list<std::string>::iterator it;
|
||||
for(it = mTemplatep->mTags.begin(); it != mTemplatep->mTags.end(); it++)
|
||||
{
|
||||
if((*it) == tag)
|
||||
{
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void LLNotification::setIgnored(bool ignore)
|
||||
{
|
||||
|
|
@ -1064,12 +1137,12 @@ std::string LLNotificationChannel::summarize()
|
|||
// LLNotifications implementation
|
||||
// ---
|
||||
LLNotifications::LLNotifications() : LLNotificationChannelBase(LLNotificationFilters::includeEverything,
|
||||
LLNotificationComparators::orderByUUID()),
|
||||
mIgnoreAllNotifications(false)
|
||||
LLNotificationComparators::orderByUUID()),
|
||||
mIgnoreAllNotifications(false)
|
||||
{
|
||||
LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Notification.Show", boost::bind(&LLNotifications::addFromCallback, this, _2));
|
||||
|
||||
mListener.reset(new LLNotificationsListener(*this));
|
||||
|
||||
mListener.reset(new LLNotificationsListener(*this));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1184,6 +1257,7 @@ LLNotificationChannelPtr LLNotifications::getChannel(const std::string& channelN
|
|||
void LLNotifications::initSingleton()
|
||||
{
|
||||
loadTemplates();
|
||||
loadVisibilityRules();
|
||||
createDefaultChannels();
|
||||
}
|
||||
|
||||
|
|
@ -1191,15 +1265,19 @@ void LLNotifications::createDefaultChannels()
|
|||
{
|
||||
// now construct the various channels AFTER loading the notifications,
|
||||
// because the history channel is going to rewrite the stored notifications file
|
||||
LLNotificationChannel::buildChannel("Expiration", "",
|
||||
LLNotificationChannel::buildChannel("Enabled", "",
|
||||
!boost::bind(&LLNotifications::getIgnoreAllNotifications, this));
|
||||
LLNotificationChannel::buildChannel("Expiration", "Enabled",
|
||||
boost::bind(&LLNotifications::expirationFilter, this, _1));
|
||||
LLNotificationChannel::buildChannel("Unexpired", "",
|
||||
LLNotificationChannel::buildChannel("Unexpired", "Enabled",
|
||||
!boost::bind(&LLNotifications::expirationFilter, this, _1)); // use negated bind
|
||||
LLNotificationChannel::buildChannel("Unique", "Unexpired",
|
||||
boost::bind(&LLNotifications::uniqueFilter, this, _1));
|
||||
LLNotificationChannel::buildChannel("Ignore", "Unique",
|
||||
filterIgnoredNotifications);
|
||||
LLNotificationChannel::buildChannel("Visible", "Ignore",
|
||||
LLNotificationChannel::buildChannel("VisibilityRules", "Ignore",
|
||||
boost::bind(&LLNotifications::isVisibleByRules, this, _1));
|
||||
LLNotificationChannel::buildChannel("Visible", "VisibilityRules",
|
||||
&LLNotificationFilters::includeEverything);
|
||||
|
||||
// create special persistent notification channel
|
||||
|
|
@ -1207,6 +1285,8 @@ void LLNotifications::createDefaultChannels()
|
|||
new LLPersistentNotificationChannel();
|
||||
|
||||
// connect action methods to these channels
|
||||
LLNotifications::instance().getChannel("Enabled")->
|
||||
connectFailedFilter(&defaultResponse);
|
||||
LLNotifications::instance().getChannel("Expiration")->
|
||||
connectChanged(boost::bind(&LLNotifications::expirationHandler, this, _1));
|
||||
// uniqueHandler slot should be added as first slot of the signal due to
|
||||
|
|
@ -1218,6 +1298,8 @@ void LLNotifications::createDefaultChannels()
|
|||
// connectFailedFilter(boost::bind(&LLNotifications::failedUniquenessTest, this, _1));
|
||||
LLNotifications::instance().getChannel("Ignore")->
|
||||
connectFailedFilter(&handleIgnoredNotification);
|
||||
LLNotifications::instance().getChannel("VisibilityRules")->
|
||||
connectFailedFilter(&visibilityRuleMached);
|
||||
}
|
||||
|
||||
bool LLNotifications::addTemplate(const std::string &name,
|
||||
|
|
@ -1347,6 +1429,12 @@ bool LLNotifications::loadTemplates()
|
|||
LLXUIParser parser;
|
||||
parser.readXUI(root, params, full_filename);
|
||||
|
||||
if(!params.validateBlock())
|
||||
{
|
||||
llerrs << "Problem reading UI Notifications file: " << full_filename << llendl;
|
||||
return false;
|
||||
}
|
||||
|
||||
mTemplates.clear();
|
||||
|
||||
for(LLInitParam::ParamIterator<LLNotificationTemplate::GlobalString>::const_iterator it = params.strings.begin(), end_it = params.strings.end();
|
||||
|
|
@ -1396,6 +1484,34 @@ bool LLNotifications::loadTemplates()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool LLNotifications::loadVisibilityRules()
|
||||
{
|
||||
const std::string xml_filename = "notification_visibility.xml";
|
||||
std::string full_filename = gDirUtilp->findSkinnedFilename(LLUI::getXUIPaths().front(), xml_filename);
|
||||
|
||||
LLNotificationVisibilityRule::Rules params;
|
||||
LLSimpleXUIParser parser;
|
||||
parser.readXUI(full_filename, params);
|
||||
|
||||
if(!params.validateBlock())
|
||||
{
|
||||
llerrs << "Problem reading UI Notification Visibility Rules file: " << full_filename << llendl;
|
||||
return false;
|
||||
}
|
||||
|
||||
mVisibilityRules.clear();
|
||||
|
||||
for(LLInitParam::ParamIterator<LLNotificationVisibilityRule::Rule>::iterator it = params.rules.begin(),
|
||||
end_it = params.rules.end();
|
||||
it != end_it;
|
||||
++it)
|
||||
{
|
||||
mVisibilityRules.push_back(LLNotificationVisibilityRulePtr(new LLNotificationVisibilityRule(*it)));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Add a simple notification (from XUI)
|
||||
void LLNotifications::addFromCallback(const LLSD& name)
|
||||
{
|
||||
|
|
@ -1546,6 +1662,94 @@ bool LLNotifications::getIgnoreAllNotifications()
|
|||
return mIgnoreAllNotifications;
|
||||
}
|
||||
|
||||
bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
|
||||
{
|
||||
if(n->isRespondedTo())
|
||||
{
|
||||
// This avoids infinite recursion in the case where the filter calls respond()
|
||||
return true;
|
||||
}
|
||||
|
||||
VisibilityRuleList::iterator it;
|
||||
|
||||
for(it = mVisibilityRules.begin(); it != mVisibilityRules.end(); it++)
|
||||
{
|
||||
// An empty type/tag/name string will match any notification, so only do the comparison when the string is non-empty in the rule.
|
||||
|
||||
lldebugs
|
||||
<< "notification \"" << n->getName() << "\" "
|
||||
<< "testing against " << ((*it)->mVisible?"show":"hide") << " rule, "
|
||||
<< "name = \"" << (*it)->mName << "\" "
|
||||
<< "tag = \"" << (*it)->mTag << "\" "
|
||||
<< "type = \"" << (*it)->mType << "\" "
|
||||
<< llendl;
|
||||
|
||||
if(!(*it)->mType.empty())
|
||||
{
|
||||
if((*it)->mType != n->getType())
|
||||
{
|
||||
// Type doesn't match, so skip this rule.
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(!(*it)->mTag.empty())
|
||||
{
|
||||
// check this notification's tag(s) against it->mTag and continue if no match is found.
|
||||
if(!n->matchesTag((*it)->mTag))
|
||||
{
|
||||
// This rule's non-empty tag didn't match one of the notification's tags. Skip this rule.
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(!(*it)->mName.empty())
|
||||
{
|
||||
// check this notification's name against the notification's name and continue if no match is found.
|
||||
if((*it)->mName != n->getName())
|
||||
{
|
||||
// This rule's non-empty name didn't match the notification. Skip this rule.
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// If we got here, the rule matches. Don't evaluate subsequent rules.
|
||||
if(!(*it)->mVisible)
|
||||
{
|
||||
// This notification is being hidden.
|
||||
|
||||
if((*it)->mResponse.empty())
|
||||
{
|
||||
// Response property is empty. Cancel this notification.
|
||||
lldebugs << "cancelling notification " << n->getName() << llendl;
|
||||
|
||||
n->cancel();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Response property is not empty. Return the specified response.
|
||||
LLSD response = n->getResponseTemplate(LLNotification::WITHOUT_DEFAULT_BUTTON);
|
||||
// TODO: verify that the response template has an item with the correct name
|
||||
response[(*it)->mResponse] = true;
|
||||
|
||||
lldebugs << "responding to notification " << n->getName() << " with response = " << response << llendl;
|
||||
|
||||
n->respond(response);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// If we got here, exit the loop and return true.
|
||||
break;
|
||||
}
|
||||
|
||||
lldebugs << "allowing notification " << n->getName() << llendl;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ---
|
||||
// END OF LLNotifications implementation
|
||||
// =========================================================
|
||||
|
|
|
|||
|
|
@ -270,6 +270,11 @@ struct LLNotificationTemplate;
|
|||
// with smart pointers
|
||||
typedef boost::shared_ptr<LLNotificationTemplate> LLNotificationTemplatePtr;
|
||||
|
||||
|
||||
struct LLNotificationVisibilityRule;
|
||||
|
||||
typedef boost::shared_ptr<LLNotificationVisibilityRule> LLNotificationVisibilityRulePtr;
|
||||
|
||||
/**
|
||||
* @class LLNotification
|
||||
* @brief The object that expresses the details of a notification
|
||||
|
|
@ -506,7 +511,7 @@ public:
|
|||
std::string getLabel() const;
|
||||
std::string getURL() const;
|
||||
S32 getURLOption() const;
|
||||
S32 getURLOpenExternally() const;
|
||||
S32 getURLOpenExternally() const;
|
||||
|
||||
const LLNotificationFormPtr getForm();
|
||||
|
||||
|
|
@ -578,6 +583,8 @@ public:
|
|||
|
||||
bool hasUniquenessConstraints() const;
|
||||
|
||||
bool matchesTag(const std::string& tag);
|
||||
|
||||
virtual ~LLNotification() {}
|
||||
};
|
||||
|
||||
|
|
@ -859,6 +866,10 @@ public:
|
|||
// OK to call more than once because it will reload
|
||||
bool loadTemplates();
|
||||
|
||||
// load visibility rules from file;
|
||||
// OK to call more than once because it will reload
|
||||
bool loadVisibilityRules();
|
||||
|
||||
// Add a simple notification (from XUI)
|
||||
void addFromCallback(const LLSD& name);
|
||||
|
||||
|
|
@ -904,6 +915,8 @@ public:
|
|||
// test for existence
|
||||
bool templateExists(const std::string& name);
|
||||
|
||||
typedef std::list<LLNotificationVisibilityRulePtr> VisibilityRuleList;
|
||||
|
||||
void forceResponse(const LLNotification::Params& params, S32 option);
|
||||
|
||||
void createDefaultChannels();
|
||||
|
|
@ -919,6 +932,8 @@ public:
|
|||
void setIgnoreAllNotifications(bool ignore);
|
||||
bool getIgnoreAllNotifications();
|
||||
|
||||
bool isVisibleByRules(LLNotificationPtr pNotification);
|
||||
|
||||
private:
|
||||
// we're a singleton, so we don't have a public constructor
|
||||
LLNotifications();
|
||||
|
|
@ -938,6 +953,8 @@ private:
|
|||
bool addTemplate(const std::string& name, LLNotificationTemplatePtr theTemplate);
|
||||
TemplateMap mTemplates;
|
||||
|
||||
VisibilityRuleList mVisibilityRules;
|
||||
|
||||
std::string mFileName;
|
||||
|
||||
LLNotificationMap mUniqueNotifications;
|
||||
|
|
|
|||
|
|
@ -156,6 +156,15 @@ struct LLNotificationTemplate
|
|||
{}
|
||||
};
|
||||
|
||||
struct Tag : public LLInitParam::Block<Tag>
|
||||
{
|
||||
Mandatory<std::string> value;
|
||||
|
||||
Tag()
|
||||
: value("value")
|
||||
{}
|
||||
};
|
||||
|
||||
struct Params : public LLInitParam::Block<Params>
|
||||
{
|
||||
Mandatory<std::string> name;
|
||||
|
|
@ -173,6 +182,7 @@ struct LLNotificationTemplate
|
|||
Optional<FormRef> form_ref;
|
||||
Optional<ENotificationPriority,
|
||||
NotificationPriorityValues> priority;
|
||||
Multiple<Tag> tags;
|
||||
|
||||
|
||||
Params()
|
||||
|
|
@ -189,7 +199,8 @@ struct LLNotificationTemplate
|
|||
expire_option("expireOption", -1),
|
||||
url("url"),
|
||||
unique("unique"),
|
||||
form_ref("")
|
||||
form_ref(""),
|
||||
tags("tag")
|
||||
{}
|
||||
|
||||
};
|
||||
|
|
@ -276,6 +287,8 @@ struct LLNotificationTemplate
|
|||
// this is loaded as a name, but looked up to get the UUID upon template load.
|
||||
// If null, it wasn't specified.
|
||||
LLUUID mSoundEffect;
|
||||
// List of tags that rules can match against.
|
||||
std::list<std::string> mTags;
|
||||
};
|
||||
|
||||
#endif //LL_LLNOTIFICATION_TEMPLATE_H
|
||||
|
|
|
|||
|
|
@ -0,0 +1,104 @@
|
|||
/**
|
||||
* @file llnotificationvisibility.h
|
||||
* @brief Rules for
|
||||
* @author Monroe
|
||||
*
|
||||
* $LicenseInfo:firstyear=2010&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLNOTIFICATION_VISIBILITY_RULE_H
|
||||
#define LL_LLNOTIFICATION_VISIBILITY_RULE_H
|
||||
|
||||
#include "llinitparam.h"
|
||||
//#include "llnotifications.h"
|
||||
|
||||
|
||||
|
||||
// This is the class of object read from the XML file (notification_visibility.xml,
|
||||
// from the appropriate local language directory).
|
||||
struct LLNotificationVisibilityRule
|
||||
{
|
||||
struct Filter : public LLInitParam::Block<Filter>
|
||||
{
|
||||
Optional<std::string> type,
|
||||
tag,
|
||||
name;
|
||||
|
||||
Filter()
|
||||
: type("type"),
|
||||
tag("tag"),
|
||||
name("name")
|
||||
{}
|
||||
};
|
||||
|
||||
struct Respond : public LLInitParam::Block<Respond, Filter>
|
||||
{
|
||||
Mandatory<std::string> response;
|
||||
|
||||
Respond()
|
||||
: response("response")
|
||||
{}
|
||||
};
|
||||
|
||||
struct Rule : public LLInitParam::Choice<Rule>
|
||||
{
|
||||
Alternative<Filter> show;
|
||||
Alternative<Filter> hide;
|
||||
Alternative<Respond> respond;
|
||||
|
||||
Rule()
|
||||
: show("show"),
|
||||
hide("hide"),
|
||||
respond("respond")
|
||||
{}
|
||||
};
|
||||
|
||||
struct Rules : public LLInitParam::Block<Rules>
|
||||
{
|
||||
Multiple<Rule> rules;
|
||||
|
||||
Rules()
|
||||
: rules("")
|
||||
{}
|
||||
};
|
||||
|
||||
LLNotificationVisibilityRule(const Rule& p);
|
||||
|
||||
// If true, this rule makes matching notifications visible. Otherwise, it makes them invisible.
|
||||
bool mVisible;
|
||||
|
||||
// Which response to give when making a notification invisible. An empty string means the notification should be cancelled instead of responded to.
|
||||
std::string mResponse;
|
||||
|
||||
// String to match against the notification's "type". An empty string matches all notifications.
|
||||
std::string mType;
|
||||
|
||||
// String to match against the notification's tag(s). An empty string matches all notifications.
|
||||
std::string mTag;
|
||||
|
||||
// String to match against the notification's name. An empty string matches all notifications.
|
||||
std::string mName;
|
||||
|
||||
};
|
||||
|
||||
#endif //LL_LLNOTIFICATION_VISIBILITY_RULE_H
|
||||
|
||||
|
|
@ -434,7 +434,7 @@ void LLPanel::initFromParams(const LLPanel::Params& p)
|
|||
//and LLView::initFromParams will use them to set visible and enabled
|
||||
setVisible(p.visible);
|
||||
setEnabled(p.enabled);
|
||||
|
||||
setFocusRoot(p.focus_root);
|
||||
setSoundFlags(p.sound_flags);
|
||||
|
||||
// control_name, tab_stop, focus_lost_callback, initial_value, rect, enabled, visible
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ LLProgressBar::Params::Params()
|
|||
|
||||
|
||||
LLProgressBar::LLProgressBar(const LLProgressBar::Params& p)
|
||||
: LLView(p),
|
||||
: LLUICtrl(p),
|
||||
mImageBar(p.image_bar),
|
||||
mImageFill(p.image_fill),
|
||||
mColorBackground(p.color_bg()),
|
||||
|
|
@ -80,7 +80,7 @@ void LLProgressBar::draw()
|
|||
mImageFill->draw(progress_rect, bar_color);
|
||||
}
|
||||
|
||||
void LLProgressBar::setPercent(const F32 percent)
|
||||
void LLProgressBar::setValue(const LLSD& value)
|
||||
{
|
||||
mPercentDone = llclamp(percent, 0.f, 100.f);
|
||||
mPercentDone = llclamp((F32)value.asReal(), 0.f, 100.f);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,14 +27,14 @@
|
|||
#ifndef LL_LLPROGRESSBAR_H
|
||||
#define LL_LLPROGRESSBAR_H
|
||||
|
||||
#include "llview.h"
|
||||
#include "lluictrl.h"
|
||||
#include "llframetimer.h"
|
||||
|
||||
class LLProgressBar
|
||||
: public LLView
|
||||
: public LLUICtrl
|
||||
{
|
||||
public:
|
||||
struct Params : public LLInitParam::Block<Params, LLView::Params>
|
||||
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
|
||||
{
|
||||
Optional<LLUIImage*> image_bar,
|
||||
image_fill;
|
||||
|
|
@ -47,7 +47,7 @@ public:
|
|||
LLProgressBar(const Params&);
|
||||
virtual ~LLProgressBar();
|
||||
|
||||
void setPercent(const F32 percent);
|
||||
void setValue(const LLSD& value);
|
||||
|
||||
/*virtual*/ void draw();
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ protected:
|
|||
static LLWidgetNameRegistry::StaticRegistrar register_radio_item(&typeid(LLRadioGroup::ItemParams), "radio_item");
|
||||
|
||||
LLRadioGroup::Params::Params()
|
||||
: has_border("draw_border"),
|
||||
: allow_deselect("allow_deselect"),
|
||||
items("item")
|
||||
{
|
||||
addSynonym(items, "radio_item");
|
||||
|
|
@ -85,18 +85,8 @@ LLRadioGroup::LLRadioGroup(const LLRadioGroup::Params& p)
|
|||
: LLUICtrl(p),
|
||||
mFont(p.font.isProvided() ? p.font() : LLFontGL::getFontSansSerifSmall()),
|
||||
mSelectedIndex(-1),
|
||||
mHasBorder(p.has_border)
|
||||
{
|
||||
if (mHasBorder)
|
||||
{
|
||||
LLViewBorder::Params params;
|
||||
params.name("radio group border");
|
||||
params.rect(LLRect(0, getRect().getHeight(), getRect().getWidth(), 0));
|
||||
params.bevel_style(LLViewBorder::BEVEL_NONE);
|
||||
LLViewBorder * vb = LLUICtrlFactory::create<LLViewBorder> (params);
|
||||
addChild (vb);
|
||||
}
|
||||
}
|
||||
mAllowDeselect(p.allow_deselect)
|
||||
{}
|
||||
|
||||
void LLRadioGroup::initFromParams(const Params& p)
|
||||
{
|
||||
|
|
@ -184,7 +174,7 @@ void LLRadioGroup::setIndexEnabled(S32 index, BOOL enabled)
|
|||
|
||||
BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event)
|
||||
{
|
||||
if (index < 0 || (S32)mRadioButtons.size() <= index )
|
||||
if ((S32)mRadioButtons.size() <= index )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -202,13 +192,16 @@ BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event)
|
|||
|
||||
mSelectedIndex = index;
|
||||
|
||||
LLRadioCtrl* radio_item = mRadioButtons[mSelectedIndex];
|
||||
radio_item->setTabStop(true);
|
||||
radio_item->setValue( TRUE );
|
||||
|
||||
if (hasFocus())
|
||||
if (mSelectedIndex >= 0)
|
||||
{
|
||||
mRadioButtons[mSelectedIndex]->focusFirstItem(FALSE, FALSE);
|
||||
LLRadioCtrl* radio_item = mRadioButtons[mSelectedIndex];
|
||||
radio_item->setTabStop(true);
|
||||
radio_item->setValue( TRUE );
|
||||
|
||||
if (hasFocus())
|
||||
{
|
||||
radio_item->focusFirstItem(FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
if (!from_event)
|
||||
|
|
@ -307,8 +300,15 @@ void LLRadioGroup::onClickButton(LLUICtrl* ctrl)
|
|||
LLRadioCtrl* radio = *iter;
|
||||
if (radio == clicked_radio)
|
||||
{
|
||||
// llinfos << "clicked button " << index << llendl;
|
||||
setSelectedIndex(index);
|
||||
if (index == mSelectedIndex && mAllowDeselect)
|
||||
{
|
||||
// don't select anything
|
||||
setSelectedIndex(-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
setSelectedIndex(index);
|
||||
}
|
||||
|
||||
// BUG: Calls click callback even if button didn't actually change
|
||||
onCommit();
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public:
|
|||
|
||||
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
|
||||
{
|
||||
Optional<bool> has_border;
|
||||
Optional<bool> allow_deselect;
|
||||
Multiple<ItemParams, AtLeast<1> > items;
|
||||
Params();
|
||||
};
|
||||
|
|
@ -73,7 +73,6 @@ public:
|
|||
void setIndexEnabled(S32 index, BOOL enabled);
|
||||
// return the index value of the selected item
|
||||
S32 getSelectedIndex() const { return mSelectedIndex; }
|
||||
|
||||
// set the index value programatically
|
||||
BOOL setSelectedIndex(S32 index, BOOL from_event = FALSE);
|
||||
|
||||
|
|
@ -103,12 +102,13 @@ public:
|
|||
/*virtual*/ BOOL operateOnAll(EOperation op);
|
||||
|
||||
private:
|
||||
const LLFontGL* mFont;
|
||||
S32 mSelectedIndex;
|
||||
typedef std::vector<class LLRadioCtrl*> button_list_t;
|
||||
button_list_t mRadioButtons;
|
||||
const LLFontGL* mFont;
|
||||
S32 mSelectedIndex;
|
||||
|
||||
BOOL mHasBorder;
|
||||
typedef std::vector<class LLRadioCtrl*> button_list_t;
|
||||
button_list_t mRadioButtons;
|
||||
|
||||
bool mAllowDeselect; // user can click on an already selected option to deselect it
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -322,6 +322,7 @@ LLScrollListCtrl::~LLScrollListCtrl()
|
|||
delete mSortCallback;
|
||||
|
||||
std::for_each(mItemList.begin(), mItemList.end(), DeletePointer());
|
||||
std::for_each(mColumns.begin(), mColumns.end(), DeletePairedPointer());
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2370,10 +2371,10 @@ void LLScrollListCtrl::onScrollChange( S32 new_pos, LLScrollbar* scrollbar )
|
|||
|
||||
void LLScrollListCtrl::sortByColumn(const std::string& name, BOOL ascending)
|
||||
{
|
||||
std::map<std::string, LLScrollListColumn>::iterator itor = mColumns.find(name);
|
||||
column_map_t::iterator itor = mColumns.find(name);
|
||||
if (itor != mColumns.end())
|
||||
{
|
||||
sortByColumnIndex((*itor).second.mIndex, ascending);
|
||||
sortByColumnIndex((*itor).second->mIndex, ascending);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2419,11 +2420,11 @@ void LLScrollListCtrl::dirtyColumns()
|
|||
// just in case someone indexes into it immediately
|
||||
mColumnsIndexed.resize(mColumns.size());
|
||||
|
||||
std::map<std::string, LLScrollListColumn>::iterator column_itor;
|
||||
column_map_t::iterator column_itor;
|
||||
for (column_itor = mColumns.begin(); column_itor != mColumns.end(); ++column_itor)
|
||||
{
|
||||
LLScrollListColumn *column = &column_itor->second;
|
||||
mColumnsIndexed[column_itor->second.mIndex] = column;
|
||||
LLScrollListColumn *column = column_itor->second;
|
||||
mColumnsIndexed[column_itor->second->mIndex] = column;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2581,8 +2582,8 @@ void LLScrollListCtrl::addColumn(const LLScrollListColumn::Params& column_params
|
|||
if (mColumns.find(name) == mColumns.end())
|
||||
{
|
||||
// Add column
|
||||
mColumns[name] = LLScrollListColumn(column_params, this);
|
||||
LLScrollListColumn* new_column = &mColumns[name];
|
||||
mColumns[name] = new LLScrollListColumn(column_params, this);
|
||||
LLScrollListColumn* new_column = mColumns[name];
|
||||
new_column->mIndex = mColumns.size()-1;
|
||||
|
||||
// Add button
|
||||
|
|
@ -2604,14 +2605,14 @@ void LLScrollListCtrl::addColumn(const LLScrollListColumn::Params& column_params
|
|||
S32 top = mItemListRect.mTop;
|
||||
|
||||
S32 left = mItemListRect.mLeft;
|
||||
for (std::map<std::string, LLScrollListColumn>::iterator itor = mColumns.begin();
|
||||
for (column_map_t::iterator itor = mColumns.begin();
|
||||
itor != mColumns.end();
|
||||
++itor)
|
||||
{
|
||||
if (itor->second.mIndex < new_column->mIndex &&
|
||||
itor->second.getWidth() > 0)
|
||||
if (itor->second->mIndex < new_column->mIndex &&
|
||||
itor->second->getWidth() > 0)
|
||||
{
|
||||
left += itor->second.getWidth() + mColumnPadding;
|
||||
left += itor->second->getWidth() + mColumnPadding;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2667,8 +2668,8 @@ void LLScrollListCtrl::onClickColumn(void *userdata)
|
|||
if (column->mSortingColumn != column->mName
|
||||
&& parent->mColumns.find(column->mSortingColumn) != parent->mColumns.end())
|
||||
{
|
||||
LLScrollListColumn& info_redir = parent->mColumns[column->mSortingColumn];
|
||||
column_index = info_redir.mIndex;
|
||||
LLScrollListColumn* info_redir = parent->mColumns[column->mSortingColumn];
|
||||
column_index = info_redir->mIndex;
|
||||
}
|
||||
|
||||
// if this column is the primary sort key, reverse the direction
|
||||
|
|
@ -2701,16 +2702,17 @@ BOOL LLScrollListCtrl::hasSortOrder() const
|
|||
|
||||
void LLScrollListCtrl::clearColumns()
|
||||
{
|
||||
std::map<std::string, LLScrollListColumn>::iterator itor;
|
||||
column_map_t::iterator itor;
|
||||
for (itor = mColumns.begin(); itor != mColumns.end(); ++itor)
|
||||
{
|
||||
LLScrollColumnHeader *header = itor->second.mHeader;
|
||||
LLScrollColumnHeader *header = itor->second->mHeader;
|
||||
if (header)
|
||||
{
|
||||
removeChild(header);
|
||||
delete header;
|
||||
}
|
||||
}
|
||||
std::for_each(mColumns.begin(), mColumns.end(), DeletePairedPointer());
|
||||
mColumns.clear();
|
||||
mSortColumns.clear();
|
||||
mTotalStaticColumnWidth = 0;
|
||||
|
|
@ -2744,7 +2746,7 @@ LLScrollListColumn* LLScrollListCtrl::getColumn(const std::string& name)
|
|||
column_map_t::iterator column_itor = mColumns.find(name);
|
||||
if (column_itor != mColumns.end())
|
||||
{
|
||||
return &column_itor->second;
|
||||
return column_itor->second;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -2805,7 +2807,7 @@ LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLS
|
|||
new_column.width.pixel_width = cell_p.width;
|
||||
}
|
||||
addColumn(new_column);
|
||||
columnp = &mColumns[column];
|
||||
columnp = mColumns[column];
|
||||
new_item->setNumColumns(mColumns.size());
|
||||
}
|
||||
|
||||
|
|
@ -2842,7 +2844,7 @@ LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLS
|
|||
LLScrollListCell* cell = LLScrollListCell::create(LLScrollListCell::Params().value(item_p.value));
|
||||
if (cell)
|
||||
{
|
||||
LLScrollListColumn* columnp = &(mColumns.begin()->second);
|
||||
LLScrollListColumn* columnp = mColumns.begin()->second;
|
||||
|
||||
new_item->setColumn(0, cell);
|
||||
if (columnp->mHeader
|
||||
|
|
@ -2857,10 +2859,10 @@ LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLS
|
|||
// add dummy cells for missing columns
|
||||
for (column_map_t::iterator column_it = mColumns.begin(); column_it != mColumns.end(); ++column_it)
|
||||
{
|
||||
S32 column_idx = column_it->second.mIndex;
|
||||
S32 column_idx = column_it->second->mIndex;
|
||||
if (new_item->getColumn(column_idx) == NULL)
|
||||
{
|
||||
LLScrollListColumn* column_ptr = &column_it->second;
|
||||
LLScrollListColumn* column_ptr = column_it->second;
|
||||
LLScrollListCell::Params cell_p;
|
||||
cell_p.width = column_ptr->getWidth();
|
||||
|
||||
|
|
|
|||
|
|
@ -491,7 +491,7 @@ private:
|
|||
|
||||
mutable bool mSorted;
|
||||
|
||||
typedef std::map<std::string, LLScrollListColumn> column_map_t;
|
||||
typedef std::map<std::string, LLScrollListColumn*> column_map_t;
|
||||
column_map_t mColumns;
|
||||
|
||||
BOOL mDirty;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ LLParamSDParser::LLParamSDParser()
|
|||
|
||||
if (sReadFuncs.empty())
|
||||
{
|
||||
registerParserFuncs<LLInitParam::NoParamValue>(readNoValue, &LLParamSDParser::writeNoValue);
|
||||
registerParserFuncs<S32>(readS32, &LLParamSDParser::writeTypedValue<S32>);
|
||||
registerParserFuncs<U32>(readU32, &LLParamSDParser::writeU32Param);
|
||||
registerParserFuncs<F32>(readF32, &LLParamSDParser::writeTypedValue<F32>);
|
||||
|
|
@ -71,6 +72,18 @@ bool LLParamSDParser::writeU32Param(LLParamSDParser::parser_t& parser, const voi
|
|||
return true;
|
||||
}
|
||||
|
||||
bool LLParamSDParser::writeNoValue(LLParamSDParser::parser_t& parser, const void* val_ptr, const parser_t::name_stack_t& name_stack)
|
||||
{
|
||||
LLParamSDParser& sdparser = static_cast<LLParamSDParser&>(parser);
|
||||
if (!sdparser.mWriteRootSD) return false;
|
||||
|
||||
LLSD* sd_to_write = sdparser.getSDWriteNode(name_stack);
|
||||
if (!sd_to_write) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void LLParamSDParser::readSD(const LLSD& sd, LLInitParam::BaseBlock& block, bool silent)
|
||||
{
|
||||
mCurReadSD = NULL;
|
||||
|
|
@ -87,6 +100,8 @@ void LLParamSDParser::writeSD(LLSD& sd, const LLInitParam::BaseBlock& block)
|
|||
block.serializeBlock(*this);
|
||||
}
|
||||
|
||||
const LLSD NO_VALUE_MARKER;
|
||||
|
||||
void LLParamSDParser::readSDValues(const LLSD& sd, LLInitParam::BaseBlock& block)
|
||||
{
|
||||
if (sd.isMap())
|
||||
|
|
@ -110,6 +125,11 @@ void LLParamSDParser::readSDValues(const LLSD& sd, LLInitParam::BaseBlock& block
|
|||
readSDValues(*it, block);
|
||||
}
|
||||
}
|
||||
else if (sd.isUndefined())
|
||||
{
|
||||
mCurReadSD = &NO_VALUE_MARKER;
|
||||
block.submitValue(mNameStack, *this);
|
||||
}
|
||||
else
|
||||
{
|
||||
mCurReadSD = &sd;
|
||||
|
|
@ -206,6 +226,13 @@ LLSD* LLParamSDParser::getSDWriteNode(const parser_t::name_stack_t& name_stack)
|
|||
return sd_to_write;
|
||||
}
|
||||
|
||||
bool LLParamSDParser::readNoValue(Parser& parser, void* val_ptr)
|
||||
{
|
||||
LLParamSDParser& self = static_cast<LLParamSDParser&>(parser);
|
||||
return self.mCurReadSD == &NO_VALUE_MARKER;
|
||||
}
|
||||
|
||||
|
||||
bool LLParamSDParser::readS32(Parser& parser, void* val_ptr)
|
||||
{
|
||||
LLParamSDParser& self = static_cast<LLParamSDParser&>(parser);
|
||||
|
|
|
|||
|
|
@ -63,7 +63,9 @@ private:
|
|||
LLSD* getSDWriteNode(const parser_t::name_stack_t& name_stack);
|
||||
|
||||
static bool writeU32Param(Parser& parser, const void* value_ptr, const parser_t::name_stack_t& name_stack);
|
||||
static bool writeNoValue(Parser& parser, const void* value_ptr, const parser_t::name_stack_t& name_stack);
|
||||
|
||||
static bool readNoValue(Parser& parser, void* val_ptr);
|
||||
static bool readS32(Parser& parser, void* val_ptr);
|
||||
static bool readU32(Parser& parser, void* val_ptr);
|
||||
static bool readF32(Parser& parser, void* val_ptr);
|
||||
|
|
|
|||
|
|
@ -1596,23 +1596,25 @@ void LLUI::initClass(const settings_map_t& settings,
|
|||
sWindow = NULL; // set later in startup
|
||||
LLFontGL::sShadowColor = LLUIColorTable::instance().getColor("ColorDropShadow");
|
||||
|
||||
LLUICtrl::CommitCallbackRegistry::Registrar& reg = LLUICtrl::CommitCallbackRegistry::defaultRegistrar();
|
||||
|
||||
// Callbacks for associating controls with floater visibilty:
|
||||
LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Floater.Toggle", boost::bind(&LLFloaterReg::toggleFloaterInstance, _2));
|
||||
LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Floater.Show", boost::bind(&LLFloaterReg::showFloaterInstance, _2));
|
||||
LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Floater.Hide", boost::bind(&LLFloaterReg::hideFloaterInstance, _2));
|
||||
LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Floater.InitToVisibilityControl", boost::bind(&LLFloaterReg::initUICtrlToFloaterVisibilityControl, _1, _2));
|
||||
reg.add("Floater.Toggle", boost::bind(&LLFloaterReg::toggleFloaterInstance, _2));
|
||||
reg.add("Floater.Show", boost::bind(&LLFloaterReg::showFloaterInstance, _2));
|
||||
reg.add("Floater.Hide", boost::bind(&LLFloaterReg::hideFloaterInstance, _2));
|
||||
reg.add("Floater.InitToVisibilityControl", boost::bind(&LLFloaterReg::initUICtrlToFloaterVisibilityControl, _1, _2));
|
||||
|
||||
// Button initialization callback for toggle buttons
|
||||
LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Button.SetFloaterToggle", boost::bind(&LLButton::setFloaterToggle, _1, _2));
|
||||
reg.add("Button.SetFloaterToggle", boost::bind(&LLButton::setFloaterToggle, _1, _2));
|
||||
|
||||
// Button initialization callback for toggle buttons on dockale floaters
|
||||
LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Button.SetDockableFloaterToggle", boost::bind(&LLButton::setDockableFloaterToggle, _1, _2));
|
||||
reg.add("Button.SetDockableFloaterToggle", boost::bind(&LLButton::setDockableFloaterToggle, _1, _2));
|
||||
|
||||
// Display the help topic for the current context
|
||||
LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Button.ShowHelp", boost::bind(&LLButton::showHelp, _1, _2));
|
||||
reg.add("Button.ShowHelp", boost::bind(&LLButton::showHelp, _1, _2));
|
||||
|
||||
// Currently unused, but kept for reference:
|
||||
LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Button.ToggleFloater", boost::bind(&LLButton::toggleFloaterAndSetToggleState, _1, _2));
|
||||
reg.add("Button.ToggleFloater", boost::bind(&LLButton::toggleFloaterAndSetToggleState, _1, _2));
|
||||
|
||||
// Used by menus along with Floater.Toggle to display visibility as a checkmark
|
||||
LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.Visible", boost::bind(&LLFloaterReg::floaterInstanceVisible, _2));
|
||||
|
|
|
|||
|
|
@ -215,6 +215,12 @@ bool LLUIColorTable::loadFromSettings()
|
|||
result |= loadFromFilename(current_filename, mLoadedColors);
|
||||
}
|
||||
|
||||
current_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SKIN, "colors.xml");
|
||||
if(current_filename != default_filename)
|
||||
{
|
||||
result |= loadFromFilename(current_filename, mLoadedColors);
|
||||
}
|
||||
|
||||
std::string user_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "colors.xml");
|
||||
loadFromFilename(user_filename, mUserSetColors);
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ public:
|
|||
LLUIString() : mArgs(NULL), mNeedsResult(false), mNeedsWResult(false) {}
|
||||
LLUIString(const std::string& instring, const LLStringUtil::format_map_t& args);
|
||||
LLUIString(const std::string& instring) : mArgs(NULL) { assign(instring); }
|
||||
|
||||
~LLUIString() { delete mArgs; }
|
||||
|
||||
void assign(const std::string& instring);
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include "linden_common.h"
|
||||
#include "llurlentry.h"
|
||||
#include "lluictrl.h"
|
||||
#include "lluri.h"
|
||||
#include "llurlmatch.h"
|
||||
#include "llurlregistry.h"
|
||||
|
|
@ -167,6 +168,15 @@ void LLUrlEntryBase::callObservers(const std::string &id,
|
|||
}
|
||||
}
|
||||
|
||||
/// is this a match for a URL that should not be hyperlinked?
|
||||
bool LLUrlEntryBase::isLinkDisabled() const
|
||||
{
|
||||
// this allows us to have a global setting to turn off text hyperlink highlighting/action
|
||||
bool globally_disabled = LLUI::sSettingGroups["config"]->getBOOL("DisableTextHyperlinkActions");
|
||||
|
||||
return globally_disabled;
|
||||
}
|
||||
|
||||
static std::string getStringAfterToken(const std::string str, const std::string token)
|
||||
{
|
||||
size_t pos = str.find(token);
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@ public:
|
|||
|
||||
virtual LLUUID getID(const std::string &string) const { return LLUUID::null; }
|
||||
|
||||
bool isLinkDisabled() const;
|
||||
|
||||
protected:
|
||||
std::string getIDStringFromUrl(const std::string &url) const;
|
||||
std::string escapeUrl(const std::string &url) const;
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ LLView::Params::Params()
|
|||
left_pad("left_pad"),
|
||||
left_delta("left_delta", S32_MAX),
|
||||
from_xui("from_xui", false),
|
||||
focus_root("focus_root", false),
|
||||
needs_translate("translate"),
|
||||
xmlns("xmlns"),
|
||||
xmlns_xsi("xmlns:xsi"),
|
||||
|
|
@ -117,7 +118,7 @@ LLView::LLView(const LLView::Params& p)
|
|||
mParentView(NULL),
|
||||
mReshapeFlags(FOLLOWS_NONE),
|
||||
mFromXUI(p.from_xui),
|
||||
mIsFocusRoot(FALSE),
|
||||
mIsFocusRoot(p.focus_root),
|
||||
mLastVisible(FALSE),
|
||||
mNextInsertionOrdinal(0),
|
||||
mHoverCursor(getCursorFromString(p.hover_cursor)),
|
||||
|
|
@ -163,8 +164,6 @@ LLView::~LLView()
|
|||
|
||||
if (mDefaultWidgets)
|
||||
{
|
||||
std::for_each(mDefaultWidgets->begin(), mDefaultWidgets->end(),
|
||||
DeletePairedPointer());
|
||||
delete mDefaultWidgets;
|
||||
mDefaultWidgets = NULL;
|
||||
}
|
||||
|
|
@ -1682,18 +1681,7 @@ BOOL LLView::hasChild(const std::string& childname, BOOL recurse) const
|
|||
//-----------------------------------------------------------------------------
|
||||
LLView* LLView::getChildView(const std::string& name, BOOL recurse) const
|
||||
{
|
||||
LLView* child = findChildView(name, recurse);
|
||||
if (!child)
|
||||
{
|
||||
child = getDefaultWidget<LLView>(name);
|
||||
if (!child)
|
||||
{
|
||||
LLView::Params view_params;
|
||||
view_params.name = name;
|
||||
child = LLUICtrlFactory::create<LLView>(view_params);
|
||||
}
|
||||
}
|
||||
return child;
|
||||
return getChild<LLView>(name, recurse);
|
||||
}
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_FIND_VIEWS("Find Widgets");
|
||||
|
|
@ -2804,11 +2792,14 @@ LLView::root_to_view_iterator_t LLView::endRootToView()
|
|||
|
||||
// only create maps on demand, as they incur heap allocation/deallocation cost
|
||||
// when a view is constructed/deconstructed
|
||||
LLView::default_widget_map_t& LLView::getDefaultWidgetMap() const
|
||||
LLView& LLView::getDefaultWidgetContainer() const
|
||||
{
|
||||
if (!mDefaultWidgets)
|
||||
{
|
||||
mDefaultWidgets = new default_widget_map_t();
|
||||
LLView::Params p;
|
||||
p.name = "default widget container";
|
||||
p.visible = false; // ensures default widgets can't steal focus, etc.
|
||||
mDefaultWidgets = new LLView(p);
|
||||
}
|
||||
return *mDefaultWidgets;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,7 +116,8 @@ public:
|
|||
visible,
|
||||
mouse_opaque,
|
||||
use_bounding_rect,
|
||||
from_xui;
|
||||
from_xui,
|
||||
focus_root;
|
||||
|
||||
Optional<S32> tab_group,
|
||||
default_tab_group;
|
||||
|
|
@ -466,12 +467,8 @@ public:
|
|||
|
||||
template <class T> T* getDefaultWidget(const std::string& name) const
|
||||
{
|
||||
default_widget_map_t::const_iterator found_it = getDefaultWidgetMap().find(name);
|
||||
if (found_it == getDefaultWidgetMap().end())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
return dynamic_cast<T*>(found_it->second);
|
||||
LLView* widgetp = getDefaultWidgetContainer().findChildView(name);
|
||||
return dynamic_cast<T*>(widgetp);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////
|
||||
|
|
@ -585,9 +582,9 @@ private:
|
|||
|
||||
typedef std::map<std::string, LLView*> default_widget_map_t;
|
||||
// allocate this map no demand, as it is rarely needed
|
||||
mutable default_widget_map_t* mDefaultWidgets;
|
||||
mutable LLView* mDefaultWidgets;
|
||||
|
||||
default_widget_map_t& getDefaultWidgetMap() const;
|
||||
LLView& getDefaultWidgetContainer() const;
|
||||
|
||||
public:
|
||||
// Depth in view hierarchy during rendering
|
||||
|
|
@ -654,7 +651,7 @@ template <class T> T* LLView::getChild(const std::string& name, BOOL recurse) co
|
|||
return NULL;
|
||||
}
|
||||
|
||||
getDefaultWidgetMap()[name] = result;
|
||||
getDefaultWidgetContainer().addChild(result);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include "linden_common.h"
|
||||
#include "../llurlentry.h"
|
||||
#include "../lluictrl.h"
|
||||
#include "llurlentry_stub.cpp"
|
||||
#include "lltut.h"
|
||||
#include "../lluicolortable.h"
|
||||
|
|
@ -34,6 +35,14 @@
|
|||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
typedef std::map<std::string, LLControlGroup*> settings_map_t;
|
||||
settings_map_t LLUI::sSettingGroups;
|
||||
|
||||
BOOL LLControlGroup::getBOOL(const std::string& name)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
LLUIColor LLUIColorTable::getColor(const std::string& name, const LLColor4& default_color) const
|
||||
{
|
||||
return LLUIColor();
|
||||
|
|
|
|||
|
|
@ -382,11 +382,7 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd
|
|||
break;
|
||||
|
||||
case LL_PATH_USER_SKIN:
|
||||
prefix = getOSUserAppDir();
|
||||
prefix += mDirDelimiter;
|
||||
prefix += "user_settings";
|
||||
prefix += mDirDelimiter;
|
||||
prefix += "skins";
|
||||
prefix = getUserSkinDir();
|
||||
break;
|
||||
|
||||
case LL_PATH_SKINS:
|
||||
|
|
|
|||
|
|
@ -206,14 +206,6 @@ void LLDir_Win32::initAppDirs(const std::string &app_name,
|
|||
}
|
||||
}
|
||||
|
||||
res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SKIN,""));
|
||||
if (res == -1)
|
||||
{
|
||||
if (errno != EEXIST)
|
||||
{
|
||||
llwarns << "Couldn't create LL_PATH_SKINS dir " << getExpandedFilename(LL_PATH_USER_SKIN,"") << llendl;
|
||||
}
|
||||
}
|
||||
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ enum EKeystate
|
|||
KEYSTATE_UP
|
||||
};
|
||||
|
||||
typedef void (*LLKeyFunc)(EKeystate keystate);
|
||||
typedef boost::function<void(EKeystate keystate)> LLKeyFunc;
|
||||
typedef std::string (LLKeyStringTranslatorFunc)(const char *label);
|
||||
|
||||
enum EKeyboardInsertMode
|
||||
|
|
|
|||
|
|
@ -544,7 +544,27 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
|
|||
if (closest_refresh == 0)
|
||||
{
|
||||
LL_WARNS("Window") << "Couldn't find display mode " << width << " by " << height << " at " << BITS_PER_PIXEL << " bits per pixel" << LL_ENDL;
|
||||
success = FALSE;
|
||||
//success = FALSE;
|
||||
|
||||
if (!EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dev_mode))
|
||||
{
|
||||
success = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dev_mode.dmBitsPerPel == BITS_PER_PIXEL)
|
||||
{
|
||||
LL_WARNS("Window") << "Current BBP is OK falling back to that" << LL_ENDL;
|
||||
window_rect.right=width=dev_mode.dmPelsWidth;
|
||||
window_rect.bottom=height=dev_mode.dmPelsHeight;
|
||||
success = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("Window") << "Current BBP is BAD" << LL_ENDL;
|
||||
success = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we found a good resolution, use it.
|
||||
|
|
|
|||
|
|
@ -170,6 +170,20 @@ LLSD LLControlVariable::getComparableValue(const LLSD& value)
|
|||
storable_value = false;
|
||||
}
|
||||
}
|
||||
else if (TYPE_LLSD == type() && value.isString())
|
||||
{
|
||||
LLPointer<LLSDNotationParser> parser = new LLSDNotationParser;
|
||||
LLSD result;
|
||||
std::stringstream value_stream(value.asString());
|
||||
if (parser->parse(value_stream, result, LLSDSerialize::SIZE_UNLIMITED) != LLSDParser::PARSE_FAILURE)
|
||||
{
|
||||
storable_value = result;
|
||||
}
|
||||
else
|
||||
{
|
||||
storable_value = value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
storable_value = value;
|
||||
|
|
|
|||
|
|
@ -312,6 +312,14 @@ namespace LLInitParam
|
|||
}
|
||||
}
|
||||
|
||||
// if no match, and no names left on stack, this is just an existence assertion of this block
|
||||
// verify by calling readValue with NoParamValue type, an inherently unparseable type
|
||||
if (!names_left)
|
||||
{
|
||||
NoParamValue no_value;
|
||||
return p.readValue(no_value);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -278,6 +278,9 @@ namespace LLInitParam
|
|||
S32 mParseGeneration;
|
||||
};
|
||||
|
||||
// used to indicate no matching value to a given name when parsing
|
||||
struct NoParamValue{};
|
||||
|
||||
class BaseBlock;
|
||||
|
||||
class Param
|
||||
|
|
@ -303,8 +306,8 @@ namespace LLInitParam
|
|||
private:
|
||||
friend class BaseBlock;
|
||||
|
||||
bool mIsProvided;
|
||||
U16 mEnclosingBlockOffset;
|
||||
bool mIsProvided;
|
||||
};
|
||||
|
||||
// various callbacks and constraints associated with an individual param
|
||||
|
|
|
|||
|
|
@ -343,4 +343,9 @@ private:
|
|||
ScopedRegistrar* mStaticScope;
|
||||
};
|
||||
|
||||
// helper macro for doing static registration
|
||||
#define GLUED_TOKEN(x, y) x ## y
|
||||
#define GLUE_TOKENS(x, y) GLUED_TOKEN(x, y)
|
||||
#define LLREGISTER_STATIC(REGISTRY, KEY, VALUE) static REGISTRY::StaticRegistrar GLUE_TOKENS(reg, __LINE__)(KEY, VALUE);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -388,6 +388,7 @@ LLXUIParser::LLXUIParser()
|
|||
{
|
||||
if (sXUIReadFuncs.empty())
|
||||
{
|
||||
registerParserFuncs<LLInitParam::NoParamValue>(readNoValue, writeNoValue);
|
||||
registerParserFuncs<bool>(readBoolValue, writeBoolValue);
|
||||
registerParserFuncs<std::string>(readStringValue, writeStringValue);
|
||||
registerParserFuncs<U8>(readU8Value, writeU8Value);
|
||||
|
|
@ -406,6 +407,7 @@ LLXUIParser::LLXUIParser()
|
|||
}
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_PARSE_XUI("XUI Parsing");
|
||||
const LLXMLNodePtr DUMMY_NODE = new LLXMLNode();
|
||||
|
||||
void LLXUIParser::readXUI(LLXMLNodePtr node, LLInitParam::BaseBlock& block, const std::string& filename, bool silent)
|
||||
{
|
||||
|
|
@ -432,6 +434,17 @@ bool LLXUIParser::readXUIImpl(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block)
|
|||
boost::char_separator<char> sep(".");
|
||||
|
||||
bool values_parsed = false;
|
||||
bool silent = mCurReadDepth > 0;
|
||||
|
||||
if (nodep->getFirstChild().isNull()
|
||||
&& nodep->mAttributes.empty()
|
||||
&& nodep->getSanitizedValue().empty())
|
||||
{
|
||||
// empty node, just parse as NoValue
|
||||
mCurReadNode = DUMMY_NODE;
|
||||
return block.submitValue(mNameStack, *this, silent);
|
||||
}
|
||||
|
||||
|
||||
// submit attributes for current node
|
||||
values_parsed |= readAttributes(nodep, block);
|
||||
|
|
@ -444,7 +457,6 @@ bool LLXUIParser::readXUIImpl(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block)
|
|||
mNameStack.push_back(std::make_pair(std::string("value"), newParseGeneration()));
|
||||
// child nodes are not necessarily valid parameters (could be a child widget)
|
||||
// so don't complain once we've recursed
|
||||
bool silent = mCurReadDepth > 0;
|
||||
if (!block.submitValue(mNameStack, *this, true))
|
||||
{
|
||||
mNameStack.pop_back();
|
||||
|
|
@ -549,6 +561,7 @@ bool LLXUIParser::readAttributes(LLXMLNodePtr nodep, LLInitParam::BaseBlock& blo
|
|||
boost::char_separator<char> sep(".");
|
||||
|
||||
bool any_parsed = false;
|
||||
bool silent = mCurReadDepth > 0;
|
||||
|
||||
for(LLXMLAttribList::const_iterator attribute_it = nodep->mAttributes.begin();
|
||||
attribute_it != nodep->mAttributes.end();
|
||||
|
|
@ -567,7 +580,6 @@ bool LLXUIParser::readAttributes(LLXMLNodePtr nodep, LLInitParam::BaseBlock& blo
|
|||
}
|
||||
|
||||
// child nodes are not necessarily valid attributes, so don't complain once we've recursed
|
||||
bool silent = mCurReadDepth > 0;
|
||||
any_parsed |= block.submitValue(mNameStack, *this, silent);
|
||||
|
||||
while(num_tokens_pushed-- > 0)
|
||||
|
|
@ -634,6 +646,19 @@ LLXMLNodePtr LLXUIParser::getNode(const name_stack_t& stack)
|
|||
return (out_node == mWriteRootNode ? LLXMLNodePtr(NULL) : out_node);
|
||||
}
|
||||
|
||||
bool LLXUIParser::readNoValue(Parser& parser, void* val_ptr)
|
||||
{
|
||||
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
|
||||
return self.mCurReadNode == DUMMY_NODE;
|
||||
}
|
||||
|
||||
bool LLXUIParser::writeNoValue(Parser& parser, const void* val_ptr, const name_stack_t& stack)
|
||||
{
|
||||
// just create node
|
||||
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
|
||||
LLXMLNodePtr node = self.getNode(stack);
|
||||
return node.notNull();
|
||||
}
|
||||
|
||||
bool LLXUIParser::readBoolValue(Parser& parser, void* val_ptr)
|
||||
{
|
||||
|
|
@ -1049,6 +1074,8 @@ static LLInitParam::Parser::parser_read_func_map_t sSimpleXUIReadFuncs;
|
|||
static LLInitParam::Parser::parser_write_func_map_t sSimpleXUIWriteFuncs;
|
||||
static LLInitParam::Parser::parser_inspect_func_map_t sSimpleXUIInspectFuncs;
|
||||
|
||||
const char* NO_VALUE_MARKER = "no_value";
|
||||
|
||||
LLSimpleXUIParser::LLSimpleXUIParser(LLSimpleXUIParser::element_start_callback_t element_cb)
|
||||
: Parser(sSimpleXUIReadFuncs, sSimpleXUIWriteFuncs, sSimpleXUIInspectFuncs),
|
||||
mLastWriteGeneration(-1),
|
||||
|
|
@ -1057,6 +1084,7 @@ LLSimpleXUIParser::LLSimpleXUIParser(LLSimpleXUIParser::element_start_callback_t
|
|||
{
|
||||
if (sSimpleXUIReadFuncs.empty())
|
||||
{
|
||||
registerParserFuncs<LLInitParam::NoParamValue>(readNoValue);
|
||||
registerParserFuncs<bool>(readBoolValue);
|
||||
registerParserFuncs<std::string>(readStringValue);
|
||||
registerParserFuncs<U8>(readU8Value);
|
||||
|
|
@ -1120,6 +1148,8 @@ bool LLSimpleXUIParser::readXUI(const std::string& filename, LLInitParam::BaseBl
|
|||
return false;
|
||||
}
|
||||
|
||||
mEmptyLeafNode.push_back(false);
|
||||
|
||||
if( !XML_ParseBuffer(mParser, bytes_read, TRUE ) )
|
||||
{
|
||||
LL_WARNS("ReadXUI") << "Error while parsing file " << filename << LL_ENDL;
|
||||
|
|
@ -1127,6 +1157,8 @@ bool LLSimpleXUIParser::readXUI(const std::string& filename, LLInitParam::BaseBl
|
|||
return false;
|
||||
}
|
||||
|
||||
mEmptyLeafNode.pop_back();
|
||||
|
||||
XML_ParserFree( mParser );
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1211,8 +1243,14 @@ void LLSimpleXUIParser::startElement(const char *name, const char **atts)
|
|||
}
|
||||
}
|
||||
|
||||
// parent node is not empty
|
||||
mEmptyLeafNode.back() = false;
|
||||
// we are empty if we have no attributes
|
||||
mEmptyLeafNode.push_back(atts[0] == NULL);
|
||||
|
||||
mTokenSizeStack.push_back(num_tokens_pushed);
|
||||
readAttributes(atts);
|
||||
|
||||
}
|
||||
|
||||
bool LLSimpleXUIParser::readAttributes(const char **atts)
|
||||
|
|
@ -1246,7 +1284,7 @@ bool LLSimpleXUIParser::readAttributes(const char **atts)
|
|||
return any_parsed;
|
||||
}
|
||||
|
||||
void LLSimpleXUIParser::processText()
|
||||
bool LLSimpleXUIParser::processText()
|
||||
{
|
||||
if (!mTextContents.empty())
|
||||
{
|
||||
|
|
@ -1259,12 +1297,22 @@ void LLSimpleXUIParser::processText()
|
|||
mNameStack.pop_back();
|
||||
}
|
||||
mTextContents.clear();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLSimpleXUIParser::endElement(const char *name)
|
||||
{
|
||||
processText();
|
||||
bool has_text = processText();
|
||||
|
||||
// no text, attributes, or children
|
||||
if (!has_text && mEmptyLeafNode.back())
|
||||
{
|
||||
// submit this as a valueless name (even though there might be text contents we haven't seen yet)
|
||||
mCurAttributeValueBegin = NO_VALUE_MARKER;
|
||||
mOutputStack.back().first->submitValue(mNameStack, *this, mParseSilently);
|
||||
}
|
||||
|
||||
if (--mOutputStack.back().second == 0)
|
||||
{
|
||||
|
|
@ -1282,6 +1330,7 @@ void LLSimpleXUIParser::endElement(const char *name)
|
|||
mNameStack.pop_back();
|
||||
}
|
||||
mScope.pop_back();
|
||||
mEmptyLeafNode.pop_back();
|
||||
}
|
||||
|
||||
void LLSimpleXUIParser::characterData(const char *s, int len)
|
||||
|
|
@ -1328,6 +1377,12 @@ void LLSimpleXUIParser::parserError(const std::string& message)
|
|||
#endif
|
||||
}
|
||||
|
||||
bool LLSimpleXUIParser::readNoValue(Parser& parser, void* val_ptr)
|
||||
{
|
||||
LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser);
|
||||
return self.mCurAttributeValueBegin == NO_VALUE_MARKER;
|
||||
}
|
||||
|
||||
bool LLSimpleXUIParser::readBoolValue(Parser& parser, void* val_ptr)
|
||||
{
|
||||
LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser);
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ private:
|
|||
bool readAttributes(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block);
|
||||
|
||||
//reader helper functions
|
||||
static bool readNoValue(Parser& parser, void* val_ptr);
|
||||
static bool readBoolValue(Parser& parser, void* val_ptr);
|
||||
static bool readStringValue(Parser& parser, void* val_ptr);
|
||||
static bool readU8Value(Parser& parser, void* val_ptr);
|
||||
|
|
@ -132,6 +133,7 @@ private:
|
|||
static bool readSDValue(Parser& parser, void* val_ptr);
|
||||
|
||||
//writer helper functions
|
||||
static bool writeNoValue(Parser& parser, const void* val_ptr, const name_stack_t&);
|
||||
static bool writeBoolValue(Parser& parser, const void* val_ptr, const name_stack_t&);
|
||||
static bool writeStringValue(Parser& parser, const void* val_ptr, const name_stack_t&);
|
||||
static bool writeU8Value(Parser& parser, const void* val_ptr, const name_stack_t&);
|
||||
|
|
@ -194,6 +196,7 @@ public:
|
|||
|
||||
private:
|
||||
//reader helper functions
|
||||
static bool readNoValue(Parser&, void* val_ptr);
|
||||
static bool readBoolValue(Parser&, void* val_ptr);
|
||||
static bool readStringValue(Parser&, void* val_ptr);
|
||||
static bool readU8Value(Parser&, void* val_ptr);
|
||||
|
|
@ -218,7 +221,7 @@ private:
|
|||
void endElement(const char *name);
|
||||
void characterData(const char *s, int len);
|
||||
bool readAttributes(const char **atts);
|
||||
void processText();
|
||||
bool processText();
|
||||
|
||||
Parser::name_stack_t mNameStack;
|
||||
struct XML_ParserStruct* mParser;
|
||||
|
|
@ -230,6 +233,7 @@ private:
|
|||
const char* mCurAttributeValueBegin;
|
||||
std::vector<S32> mTokenSizeStack;
|
||||
std::vector<std::string> mScope;
|
||||
std::vector<bool> mEmptyLeafNode;
|
||||
element_start_callback_t mElementCB;
|
||||
|
||||
std::vector<std::pair<LLInitParam::BaseBlock*, S32> > mOutputStack;
|
||||
|
|
|
|||
|
|
@ -1325,7 +1325,7 @@ set(viewer_APPSETTINGS_FILES
|
|||
app_settings/grass.xml
|
||||
app_settings/high_graphics.xml
|
||||
app_settings/ignorable_dialogs.xml
|
||||
app_settings/keys.ini
|
||||
app_settings/keys.xml
|
||||
app_settings/keywords.ini
|
||||
app_settings/logcontrol.xml
|
||||
app_settings/low_graphics.xml
|
||||
|
|
|
|||
|
|
@ -392,6 +392,13 @@
|
|||
<string>CrashOnStartup</string>
|
||||
</map>
|
||||
|
||||
<key>fullscreen</key>
|
||||
<map>
|
||||
<key>desc</key>
|
||||
<string>Force full screen mode</string>
|
||||
<key>map-to</key>
|
||||
<string>WindowFullScreen</string>
|
||||
</map>
|
||||
<key>disablecrashlogger</key>
|
||||
<map>
|
||||
<key>desc</key>
|
||||
|
|
@ -399,6 +406,5 @@
|
|||
<key>map-to</key>
|
||||
<string>DisableCrashLogger</string>
|
||||
</map>
|
||||
|
||||
</map>
|
||||
</llsd>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,17 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>FirstNotUseAvatarPicker</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Shows hint when resident doesn't activate avatar picker</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>FirstNotUseSidePanel</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -56,6 +67,17 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>FirstViewPopup</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Shows hint when resident opens view popup</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>FirstReceiveLindens</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -1,357 +0,0 @@
|
|||
# keys.ini
|
||||
#
|
||||
# keyboard binding initialization
|
||||
#
|
||||
# comments must have # in the first column
|
||||
# blank lines OK
|
||||
#
|
||||
# Format:
|
||||
# mode key mask function
|
||||
#
|
||||
# mode must be one of FIRST_PERSON, THIRD_PERSON, EDIT, EDIT_AVATAR, or CONVERSATION
|
||||
# key must be upper case, or SPACE, HOME, END, PGUP, PGDN, LEFT, RIGHT, UP, DOWN,
|
||||
# or one of ,.;'[]
|
||||
# mask must be NONE, SHIFT, ALT, ALT_SHIFT.
|
||||
# Control is reserved for user commands.
|
||||
# function must be a function named in llkeyboard.cpp
|
||||
|
||||
FIRST_PERSON A NONE slide_left
|
||||
FIRST_PERSON D NONE slide_right
|
||||
FIRST_PERSON W NONE push_forward
|
||||
FIRST_PERSON S NONE push_backward
|
||||
FIRST_PERSON E NONE jump
|
||||
FIRST_PERSON C NONE push_down
|
||||
FIRST_PERSON F NONE toggle_fly
|
||||
|
||||
FIRST_PERSON LEFT NONE slide_left
|
||||
FIRST_PERSON RIGHT NONE slide_right
|
||||
FIRST_PERSON UP NONE push_forward
|
||||
FIRST_PERSON DOWN NONE push_backward
|
||||
FIRST_PERSON PGUP NONE jump
|
||||
FIRST_PERSON PGDN NONE push_down
|
||||
FIRST_PERSON HOME NONE toggle_fly
|
||||
|
||||
FIRST_PERSON PAD_LEFT NONE slide_left
|
||||
FIRST_PERSON PAD_RIGHT NONE slide_right
|
||||
FIRST_PERSON PAD_UP NONE push_forward
|
||||
FIRST_PERSON PAD_DOWN NONE push_backward
|
||||
FIRST_PERSON PAD_PGUP NONE jump
|
||||
FIRST_PERSON PAD_PGDN NONE push_down
|
||||
FIRST_PERSON PAD_HOME NONE toggle_fly
|
||||
FIRST_PERSON PAD_CENTER NONE stop_moving
|
||||
FIRST_PERSON PAD_ENTER NONE start_chat
|
||||
FIRST_PERSON PAD_DIVIDE NONE start_gesture
|
||||
|
||||
FIRST_PERSON A SHIFT slide_left
|
||||
FIRST_PERSON D SHIFT slide_right
|
||||
FIRST_PERSON W SHIFT push_forward
|
||||
FIRST_PERSON S SHIFT push_backward
|
||||
FIRST_PERSON E SHIFT jump
|
||||
FIRST_PERSON C SHIFT push_down
|
||||
FIRST_PERSON F SHIFT toggle_fly
|
||||
|
||||
FIRST_PERSON SPACE NONE stop_moving
|
||||
FIRST_PERSON ENTER NONE start_chat
|
||||
FIRST_PERSON DIVIDE NONE start_gesture
|
||||
|
||||
FIRST_PERSON LEFT SHIFT slide_left
|
||||
FIRST_PERSON RIGHT SHIFT slide_right
|
||||
FIRST_PERSON UP SHIFT push_forward
|
||||
FIRST_PERSON DOWN SHIFT push_backward
|
||||
FIRST_PERSON PGUP SHIFT jump
|
||||
FIRST_PERSON PGDN SHIFT push_down
|
||||
|
||||
FIRST_PERSON PAD_LEFT SHIFT slide_left
|
||||
FIRST_PERSON PAD_RIGHT SHIFT slide_right
|
||||
FIRST_PERSON PAD_UP SHIFT push_forward
|
||||
FIRST_PERSON PAD_DOWN SHIFT push_backward
|
||||
FIRST_PERSON PAD_PGUP SHIFT jump
|
||||
FIRST_PERSON PAD_PGDN SHIFT push_down
|
||||
FIRST_PERSON PAD_HOME SHIFT toggle_fly
|
||||
FIRST_PERSON PAD_ENTER SHIFT start_chat
|
||||
FIRST_PERSON PAD_DIVIDE SHIFT start_gesture
|
||||
|
||||
THIRD_PERSON A NONE turn_left
|
||||
THIRD_PERSON D NONE turn_right
|
||||
THIRD_PERSON A SHIFT slide_left
|
||||
THIRD_PERSON D SHIFT slide_right
|
||||
THIRD_PERSON W NONE push_forward
|
||||
THIRD_PERSON S NONE push_backward
|
||||
THIRD_PERSON W SHIFT push_forward
|
||||
THIRD_PERSON S SHIFT push_backward
|
||||
THIRD_PERSON E NONE jump
|
||||
THIRD_PERSON C NONE push_down
|
||||
THIRD_PERSON E SHIFT jump
|
||||
THIRD_PERSON C SHIFT push_down
|
||||
|
||||
THIRD_PERSON F NONE toggle_fly
|
||||
THIRD_PERSON F SHIFT toggle_fly
|
||||
|
||||
THIRD_PERSON SPACE NONE stop_moving
|
||||
THIRD_PERSON ENTER NONE start_chat
|
||||
THIRD_PERSON DIVIDE NONE start_gesture
|
||||
|
||||
THIRD_PERSON LEFT NONE turn_left
|
||||
THIRD_PERSON LEFT SHIFT slide_left
|
||||
THIRD_PERSON RIGHT NONE turn_right
|
||||
THIRD_PERSON RIGHT SHIFT slide_right
|
||||
THIRD_PERSON UP NONE push_forward
|
||||
THIRD_PERSON DOWN NONE push_backward
|
||||
THIRD_PERSON UP SHIFT push_forward
|
||||
THIRD_PERSON DOWN SHIFT push_backward
|
||||
THIRD_PERSON PGUP NONE jump
|
||||
THIRD_PERSON PGDN NONE push_down
|
||||
THIRD_PERSON PGUP SHIFT jump
|
||||
THIRD_PERSON PGDN SHIFT push_down
|
||||
THIRD_PERSON HOME SHIFT toggle_fly
|
||||
THIRD_PERSON HOME NONE toggle_fly
|
||||
|
||||
THIRD_PERSON PAD_LEFT NONE turn_left
|
||||
THIRD_PERSON PAD_LEFT SHIFT slide_left
|
||||
THIRD_PERSON PAD_RIGHT NONE turn_right
|
||||
THIRD_PERSON PAD_RIGHT SHIFT slide_right
|
||||
THIRD_PERSON PAD_UP NONE push_forward
|
||||
THIRD_PERSON PAD_DOWN NONE push_backward
|
||||
THIRD_PERSON PAD_UP SHIFT push_forward
|
||||
THIRD_PERSON PAD_DOWN SHIFT push_backward
|
||||
THIRD_PERSON PAD_PGUP NONE jump
|
||||
THIRD_PERSON PAD_PGDN NONE push_down
|
||||
THIRD_PERSON PAD_PGUP SHIFT jump
|
||||
THIRD_PERSON PAD_PGDN SHIFT push_down
|
||||
THIRD_PERSON PAD_HOME NONE toggle_fly
|
||||
THIRD_PERSON PAD_HOME SHIFT toggle_fly
|
||||
THIRD_PERSON PAD_CENTER NONE stop_moving
|
||||
THIRD_PERSON PAD_CENTER SHIFT stop_moving
|
||||
THIRD_PERSON PAD_ENTER NONE start_chat
|
||||
THIRD_PERSON PAD_ENTER SHIFT start_chat
|
||||
THIRD_PERSON PAD_DIVIDE NONE start_gesture
|
||||
THIRD_PERSON PAD_DIVIDE SHIFT start_gesture
|
||||
|
||||
# Camera controls in third person on Alt
|
||||
THIRD_PERSON LEFT ALT spin_around_cw
|
||||
THIRD_PERSON RIGHT ALT spin_around_ccw
|
||||
THIRD_PERSON UP ALT move_forward
|
||||
THIRD_PERSON DOWN ALT move_backward
|
||||
THIRD_PERSON PGUP ALT spin_over
|
||||
THIRD_PERSON PGDN ALT spin_under
|
||||
|
||||
THIRD_PERSON A ALT spin_around_cw
|
||||
THIRD_PERSON D ALT spin_around_ccw
|
||||
THIRD_PERSON W ALT move_forward
|
||||
THIRD_PERSON S ALT move_backward
|
||||
THIRD_PERSON E ALT spin_over
|
||||
THIRD_PERSON C ALT spin_under
|
||||
|
||||
THIRD_PERSON PAD_LEFT ALT spin_around_cw
|
||||
THIRD_PERSON PAD_RIGHT ALT spin_around_ccw
|
||||
THIRD_PERSON PAD_UP ALT move_forward
|
||||
THIRD_PERSON PAD_DOWN ALT move_backward
|
||||
THIRD_PERSON PAD_PGUP ALT spin_over
|
||||
THIRD_PERSON PAD_PGDN ALT spin_under
|
||||
THIRD_PERSON PAD_ENTER ALT start_chat
|
||||
THIRD_PERSON PAD_DIVIDE ALT start_gesture
|
||||
|
||||
# mimic alt zoom behavior with keyboard only
|
||||
THIRD_PERSON A CTL_ALT spin_around_cw
|
||||
THIRD_PERSON D CTL_ALT spin_around_ccw
|
||||
THIRD_PERSON W CTL_ALT spin_over
|
||||
THIRD_PERSON S CTL_ALT spin_under
|
||||
THIRD_PERSON E CTL_ALT spin_over
|
||||
THIRD_PERSON C CTL_ALT spin_under
|
||||
|
||||
THIRD_PERSON LEFT CTL_ALT spin_around_cw
|
||||
THIRD_PERSON RIGHT CTL_ALT spin_around_ccw
|
||||
THIRD_PERSON UP CTL_ALT spin_over
|
||||
THIRD_PERSON DOWN CTL_ALT spin_under
|
||||
THIRD_PERSON PGUP CTL_ALT spin_over
|
||||
THIRD_PERSON PGDN CTL_ALT spin_under
|
||||
|
||||
THIRD_PERSON PAD_LEFT CTL_ALT spin_around_cw
|
||||
THIRD_PERSON PAD_RIGHT CTL_ALT spin_around_ccw
|
||||
THIRD_PERSON PAD_UP CTL_ALT spin_over
|
||||
THIRD_PERSON PAD_DOWN CTL_ALT spin_under
|
||||
THIRD_PERSON PAD_PGUP CTL_ALT spin_over
|
||||
THIRD_PERSON PAD_PGDN CTL_ALT spin_under
|
||||
THIRD_PERSON PAD_ENTER CTL_ALT start_chat
|
||||
THIRD_PERSON PAD_DIVIDE CTL_ALT start_gesture
|
||||
|
||||
# Therefore pan on Alt-Shift
|
||||
THIRD_PERSON A CTL_ALT_SHIFT pan_left
|
||||
THIRD_PERSON D CTL_ALT_SHIFT pan_right
|
||||
THIRD_PERSON W CTL_ALT_SHIFT pan_up
|
||||
THIRD_PERSON S CTL_ALT_SHIFT pan_down
|
||||
|
||||
THIRD_PERSON LEFT CTL_ALT_SHIFT pan_left
|
||||
THIRD_PERSON RIGHT CTL_ALT_SHIFT pan_right
|
||||
THIRD_PERSON UP CTL_ALT_SHIFT pan_up
|
||||
THIRD_PERSON DOWN CTL_ALT_SHIFT pan_down
|
||||
|
||||
THIRD_PERSON PAD_LEFT CTL_ALT_SHIFT pan_left
|
||||
THIRD_PERSON PAD_RIGHT CTL_ALT_SHIFT pan_right
|
||||
THIRD_PERSON PAD_UP CTL_ALT_SHIFT pan_up
|
||||
THIRD_PERSON PAD_DOWN CTL_ALT_SHIFT pan_down
|
||||
THIRD_PERSON PAD_ENTER CTL_ALT_SHIFT start_chat
|
||||
THIRD_PERSON PAD_DIVIDE CTL_ALT_SHIFT start_gesture
|
||||
|
||||
# Basic editing camera control
|
||||
EDIT A NONE spin_around_cw
|
||||
EDIT D NONE spin_around_ccw
|
||||
EDIT W NONE move_forward
|
||||
EDIT S NONE move_backward
|
||||
EDIT E NONE spin_over
|
||||
EDIT C NONE spin_under
|
||||
EDIT ENTER NONE start_chat
|
||||
EDIT DIVIDE NONE start_gesture
|
||||
EDIT PAD_ENTER NONE start_chat
|
||||
EDIT PAD_DIVIDE NONE start_gesture
|
||||
|
||||
EDIT LEFT NONE spin_around_cw
|
||||
EDIT RIGHT NONE spin_around_ccw
|
||||
EDIT UP NONE move_forward
|
||||
EDIT DOWN NONE move_backward
|
||||
EDIT PGUP NONE spin_over
|
||||
EDIT PGDN NONE spin_under
|
||||
|
||||
EDIT A SHIFT pan_left
|
||||
EDIT D SHIFT pan_right
|
||||
EDIT W SHIFT pan_up
|
||||
EDIT S SHIFT pan_down
|
||||
|
||||
EDIT LEFT SHIFT pan_left
|
||||
EDIT RIGHT SHIFT pan_right
|
||||
EDIT UP SHIFT pan_up
|
||||
EDIT DOWN SHIFT pan_down
|
||||
|
||||
# Walking works with ALT held down.
|
||||
EDIT A ALT slide_left
|
||||
EDIT D ALT slide_right
|
||||
EDIT W ALT push_forward
|
||||
EDIT S ALT push_backward
|
||||
EDIT E ALT jump
|
||||
EDIT C ALT push_down
|
||||
|
||||
EDIT LEFT ALT slide_left
|
||||
EDIT RIGHT ALT slide_right
|
||||
EDIT UP ALT push_forward
|
||||
EDIT DOWN ALT push_backward
|
||||
EDIT PGUP ALT jump
|
||||
EDIT PGDN ALT push_down
|
||||
EDIT HOME ALT toggle_fly
|
||||
|
||||
EDIT PAD_LEFT ALT slide_left
|
||||
EDIT PAD_RIGHT ALT slide_right
|
||||
EDIT PAD_UP ALT push_forward
|
||||
EDIT PAD_DOWN ALT push_backward
|
||||
EDIT PAD_PGUP ALT jump
|
||||
EDIT PAD_PGDN ALT push_down
|
||||
EDIT PAD_ENTER ALT start_chat
|
||||
EDIT PAD_DIVIDE ALT start_gesture
|
||||
|
||||
SITTING A ALT spin_around_cw
|
||||
SITTING D ALT spin_around_ccw
|
||||
SITTING W ALT move_forward
|
||||
SITTING S ALT move_backward
|
||||
SITTING E ALT spin_over_sitting
|
||||
SITTING C ALT spin_under_sitting
|
||||
|
||||
SITTING LEFT ALT spin_around_cw
|
||||
SITTING RIGHT ALT spin_around_ccw
|
||||
SITTING UP ALT move_forward
|
||||
SITTING DOWN ALT move_backward
|
||||
SITTING PGUP ALT spin_over
|
||||
SITTING PGDN ALT spin_under
|
||||
|
||||
SITTING A CTL_ALT spin_around_cw
|
||||
SITTING D CTL_ALT spin_around_ccw
|
||||
SITTING W CTL_ALT spin_over
|
||||
SITTING S CTL_ALT spin_under
|
||||
SITTING E CTL_ALT spin_over
|
||||
SITTING C CTL_ALT spin_under
|
||||
|
||||
SITTING LEFT CTL_ALT spin_around_cw
|
||||
SITTING RIGHT CTL_ALT spin_around_ccw
|
||||
SITTING UP CTL_ALT spin_over
|
||||
SITTING DOWN CTL_ALT spin_under
|
||||
SITTING PGUP CTL_ALT spin_over
|
||||
SITTING PGDN CTL_ALT spin_under
|
||||
|
||||
|
||||
SITTING A NONE spin_around_cw_sitting
|
||||
SITTING D NONE spin_around_ccw_sitting
|
||||
SITTING W NONE move_forward_sitting
|
||||
SITTING S NONE move_backward_sitting
|
||||
SITTING E NONE spin_over_sitting
|
||||
SITTING C NONE spin_under_sitting
|
||||
|
||||
SITTING LEFT NONE spin_around_cw_sitting
|
||||
SITTING RIGHT NONE spin_around_ccw_sitting
|
||||
SITTING UP NONE move_forward_sitting
|
||||
SITTING DOWN NONE move_backward_sitting
|
||||
SITTING PGUP NONE spin_over_sitting
|
||||
SITTING PGDN NONE spin_under_sitting
|
||||
|
||||
SITTING PAD_LEFT NONE spin_around_cw_sitting
|
||||
SITTING PAD_RIGHT NONE spin_around_ccw_sitting
|
||||
SITTING PAD_UP NONE move_forward_sitting
|
||||
SITTING PAD_DOWN NONE move_backward_sitting
|
||||
SITTING PAD_PGUP NONE spin_over_sitting
|
||||
SITTING PAD_PGDN NONE spin_under_sitting
|
||||
SITTING PAD_CENTER NONE stop_moving
|
||||
SITTING PAD_ENTER NONE start_chat
|
||||
SITTING PAD_DIVIDE NONE start_gesture
|
||||
|
||||
# these are for passing controls when sitting on vehicles
|
||||
SITTING A SHIFT slide_left
|
||||
SITTING D SHIFT slide_right
|
||||
SITTING LEFT SHIFT slide_left
|
||||
SITTING RIGHT SHIFT slide_right
|
||||
|
||||
SITTING PAD_LEFT SHIFT slide_left
|
||||
SITTING PAD_RIGHT SHIFT slide_right
|
||||
SITTING PAD_ENTER SHIFT start_chat
|
||||
SITTING PAD_DIVIDE SHIFT start_gesture
|
||||
|
||||
# pan on Alt-Shift
|
||||
SITTING A CTL_ALT_SHIFT pan_left
|
||||
SITTING D CTL_ALT_SHIFT pan_right
|
||||
SITTING W CTL_ALT_SHIFT pan_up
|
||||
SITTING S CTL_ALT_SHIFT pan_down
|
||||
|
||||
SITTING LEFT CTL_ALT_SHIFT pan_left
|
||||
SITTING RIGHT CTL_ALT_SHIFT pan_right
|
||||
SITTING UP CTL_ALT_SHIFT pan_up
|
||||
SITTING DOWN CTL_ALT_SHIFT pan_down
|
||||
|
||||
SITTING PAD_LEFT CTL_ALT_SHIFT pan_left
|
||||
SITTING PAD_RIGHT CTL_ALT_SHIFT pan_right
|
||||
SITTING PAD_UP CTL_ALT_SHIFT pan_up
|
||||
SITTING PAD_DOWN CTL_ALT_SHIFT pan_down
|
||||
SITTING PAD_ENTER CTL_ALT_SHIFT start_chat
|
||||
SITTING PAD_DIVIDE CTL_ALT_SHIFT start_gesture
|
||||
|
||||
SITTING ENTER NONE start_chat
|
||||
SITTING DIVIDE NONE start_gesture
|
||||
|
||||
# Avatar editing camera controls
|
||||
EDIT_AVATAR A NONE edit_avatar_spin_cw
|
||||
EDIT_AVATAR D NONE edit_avatar_spin_ccw
|
||||
EDIT_AVATAR W NONE edit_avatar_move_forward
|
||||
EDIT_AVATAR S NONE edit_avatar_move_backward
|
||||
EDIT_AVATAR E NONE edit_avatar_spin_over
|
||||
EDIT_AVATAR C NONE edit_avatar_spin_under
|
||||
EDIT_AVATAR LEFT NONE edit_avatar_spin_cw
|
||||
EDIT_AVATAR RIGHT NONE edit_avatar_spin_ccw
|
||||
EDIT_AVATAR UP NONE edit_avatar_move_forward
|
||||
EDIT_AVATAR DOWN NONE edit_avatar_move_backward
|
||||
EDIT_AVATAR PGUP NONE edit_avatar_spin_over
|
||||
EDIT_AVATAR PGDN NONE edit_avatar_spin_under
|
||||
EDIT_AVATAR ENTER NONE start_chat
|
||||
EDIT_AVATAR DIVIDE NONE start_gesture
|
||||
EDIT_AVATAR PAD_LEFT NONE edit_avatar_spin_cw
|
||||
EDIT_AVATAR PAD_RIGHT NONE edit_avatar_spin_ccw
|
||||
EDIT_AVATAR PAD_UP NONE edit_avatar_move_forward
|
||||
EDIT_AVATAR PAD_DOWN NONE edit_avatar_move_backward
|
||||
EDIT_AVATAR PAD_PGUP NONE edit_avatar_spin_over
|
||||
EDIT_AVATAR PAD_PGDN NONE edit_avatar_spin_under
|
||||
EDIT_AVATAR PAD_ENTER NONE start_chat
|
||||
EDIT_AVATAR PAD_DIVIDE NONE start_gesture
|
||||
|
|
@ -0,0 +1,350 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<keys>
|
||||
<first_person>
|
||||
<binding key="A" mask="NONE" command="slide_left"/>
|
||||
<binding key="D" mask="NONE" command="slide_right"/>
|
||||
<binding key="W" mask="NONE" command="push_forward"/>
|
||||
<binding key="S" mask="NONE" command="push_backward"/>
|
||||
<binding key="E" mask="NONE" command="jump"/>
|
||||
<binding key="C" mask="NONE" command="push_down"/>
|
||||
<binding key="F" mask="NONE" command="toggle_fly"/>
|
||||
|
||||
<binding key="LEFT" mask="NONE" command="slide_left"/>
|
||||
<binding key="RIGHT" mask="NONE" command="slide_right"/>
|
||||
<binding key="UP" mask="NONE" command="push_forward"/>
|
||||
<binding key="DOWN" mask="NONE" command="push_backward"/>
|
||||
<binding key="PGUP" mask="NONE" command="jump"/>
|
||||
<binding key="PGDN" mask="NONE" command="push_down"/>
|
||||
<binding key="HOME" mask="NONE" command="toggle_fly"/>
|
||||
|
||||
<binding key="PAD_LEFT" mask="NONE" command="slide_left"/>
|
||||
<binding key="PAD_RIGHT" mask="NONE" command="slide_right"/>
|
||||
<binding key="PAD_UP" mask="NONE" command="push_forward"/>
|
||||
<binding key="PAD_DOWN" mask="NONE" command="push_backward"/>
|
||||
<binding key="PAD_PGUP" mask="NONE" command="jump"/>
|
||||
<binding key="PAD_PGDN" mask="NONE" command="push_down"/>
|
||||
<binding key="PAD_HOME" mask="NONE" command="toggle_fly"/>
|
||||
<binding key="PAD_CENTER" mask="NONE" command="stop_moving"/>
|
||||
<binding key="PAD_ENTER" mask="NONE" command="start_chat"/>
|
||||
<binding key="PAD_DIVIDE" mask="NONE" command="start_gesture"/>
|
||||
|
||||
<binding key="A" mask="SHIFT" command="slide_left"/>
|
||||
<binding key="D" mask="SHIFT" command="slide_right"/>
|
||||
<binding key="W" mask="SHIFT" command="push_forward"/>
|
||||
<binding key="S" mask="SHIFT" command="push_backward"/>
|
||||
<binding key="E" mask="SHIFT" command="jump"/>
|
||||
<binding key="C" mask="SHIFT" command="push_down"/>
|
||||
<binding key="F" mask="SHIFT" command="toggle_fly"/>
|
||||
|
||||
<binding key="SPACE" mask="NONE" command="stop_moving"/>
|
||||
<binding key="ENTER" mask="NONE" command="start_chat"/>
|
||||
<binding key="DIVIDE" mask="NONE" command="start_gesture"/>
|
||||
|
||||
<binding key="LEFT" mask="SHIFT" command="slide_left"/>
|
||||
<binding key="RIGHT" mask="SHIFT" command="slide_right"/>
|
||||
<binding key="UP" mask="SHIFT" command="push_forward"/>
|
||||
<binding key="DOWN" mask="SHIFT" command="push_backward"/>
|
||||
<binding key="PGUP" mask="SHIFT" command="jump"/>
|
||||
<binding key="PGDN" mask="SHIFT" command="push_down"/>
|
||||
|
||||
<binding key="PAD_LEFT" mask="SHIFT" command="slide_left"/>
|
||||
<binding key="PAD_RIGHT" mask="SHIFT" command="slide_right"/>
|
||||
<binding key="PAD_UP" mask="SHIFT" command="push_forward"/>
|
||||
<binding key="PAD_DOWN" mask="SHIFT" command="push_backward"/>
|
||||
<binding key="PAD_PGUP" mask="SHIFT" command="jump"/>
|
||||
<binding key="PAD_PGDN" mask="SHIFT" command="push_down"/>
|
||||
<binding key="PAD_HOME" mask="SHIFT" command="toggle_fly"/>
|
||||
<binding key="PAD_ENTER" mask="SHIFT" command="start_chat"/>
|
||||
<binding key="PAD_DIVIDE" mask="SHIFT" command="start_gesture"/>
|
||||
</first_person>
|
||||
<third_person>
|
||||
<binding key="A" mask="NONE" command="turn_left"/>
|
||||
<binding key="D" mask="NONE" command="turn_right"/>
|
||||
<binding key="A" mask="SHIFT" command="slide_left"/>
|
||||
<binding key="D" mask="SHIFT" command="slide_right"/>
|
||||
<binding key="W" mask="NONE" command="push_forward"/>
|
||||
<binding key="S" mask="NONE" command="push_backward"/>
|
||||
<binding key="W" mask="SHIFT" command="push_forward"/>
|
||||
<binding key="S" mask="SHIFT" command="push_backward"/>
|
||||
<binding key="E" mask="NONE" command="jump"/>
|
||||
<binding key="C" mask="NONE" command="push_down"/>
|
||||
<binding key="E" mask="SHIFT" command="jump"/>
|
||||
<binding key="C" mask="SHIFT" command="push_down"/>
|
||||
|
||||
<binding key="F" mask="NONE" command="toggle_fly"/>
|
||||
<binding key="F" mask="SHIFT" command="toggle_fly"/>
|
||||
|
||||
<binding key="SPACE" mask="NONE" command="stop_moving"/>
|
||||
<binding key="ENTER" mask="NONE" command="start_chat"/>
|
||||
<binding key="DIVIDE" mask="NONE" command="start_gesture"/>
|
||||
|
||||
<binding key="LEFT" mask="NONE" command="turn_left"/>
|
||||
<binding key="LEFT" mask="SHIFT" command="slide_left"/>
|
||||
<binding key="RIGHT" mask="NONE" command="turn_right"/>
|
||||
<binding key="RIGHT" mask="SHIFT" command="slide_right"/>
|
||||
<binding key="UP" mask="NONE" command="push_forward"/>
|
||||
<binding key="DOWN" mask="NONE" command="push_backward"/>
|
||||
<binding key="UP" mask="SHIFT" command="push_forward"/>
|
||||
<binding key="DOWN" mask="SHIFT" command="push_backward"/>
|
||||
<binding key="PGUP" mask="NONE" command="jump"/>
|
||||
<binding key="PGDN" mask="NONE" command="push_down"/>
|
||||
<binding key="PGUP" mask="SHIFT" command="jump"/>
|
||||
<binding key="PGDN" mask="SHIFT" command="push_down"/>
|
||||
<binding key="HOME" mask="SHIFT" command="toggle_fly"/>
|
||||
<binding key="HOME" mask="NONE" command="toggle_fly"/>
|
||||
|
||||
<binding key="PAD_LEFT" mask="NONE" command="turn_left"/>
|
||||
<binding key="PAD_LEFT" mask="SHIFT" command="slide_left"/>
|
||||
<binding key="PAD_RIGHT" mask="NONE" command="turn_right"/>
|
||||
<binding key="PAD_RIGHT" mask="SHIFT" command="slide_right"/>
|
||||
<binding key="PAD_UP" mask="NONE" command="push_forward"/>
|
||||
<binding key="PAD_DOWN" mask="NONE" command="push_backward"/>
|
||||
<binding key="PAD_UP" mask="SHIFT" command="push_forward"/>
|
||||
<binding key="PAD_DOWN" mask="SHIFT" command="push_backward"/>
|
||||
<binding key="PAD_PGUP" mask="NONE" command="jump"/>
|
||||
<binding key="PAD_PGDN" mask="NONE" command="push_down"/>
|
||||
<binding key="PAD_PGUP" mask="SHIFT" command="jump"/>
|
||||
<binding key="PAD_PGDN" mask="SHIFT" command="push_down"/>
|
||||
<binding key="PAD_HOME" mask="NONE" command="toggle_fly"/>
|
||||
<binding key="PAD_HOME" mask="SHIFT" command="toggle_fly"/>
|
||||
<binding key="PAD_CENTER" mask="NONE" command="stop_moving"/>
|
||||
<binding key="PAD_CENTER" mask="SHIFT" command="stop_moving"/>
|
||||
<binding key="PAD_ENTER" mask="NONE" command="start_chat"/>
|
||||
<binding key="PAD_ENTER" mask="SHIFT" command="start_chat"/>
|
||||
<binding key="PAD_DIVIDE" mask="NONE" command="start_gesture"/>
|
||||
<binding key="PAD_DIVIDE" mask="SHIFT" command="start_gesture"/>
|
||||
|
||||
<!--Camera controls in third person on Alt-->
|
||||
<binding key="LEFT" mask="ALT" command="spin_around_cw"/>
|
||||
<binding key="RIGHT" mask="ALT" command="spin_around_ccw"/>
|
||||
<binding key="UP" mask="ALT" command="move_forward"/>
|
||||
<binding key="DOWN" mask="ALT" command="move_backward"/>
|
||||
<binding key="PGUP" mask="ALT" command="spin_over"/>
|
||||
<binding key="PGDN" mask="ALT" command="spin_under"/>
|
||||
|
||||
<binding key="A" mask="ALT" command="spin_around_cw"/>
|
||||
<binding key="D" mask="ALT" command="spin_around_ccw"/>
|
||||
<binding key="W" mask="ALT" command="move_forward"/>
|
||||
<binding key="S" mask="ALT" command="move_backward"/>
|
||||
<binding key="E" mask="ALT" command="spin_over"/>
|
||||
<binding key="C" mask="ALT" command="spin_under"/>
|
||||
|
||||
<binding key="PAD_LEFT" mask="ALT" command="spin_around_cw"/>
|
||||
<binding key="PAD_RIGHT" mask="ALT" command="spin_around_ccw"/>
|
||||
<binding key="PAD_UP" mask="ALT" command="move_forward"/>
|
||||
<binding key="PAD_DOWN" mask="ALT" command="move_backward"/>
|
||||
<binding key="PAD_PGUP" mask="ALT" command="spin_over"/>
|
||||
<binding key="PAD_PGDN" mask="ALT" command="spin_under"/>
|
||||
<binding key="PAD_ENTER" mask="ALT" command="start_chat"/>
|
||||
<binding key="PAD_DIVIDE" mask="ALT" command="start_gesture"/>
|
||||
|
||||
<!--mimic alt zoom behavior with keyboard only-->
|
||||
<binding key="A" mask="CTL_ALT" command="spin_around_cw"/>
|
||||
<binding key="D" mask="CTL_ALT" command="spin_around_ccw"/>
|
||||
<binding key="W" mask="CTL_ALT" command="spin_over"/>
|
||||
<binding key="S" mask="CTL_ALT" command="spin_under"/>
|
||||
<binding key="E" mask="CTL_ALT" command="spin_over"/>
|
||||
<binding key="C" mask="CTL_ALT" command="spin_under"/>
|
||||
|
||||
<binding key="LEFT" mask="CTL_ALT" command="spin_around_cw"/>
|
||||
<binding key="RIGHT" mask="CTL_ALT" command="spin_around_ccw"/>
|
||||
<binding key="UP" mask="CTL_ALT" command="spin_over"/>
|
||||
<binding key="DOWN" mask="CTL_ALT" command="spin_under"/>
|
||||
<binding key="PGUP" mask="CTL_ALT" command="spin_over"/>
|
||||
<binding key="PGDN" mask="CTL_ALT" command="spin_under"/>
|
||||
|
||||
<binding key="PAD_LEFT" mask="CTL_ALT" command="spin_around_cw"/>
|
||||
<binding key="PAD_RIGHT" mask="CTL_ALT" command="spin_around_ccw"/>
|
||||
<binding key="PAD_UP" mask="CTL_ALT" command="spin_over"/>
|
||||
<binding key="PAD_DOWN" mask="CTL_ALT" command="spin_under"/>
|
||||
<binding key="PAD_PGUP" mask="CTL_ALT" command="spin_over"/>
|
||||
<binding key="PAD_PGDN" mask="CTL_ALT" command="spin_under"/>
|
||||
<binding key="PAD_ENTER" mask="CTL_ALT" command="start_chat"/>
|
||||
<binding key="PAD_DIVIDE" mask="CTL_ALT" command="start_gesture"/>
|
||||
|
||||
<!--Therefore pan on Alt-Shift-->
|
||||
<binding key="A" mask="CTL_ALT_SHIFT" command="pan_left"/>
|
||||
<binding key="D" mask="CTL_ALT_SHIFT" command="pan_right"/>
|
||||
<binding key="W" mask="CTL_ALT_SHIFT" command="pan_up"/>
|
||||
<binding key="S" mask="CTL_ALT_SHIFT" command="pan_down"/>
|
||||
|
||||
<binding key="LEFT" mask="CTL_ALT_SHIFT" command="pan_left"/>
|
||||
<binding key="RIGHT" mask="CTL_ALT_SHIFT" command="pan_right"/>
|
||||
<binding key="UP" mask="CTL_ALT_SHIFT" command="pan_up"/>
|
||||
<binding key="DOWN" mask="CTL_ALT_SHIFT" command="pan_down"/>
|
||||
|
||||
<binding key="PAD_LEFT" mask="CTL_ALT_SHIFT" command="pan_left"/>
|
||||
<binding key="PAD_RIGHT" mask="CTL_ALT_SHIFT" command="pan_right"/>
|
||||
<binding key="PAD_UP" mask="CTL_ALT_SHIFT" command="pan_up"/>
|
||||
<binding key="PAD_DOWN" mask="CTL_ALT_SHIFT" command="pan_down"/>
|
||||
<binding key="PAD_ENTER" mask="CTL_ALT_SHIFT" command="start_chat"/>
|
||||
<binding key="PAD_DIVIDE" mask="CTL_ALT_SHIFT" command="start_gesture"/>
|
||||
</third_person>
|
||||
|
||||
# Basic editing camera control
|
||||
<edit>
|
||||
<binding key="A" mask="NONE" command="spin_around_cw"/>
|
||||
<binding key="D" mask="NONE" command="spin_around_ccw"/>
|
||||
<binding key="W" mask="NONE" command="move_forward"/>
|
||||
<binding key="S" mask="NONE" command="move_backward"/>
|
||||
<binding key="E" mask="NONE" command="spin_over"/>
|
||||
<binding key="C" mask="NONE" command="spin_under"/>
|
||||
<binding key="ENTER" mask="NONE" command="start_chat"/>
|
||||
<binding key="DIVIDE" mask="NONE" command="start_gesture"/>
|
||||
<binding key="PAD_ENTER" mask="NONE" command="start_chat"/>
|
||||
<binding key="PAD_DIVIDE" mask="NONE" command="start_gesture"/>
|
||||
|
||||
<binding key="LEFT" mask="NONE" command="spin_around_cw"/>
|
||||
<binding key="RIGHT" mask="NONE" command="spin_around_ccw"/>
|
||||
<binding key="UP" mask="NONE" command="move_forward"/>
|
||||
<binding key="DOWN" mask="NONE" command="move_backward"/>
|
||||
<binding key="PGUP" mask="NONE" command="spin_over"/>
|
||||
<binding key="PGDN" mask="NONE" command="spin_under"/>
|
||||
|
||||
<binding key="A" mask="SHIFT" command="pan_left"/>
|
||||
<binding key="D" mask="SHIFT" command="pan_right"/>
|
||||
<binding key="W" mask="SHIFT" command="pan_up"/>
|
||||
<binding key="S" mask="SHIFT" command="pan_down"/>
|
||||
|
||||
<binding key="LEFT" mask="SHIFT" command="pan_left"/>
|
||||
<binding key="RIGHT" mask="SHIFT" command="pan_right"/>
|
||||
<binding key="UP" mask="SHIFT" command="pan_up"/>
|
||||
<binding key="DOWN" mask="SHIFT" command="pan_down"/>
|
||||
|
||||
<!--Walking works with ALT held down.-->
|
||||
<binding key="A" mask="ALT" command="slide_left"/>
|
||||
<binding key="D" mask="ALT" command="slide_right"/>
|
||||
<binding key="W" mask="ALT" command="push_forward"/>
|
||||
<binding key="S" mask="ALT" command="push_backward"/>
|
||||
<binding key="E" mask="ALT" command="jump"/>
|
||||
<binding key="C" mask="ALT" command="push_down"/>
|
||||
|
||||
<binding key="LEFT" mask="ALT" command="slide_left"/>
|
||||
<binding key="RIGHT" mask="ALT" command="slide_right"/>
|
||||
<binding key="UP" mask="ALT" command="push_forward"/>
|
||||
<binding key="DOWN" mask="ALT" command="push_backward"/>
|
||||
<binding key="PGUP" mask="ALT" command="jump"/>
|
||||
<binding key="PGDN" mask="ALT" command="push_down"/>
|
||||
<binding key="HOME" mask="ALT" command="toggle_fly"/>
|
||||
|
||||
<binding key="PAD_LEFT" mask="ALT" command="slide_left"/>
|
||||
<binding key="PAD_RIGHT" mask="ALT" command="slide_right"/>
|
||||
<binding key="PAD_UP" mask="ALT" command="push_forward"/>
|
||||
<binding key="PAD_DOWN" mask="ALT" command="push_backward"/>
|
||||
<binding key="PAD_PGUP" mask="ALT" command="jump"/>
|
||||
<binding key="PAD_PGDN" mask="ALT" command="push_down"/>
|
||||
<binding key="PAD_ENTER" mask="ALT" command="start_chat"/>
|
||||
<binding key="PAD_DIVIDE" mask="ALT" command="start_gesture"/>
|
||||
</edit>
|
||||
<sitting>
|
||||
<binding key="A" mask="ALT" command="spin_around_cw"/>
|
||||
<binding key="D" mask="ALT" command="spin_around_ccw"/>
|
||||
<binding key="W" mask="ALT" command="move_forward"/>
|
||||
<binding key="S" mask="ALT" command="move_backward"/>
|
||||
<binding key="E" mask="ALT" command="spin_over_sitting"/>
|
||||
<binding key="C" mask="ALT" command="spin_under_sitting"/>
|
||||
|
||||
<binding key="LEFT" mask="ALT" command="spin_around_cw"/>
|
||||
<binding key="RIGHT" mask="ALT" command="spin_around_ccw"/>
|
||||
<binding key="UP" mask="ALT" command="move_forward"/>
|
||||
<binding key="DOWN" mask="ALT" command="move_backward"/>
|
||||
<binding key="PGUP" mask="ALT" command="spin_over"/>
|
||||
<binding key="PGDN" mask="ALT" command="spin_under"/>
|
||||
|
||||
<binding key="A" mask="CTL_ALT" command="spin_around_cw"/>
|
||||
<binding key="D" mask="CTL_ALT" command="spin_around_ccw"/>
|
||||
<binding key="W" mask="CTL_ALT" command="spin_over"/>
|
||||
<binding key="S" mask="CTL_ALT" command="spin_under"/>
|
||||
<binding key="E" mask="CTL_ALT" command="spin_over"/>
|
||||
<binding key="C" mask="CTL_ALT" command="spin_under"/>
|
||||
|
||||
<binding key="LEFT" mask="CTL_ALT" command="spin_around_cw"/>
|
||||
<binding key="RIGHT" mask="CTL_ALT" command="spin_around_ccw"/>
|
||||
<binding key="UP" mask="CTL_ALT" command="spin_over"/>
|
||||
<binding key="DOWN" mask="CTL_ALT" command="spin_under"/>
|
||||
<binding key="PGUP" mask="CTL_ALT" command="spin_over"/>
|
||||
<binding key="PGDN" mask="CTL_ALT" command="spin_under"/>
|
||||
|
||||
|
||||
<binding key="A" mask="NONE" command="spin_around_cw_sitting"/>
|
||||
<binding key="D" mask="NONE" command="spin_around_ccw_sitting"/>
|
||||
<binding key="W" mask="NONE" command="move_forward_sitting"/>
|
||||
<binding key="S" mask="NONE" command="move_backward_sitting"/>
|
||||
<binding key="E" mask="NONE" command="spin_over_sitting"/>
|
||||
<binding key="C" mask="NONE" command="spin_under_sitting"/>
|
||||
|
||||
<binding key="LEFT" mask="NONE" command="spin_around_cw_sitting"/>
|
||||
<binding key="RIGHT" mask="NONE" command="spin_around_ccw_sitting"/>
|
||||
<binding key="UP" mask="NONE" command="move_forward_sitting"/>
|
||||
<binding key="DOWN" mask="NONE" command="move_backward_sitting"/>
|
||||
<binding key="PGUP" mask="NONE" command="spin_over_sitting"/>
|
||||
<binding key="PGDN" mask="NONE" command="spin_under_sitting"/>
|
||||
|
||||
<binding key="PAD_LEFT" mask="NONE" command="spin_around_cw_sitting"/>
|
||||
<binding key="PAD_RIGHT" mask="NONE" command="spin_around_ccw_sitting"/>
|
||||
<binding key="PAD_UP" mask="NONE" command="move_forward_sitting"/>
|
||||
<binding key="PAD_DOWN" mask="NONE" command="move_backward_sitting"/>
|
||||
<binding key="PAD_PGUP" mask="NONE" command="spin_over_sitting"/>
|
||||
<binding key="PAD_PGDN" mask="NONE" command="spin_under_sitting"/>
|
||||
<binding key="PAD_CENTER" mask="NONE" command="stop_moving"/>
|
||||
<binding key="PAD_ENTER" mask="NONE" command="start_chat"/>
|
||||
<binding key="PAD_DIVIDE" mask="NONE" command="start_gesture"/>
|
||||
|
||||
<!--these are for passing controls when sitting on vehicles-->
|
||||
<binding key="A" mask="SHIFT" command="slide_left"/>
|
||||
<binding key="D" mask="SHIFT" command="slide_right"/>
|
||||
<binding key="LEFT" mask="SHIFT" command="slide_left"/>
|
||||
<binding key="RIGHT" mask="SHIFT" command="slide_right"/>
|
||||
|
||||
<binding key="PAD_LEFT" mask="SHIFT" command="slide_left"/>
|
||||
<binding key="PAD_RIGHT" mask="SHIFT" command="slide_right"/>
|
||||
<binding key="PAD_ENTER" mask="SHIFT" command="start_chat"/>
|
||||
<binding key="PAD_DIVIDE" mask="SHIFT" command="start_gesture"/>
|
||||
|
||||
<!--pan on Alt-Shift-->
|
||||
<binding key="A" mask="CTL_ALT_SHIFT" command="pan_left"/>
|
||||
<binding key="D" mask="CTL_ALT_SHIFT" command="pan_right"/>
|
||||
<binding key="W" mask="CTL_ALT_SHIFT" command="pan_up"/>
|
||||
<binding key="S" mask="CTL_ALT_SHIFT" command="pan_down"/>
|
||||
|
||||
<binding key="LEFT" mask="CTL_ALT_SHIFT" command="pan_left"/>
|
||||
<binding key="RIGHT" mask="CTL_ALT_SHIFT" command="pan_right"/>
|
||||
<binding key="UP" mask="CTL_ALT_SHIFT" command="pan_up"/>
|
||||
<binding key="DOWN" mask="CTL_ALT_SHIFT" command="pan_down"/>
|
||||
|
||||
<binding key="PAD_LEFT" mask="CTL_ALT_SHIFT" command="pan_left"/>
|
||||
<binding key="PAD_RIGHT" mask="CTL_ALT_SHIFT" command="pan_right"/>
|
||||
<binding key="PAD_UP" mask="CTL_ALT_SHIFT" command="pan_up"/>
|
||||
<binding key="PAD_DOWN" mask="CTL_ALT_SHIFT" command="pan_down"/>
|
||||
<binding key="PAD_ENTER" mask="CTL_ALT_SHIFT" command="start_chat"/>
|
||||
<binding key="PAD_DIVIDE" mask="CTL_ALT_SHIFT" command="start_gesture"/>
|
||||
|
||||
<binding key="ENTER" mask="NONE" command="start_chat"/>
|
||||
<binding key="DIVIDE" mask="NONE" command="start_gesture"/>
|
||||
</sitting>
|
||||
<edit_avatar>
|
||||
<!--Avatar editing camera controls-->
|
||||
<binding key="A" mask="NONE" command="edit_avatar_spin_cw"/>
|
||||
<binding key="D" mask="NONE" command="edit_avatar_spin_ccw"/>
|
||||
<binding key="W" mask="NONE" command="edit_avatar_move_forward"/>
|
||||
<binding key="S" mask="NONE" command="edit_avatar_move_backward"/>
|
||||
<binding key="E" mask="NONE" command="edit_avatar_spin_over"/>
|
||||
<binding key="C" mask="NONE" command="edit_avatar_spin_under"/>
|
||||
<binding key="LEFT" mask="NONE" command="edit_avatar_spin_cw"/>
|
||||
<binding key="RIGHT" mask="NONE" command="edit_avatar_spin_ccw"/>
|
||||
<binding key="UP" mask="NONE" command="edit_avatar_move_forward"/>
|
||||
<binding key="DOWN" mask="NONE" command="edit_avatar_move_backward"/>
|
||||
<binding key="PGUP" mask="NONE" command="edit_avatar_spin_over"/>
|
||||
<binding key="PGDN" mask="NONE" command="edit_avatar_spin_under"/>
|
||||
<binding key="ENTER" mask="NONE" command="start_chat"/>
|
||||
<binding key="DIVIDE" mask="NONE" command="start_gesture"/>
|
||||
<binding key="PAD_LEFT" mask="NONE" command="edit_avatar_spin_cw"/>
|
||||
<binding key="PAD_RIGHT" mask="NONE" command="edit_avatar_spin_ccw"/>
|
||||
<binding key="PAD_UP" mask="NONE" command="edit_avatar_move_forward"/>
|
||||
<binding key="PAD_DOWN" mask="NONE" command="edit_avatar_move_backward"/>
|
||||
<binding key="PAD_PGUP" mask="NONE" command="edit_avatar_spin_over"/>
|
||||
<binding key="PAD_PGDN" mask="NONE" command="edit_avatar_spin_under"/>
|
||||
<binding key="PAD_ENTER" mask="NONE" command="start_chat"/>
|
||||
<binding key="PAD_DIVIDE" mask="NONE" command="start_gesture"/>
|
||||
</edit_avatar>
|
||||
</keys>
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
<?xml version="1.0"?>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<!-- LLSD document has exactly one value -->
|
||||
<xsd:element name="llsd">
|
||||
<xsd:complexType>
|
||||
<xsd:group ref="llsd-value" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<!-- Value is one of undef, boolean, integer, real,
|
||||
uuid, string, date, binary, array, or map -->
|
||||
<xsd:group name="llsd-value">
|
||||
<xsd:choice>
|
||||
<xsd:element ref="undef"/>
|
||||
<xsd:element ref="boolean"/>
|
||||
<xsd:element ref="integer"/>
|
||||
<xsd:element ref="real"/>
|
||||
<xsd:element ref="uuid"/>
|
||||
<xsd:element ref="string"/>
|
||||
<xsd:element ref="date"/>
|
||||
<xsd:element ref="uri"/>
|
||||
<xsd:element ref="binary"/>
|
||||
<xsd:element ref="array"/>
|
||||
<xsd:element ref="map"/>
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
|
||||
<!-- Undefined is an empty eleemnt -->
|
||||
<xsd:element name="undef">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:length value="0" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
|
||||
<!-- Boolean is true or false -->
|
||||
<xsd:element name="boolean">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="true" />
|
||||
<xsd:enumeration value="false" />
|
||||
|
||||
<!-- In practice, these other serializations are seen: -->
|
||||
<xsd:enumeration value="" />
|
||||
<xsd:enumeration value="1" />
|
||||
<xsd:enumeration value="0" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
|
||||
<!-- Integer is restricted to 32-bit signed values -->
|
||||
<xsd:element name="integer">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:int" />
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
|
||||
<!-- Real is an IEEE 754 "double" value, including Infinities and NaN -->
|
||||
<xsd:element name="real">
|
||||
<xsd:simpleType>
|
||||
<!-- TODO: xsd:double uses "INF", "-INF", and "NaN",
|
||||
whereas LLSD prefers "Infinity", "-Infinity" and "NaN" -->
|
||||
<xsd:restriction base="xsd:double" />
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
|
||||
<!-- UUID per RFC 4122 -->
|
||||
<xsd:element name="uuid">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:pattern value="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
|
||||
<!-- String is any sequence of Unicode characters -->
|
||||
<xsd:element name="string">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string" />
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
|
||||
<!-- Date is ISO 8601 in UTC -->
|
||||
<xsd:element name="date">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:dateTime">
|
||||
<!-- Restrict to UTC (Z) times -->
|
||||
<xsd:pattern value="[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?Z" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
|
||||
<!-- URI per RFC 3986 -->
|
||||
<xsd:element name="uri">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:anyURI" />
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
|
||||
<!-- Binary data is base64 encoded -->
|
||||
<xsd:element name="binary">
|
||||
<xsd:simpleType>
|
||||
<!-- TODO: Require encoding attribute? -->
|
||||
<xsd:restriction base="xsd:base64Binary" />
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
|
||||
<!-- Array is a sequence of zero or more values -->
|
||||
<xsd:element name="array">
|
||||
<xsd:complexType>
|
||||
<xsd:group minOccurs="0" maxOccurs="unbounded" ref="llsd-value" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<!-- Map is a sequence of zero or more key/value pairs -->
|
||||
<xsd:element name="map">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="key">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string" />
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:group ref="llsd-value" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
</xsd:schema>
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" ?>
|
||||
<llsd>
|
||||
<llsd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="llsd.xsd">
|
||||
<map>
|
||||
<key>CrashHostUrl</key>
|
||||
<map>
|
||||
|
|
@ -607,6 +608,17 @@
|
|||
<key>Value</key>
|
||||
<integer>2</integer>
|
||||
</map>
|
||||
<key>AvatarPickerURL</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Avatar picker contents</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>http://interest.secondlife.com/viewer/avatar</string>
|
||||
</map>
|
||||
<key>AvatarBakedTextureUploadTimeout</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -2556,7 +2568,18 @@
|
|||
<key>Value</key>
|
||||
<integer>10</integer>
|
||||
</map>
|
||||
<key>DisableCameraConstraints</key>
|
||||
<key>DestinationGuideURL</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Destination guide contents</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>http://www.secondlife.com</string>
|
||||
</map>
|
||||
<key>DisableCameraConstraints</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Disable the normal bounds put on the camera by avatar position</string>
|
||||
|
|
@ -2578,6 +2601,17 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>DisableExternalBrowser</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Disable opening an external browser.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>DisableRendering</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -2589,6 +2623,17 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>DisableTextHyperlinkActions</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Disable highlighting and linking of URLs in XUI text boxes</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>DisableVerticalSync</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -2732,6 +2777,28 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>ClickActionBuyEnabled</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable click to buy actions in tool pie menu</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>ClickActionPayEnabled</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable click to pay actions in tool pie menu</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>DoubleClickAutoPilot</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -2875,6 +2942,39 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>EnableGrab</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Use Ctrl+mouse to grab and manipulate objects</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>EnableAltZoom</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Use Alt+mouse to look at and zoom in on objects</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>EnableMouselook</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Allow first person perspective and mouse control of camera</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>EnableRippleWater</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -3568,72 +3668,6 @@
|
|||
<key>Value</key>
|
||||
<real>0.5</real>
|
||||
</map>
|
||||
<key>FontMonospace</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Name of monospace font that definitely exists (Truetype file name)</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>DejaVuSansMono.ttf</string>
|
||||
</map>
|
||||
<key>FontSansSerif</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Name of primary sans-serif font that definitely exists (Truetype file name)</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>MtBkLfRg.ttf</string>
|
||||
</map>
|
||||
<key>FontSansSerifBundledFallback</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Name of secondary sans-serif font that definitely exists (Truetype file name)</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>DejaVuSansCondensed.ttf</string>
|
||||
</map>
|
||||
<key>FontSansSerifBold</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Name of bold font (Truetype file name)</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>MtBdLfRg.ttf</string>
|
||||
</map>
|
||||
<key>FontSansSerifFallback</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Name of sans-serif font (Truetype file name)</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string />
|
||||
</map>
|
||||
<key>FontSansSerifFallbackScale</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Scale of fallback font relative to huge font (fraction of huge font size)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>1.0</real>
|
||||
</map>
|
||||
<key>FontScreenDPI</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -3645,61 +3679,6 @@
|
|||
<key>Value</key>
|
||||
<real>96.0</real>
|
||||
</map>
|
||||
<key>FontSizeHuge</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Size of huge font (points, or 1/72 of an inch)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>16.0</real>
|
||||
</map>
|
||||
<key>FontSizeLarge</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Size of large font (points, or 1/72 of an inch)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>12.0</real>
|
||||
</map>
|
||||
<key>FontSizeMedium</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Size of medium font (points, or 1/72 of an inch)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>10.0</real>
|
||||
</map>
|
||||
<key>FontSizeMonospace</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Size of monospaced font (points, or 1/72 of an inch)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>8.1</real>
|
||||
</map>
|
||||
<key>FontSizeSmall</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Size of small font (points, or 1/72 of an inch)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>9.0</real>
|
||||
</map>
|
||||
<key>ForceAssetFail</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -3892,7 +3871,7 @@
|
|||
<key>Comment</key>
|
||||
<string>URL pattern for help page; arguments will be encoded; see llviewerhelp.cpp:buildHelpURL for arguments</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
|
|
@ -3942,6 +3921,17 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>HostID</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Machine identifier for hosted Second Life instances</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string />
|
||||
</map>
|
||||
<key>HtmlHelpLastPage</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -3980,7 +3970,7 @@
|
|||
<key>Comment</key>
|
||||
<string>Ignore all notifications so we never need user input on them.</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
|
|
@ -4614,6 +4604,17 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LocalFileSystemBrowsingEnabled</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable/disable access to the local file system via the file picker</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>LoginSRVTimeout</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -5241,61 +5242,6 @@
|
|||
<key>Value</key>
|
||||
<real>60.0</real>
|
||||
</map>
|
||||
<key>MeanCollisionBump</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>You have experienced an abuse of being bumped by an object or avatar</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>MeanCollisionPhysical</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>You have experienced an abuse from a physical object</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>MeanCollisionPushObject</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>You have experienced an abuse of being pushed by a scripted object</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>MeanCollisionScripted</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>You have experienced an abuse from a scripted object</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>MeanCollisionSelected</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>You have experienced an abuse of being pushed via a selected object</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>MediaControlFadeTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -6568,6 +6514,28 @@
|
|||
<key>Value</key>
|
||||
<real>0.0</real>
|
||||
</map>
|
||||
<key>QuitAfterSecondsOfAFK</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>The duration allowed after being AFK before quitting.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>0.0</real>
|
||||
</map>
|
||||
<key>QuitOnLoginActivated</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Quit if login page is activated (used when auto login is on and users must not be able to login manually)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RadioLandBrushAction</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -7825,17 +7793,6 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>RenderFastUI</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>[NOT USED]</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RenderFlexTimeFactor</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -8350,6 +8307,17 @@
|
|||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>1.0</real>
|
||||
</map>
|
||||
<key>RenderTrackerBeacon</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Display tracking arrow and beacon to target avatar, teleport destination</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>RenderTransparentWater</key>
|
||||
<map>
|
||||
|
|
@ -8538,6 +8506,17 @@
|
|||
<key>Value</key>
|
||||
<integer>512</integer>
|
||||
</map>
|
||||
<key>RenderParcelSelection</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Display selected parcel outline</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>RotateRight</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -8626,6 +8605,17 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>ScriptsCanShowUI</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Allow LSL calls (such as LLMapDestination) to spawn viewer UI</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>SecondLifeEnterprise</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -11597,6 +11587,28 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>VoiceCallsRejectAll</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Silently reject all incoming voice calls.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>VoiceDisableMic</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Completely disable the ability to open the mic.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>VoiceEffectExpiryWarningTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -11905,6 +11917,17 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>WindowFullScreen</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>SL viewer window full screen</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>WindowHeight</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -12202,6 +12225,7 @@
|
|||
<key>Comment</key>
|
||||
<string>Maximum texture width for user uploaded textures</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
|
|
@ -12308,6 +12332,17 @@
|
|||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>1200.0</real>
|
||||
</map>
|
||||
<key>AvatarPickerHintTimeout</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Number of seconds to wait before telling resident about avatar picker.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>600.0</real>
|
||||
</map>
|
||||
<key>SidePanelHintTimeout</key>
|
||||
|
|
|
|||
|
|
@ -2041,7 +2041,7 @@ void LLAgentCamera::resetCamera()
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLAgentCamera::changeCameraToMouselook(BOOL animate)
|
||||
{
|
||||
if (LLViewerJoystick::getInstance()->getOverrideCamera())
|
||||
if (!gSavedSettings.getBOOL("EnableMouselook") || LLViewerJoystick::getInstance()->getOverrideCamera())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2947,3 +2947,32 @@ void wear_multiple(const uuid_vec_t& ids, bool replace)
|
|||
}
|
||||
}
|
||||
|
||||
// SLapp for easy-wearing of a stock (library) avatar
|
||||
//
|
||||
class LLWearFolderHandler : public LLCommandHandler
|
||||
{
|
||||
public:
|
||||
// not allowed from outside the app
|
||||
LLWearFolderHandler() : LLCommandHandler("wear_folder", UNTRUSTED_BLOCK) { }
|
||||
|
||||
bool handle(const LLSD& tokens, const LLSD& query_map,
|
||||
LLMediaCtrl* web)
|
||||
{
|
||||
LLPointer<LLInventoryCategory> category = new LLInventoryCategory(query_map["folder_id"],
|
||||
LLUUID::null,
|
||||
LLFolderType::FT_CLOTHING,
|
||||
"Quick Appearance");
|
||||
LLSD::UUID folder_uuid = query_map["folder_id"].asUUID();
|
||||
if ( gInventory.getCategory( folder_uuid ) != NULL )
|
||||
{
|
||||
LLAppearanceMgr::getInstance()->wearInventoryCategory(category, true, false);
|
||||
|
||||
// *TODOw: This may not be necessary if initial outfit is chosen already -- josh
|
||||
gAgent.setGenderChosen(TRUE);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
LLWearFolderHandler gWearFolderHandler;
|
||||
|
|
|
|||
|
|
@ -823,16 +823,22 @@ bool LLAppViewer::init()
|
|||
gGLManager.getGLInfo(gDebugInfo);
|
||||
gGLManager.printGLInfoString();
|
||||
|
||||
//load key settings
|
||||
bind_keyboard_functions();
|
||||
|
||||
// Load Default bindings
|
||||
if (!gViewerKeyboard.loadBindings(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"keys.ini")))
|
||||
std::string key_bindings_file = gDirUtilp->findFile("keys.xml",
|
||||
gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""),
|
||||
gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
|
||||
|
||||
|
||||
if (!gViewerKeyboard.loadBindingsXML(key_bindings_file))
|
||||
{
|
||||
LL_ERRS("InitInfo") << "Unable to open keys.ini" << LL_ENDL;
|
||||
std::string key_bindings_file = gDirUtilp->findFile("keys.ini",
|
||||
gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""),
|
||||
gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
|
||||
if (!gViewerKeyboard.loadBindings(key_bindings_file))
|
||||
{
|
||||
LL_ERRS("InitInfo") << "Unable to open keys.ini" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
// Load Custom bindings (override defaults)
|
||||
gViewerKeyboard.loadBindings(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"custom_keys.ini"));
|
||||
|
||||
// If we don't have the right GL requirements, exit.
|
||||
if (!gGLManager.mHasRequirements && !gNoRender)
|
||||
|
|
@ -1310,6 +1316,21 @@ bool LLAppViewer::mainLoop()
|
|||
return true;
|
||||
}
|
||||
|
||||
void LLAppViewer::flushVFSIO()
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
S32 pending = LLVFSThread::updateClass(0);
|
||||
pending += LLLFSThread::updateClass(0);
|
||||
if (!pending)
|
||||
{
|
||||
break;
|
||||
}
|
||||
llinfos << "Waiting for pending IO to finish: " << pending << llendflush;
|
||||
ms_sleep(100);
|
||||
}
|
||||
}
|
||||
|
||||
bool LLAppViewer::cleanup()
|
||||
{
|
||||
// workaround for DEV-35406 crash on shutdown
|
||||
|
|
@ -1449,17 +1470,7 @@ bool LLAppViewer::cleanup()
|
|||
llinfos << "Cache files removed" << llendflush;
|
||||
|
||||
// Wait for any pending VFS IO
|
||||
while (1)
|
||||
{
|
||||
S32 pending = LLVFSThread::updateClass(0);
|
||||
pending += LLLFSThread::updateClass(0);
|
||||
if (!pending)
|
||||
{
|
||||
break;
|
||||
}
|
||||
llinfos << "Waiting for pending IO to finish: " << pending << llendflush;
|
||||
ms_sleep(100);
|
||||
}
|
||||
flushVFSIO();
|
||||
llinfos << "Shutting down Views" << llendflush;
|
||||
|
||||
// Destroy the UI
|
||||
|
|
@ -2196,7 +2207,7 @@ bool LLAppViewer::initConfiguration()
|
|||
|
||||
if (clp.hasOption("nonotifications"))
|
||||
{
|
||||
gSavedSettings.setBOOL("IgnoreAllNotifications", TRUE);
|
||||
gSavedSettings.getControl("IgnoreAllNotifications")->setValue(true, false);
|
||||
}
|
||||
|
||||
if (clp.hasOption("debugsession"))
|
||||
|
|
@ -2243,8 +2254,8 @@ bool LLAppViewer::initConfiguration()
|
|||
if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
|
||||
{
|
||||
// hack to force the skin to default.
|
||||
//gDirUtilp->setSkinFolder(skinfolder->getValue().asString());
|
||||
gDirUtilp->setSkinFolder("default");
|
||||
gDirUtilp->setSkinFolder(skinfolder->getValue().asString());
|
||||
//gDirUtilp->setSkinFolder("default");
|
||||
}
|
||||
|
||||
mYieldTime = gSavedSettings.getS32("YieldTime");
|
||||
|
|
@ -2499,7 +2510,7 @@ bool LLAppViewer::initWindow()
|
|||
VIEWER_WINDOW_CLASSNAME,
|
||||
gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"),
|
||||
gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"),
|
||||
FALSE, ignorePixelDepth);
|
||||
gSavedSettings.getBOOL("WindowFullScreen"), ignorePixelDepth);
|
||||
|
||||
// Need to load feature table before cheking to start watchdog.
|
||||
const S32 NEVER_SUBMIT_REPORT = 2;
|
||||
|
|
@ -2994,6 +3005,23 @@ void LLAppViewer::forceQuit()
|
|||
LLApp::setQuitting();
|
||||
}
|
||||
|
||||
//TODO: remove
|
||||
void LLAppViewer::fastQuit(S32 error_code)
|
||||
{
|
||||
// finish pending transfers
|
||||
flushVFSIO();
|
||||
// let sim know we're logging out
|
||||
sendLogoutRequest();
|
||||
// flush network buffers by shutting down messaging system
|
||||
end_messaging_system();
|
||||
// figure out the error code
|
||||
S32 final_error_code = error_code ? error_code : (S32)isError();
|
||||
// this isn't a crash
|
||||
removeMarkerFile();
|
||||
// get outta here
|
||||
_exit(final_error_code);
|
||||
}
|
||||
|
||||
void LLAppViewer::requestQuit()
|
||||
{
|
||||
llinfos << "requestQuit" << llendl;
|
||||
|
|
@ -3002,6 +3030,13 @@ void LLAppViewer::requestQuit()
|
|||
|
||||
if( (LLStartUp::getStartupState() < STATE_STARTED) || !region )
|
||||
{
|
||||
// If we have a region, make some attempt to send a logout request first.
|
||||
// This prevents the halfway-logged-in avatar from hanging around inworld for a couple minutes.
|
||||
if(region)
|
||||
{
|
||||
sendLogoutRequest();
|
||||
}
|
||||
|
||||
// Quit immediately
|
||||
forceQuit();
|
||||
return;
|
||||
|
|
@ -3066,12 +3101,12 @@ void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions)
|
|||
LLNotificationsUtil::add(name, substitutions, LLSD(), finish_early_exit);
|
||||
}
|
||||
|
||||
void LLAppViewer::forceExit(S32 arg)
|
||||
// case where we need the viewer to exit without any need for notifications
|
||||
void LLAppViewer::earlyExitNoNotify()
|
||||
{
|
||||
removeMarkerFile();
|
||||
|
||||
// *FIX:Mani - This kind of exit hardly seems appropriate.
|
||||
exit(arg);
|
||||
llwarns << "app_early_exit with no notification: " << llendl;
|
||||
gDoDisconnect = TRUE;
|
||||
finish_early_exit( LLSD(), LLSD() );
|
||||
}
|
||||
|
||||
void LLAppViewer::abortQuit()
|
||||
|
|
@ -3667,6 +3702,18 @@ void LLAppViewer::idle()
|
|||
}
|
||||
}
|
||||
|
||||
// debug setting to quit after N seconds of being AFK - 0 to never do this
|
||||
F32 qas_afk = gSavedSettings.getF32("QuitAfterSecondsOfAFK");
|
||||
if (qas_afk > 0.f)
|
||||
{
|
||||
// idle time is more than setting
|
||||
if ( gAwayTriggerTimer.getElapsedTimeF32() > qas_afk )
|
||||
{
|
||||
// go ahead and just quit gracefully
|
||||
LLAppViewer::instance()->requestQuit();
|
||||
}
|
||||
}
|
||||
|
||||
// Must wait until both have avatar object and mute list, so poll
|
||||
// here.
|
||||
request_initial_instant_messages();
|
||||
|
|
@ -4103,7 +4150,10 @@ void LLAppViewer::sendLogoutRequest()
|
|||
gLogoutMaxTime = LOGOUT_REQUEST_TIME;
|
||||
mLogoutRequestSent = TRUE;
|
||||
|
||||
LLVoiceClient::getInstance()->leaveChannel();
|
||||
if(LLVoiceClient::instanceExists())
|
||||
{
|
||||
LLVoiceClient::getInstance()->leaveChannel();
|
||||
}
|
||||
|
||||
//Set internal status variables and marker files
|
||||
gLogoutInProgress = TRUE;
|
||||
|
|
|
|||
|
|
@ -65,12 +65,14 @@ public:
|
|||
virtual bool mainLoop(); // Override for the application main loop. Needs to at least gracefully notice the QUITTING state and exit.
|
||||
|
||||
// Application control
|
||||
void flushVFSIO(); // waits for vfs transfers to complete
|
||||
void forceQuit(); // Puts the viewer into 'shutting down without error' mode.
|
||||
void fastQuit(S32 error_code = 0); // Shuts down the viewer immediately after sending a logout message
|
||||
void requestQuit(); // Request a quit. A kinder, gentler quit.
|
||||
void userQuit(); // The users asks to quit. Confirm, then requestQuit()
|
||||
void earlyExit(const std::string& name,
|
||||
const LLSD& substitutions = LLSD()); // Display an error dialog and forcibly quit.
|
||||
void forceExit(S32 arg); // exit() immediately (after some cleanup).
|
||||
void earlyExitNoNotify(); // Do not display error dialog then forcibly quit.
|
||||
void abortQuit(); // Called to abort a quit request.
|
||||
|
||||
bool quitRequested() { return mQuitRequested; }
|
||||
|
|
|
|||
|
|
@ -65,31 +65,42 @@ LLDefaultChildRegistry::Register<LLBottomtrayButton> bottomtray_button("bottomtr
|
|||
// virtual
|
||||
BOOL LLBottomtrayButton::handleHover(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if (mCanDrag)
|
||||
{
|
||||
S32 screenX, screenY;
|
||||
localPointToScreen(x, y, &screenX, &screenY);
|
||||
// pass hover to bottomtray
|
||||
LLBottomTray::getInstance()->onDraggableButtonHover(screenX, screenY);
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return LLButton::handleHover(x, y, mask);
|
||||
}
|
||||
}
|
||||
//virtual
|
||||
BOOL LLBottomtrayButton::handleMouseUp(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if (mCanDrag)
|
||||
{
|
||||
S32 screenX, screenY;
|
||||
localPointToScreen(x, y, &screenX, &screenY);
|
||||
// pass mouse up to bottomtray
|
||||
LLBottomTray::getInstance()->onDraggableButtonMouseUp(this, screenX, screenY);
|
||||
LLButton::handleMouseUp(x, y, mask);
|
||||
return FALSE;
|
||||
}
|
||||
return LLButton::handleMouseUp(x, y, mask);
|
||||
}
|
||||
//virtual
|
||||
BOOL LLBottomtrayButton::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if (mCanDrag)
|
||||
{
|
||||
S32 screenX, screenY;
|
||||
localPointToScreen(x, y, &screenX, &screenY);
|
||||
// pass mouse up to bottomtray
|
||||
LLBottomTray::getInstance()->onDraggableButtonMouseDown(this, screenX, screenY);
|
||||
LLButton::handleMouseDown(x, y, mask);
|
||||
return FALSE;
|
||||
}
|
||||
return LLButton::handleMouseDown(x, y, mask);
|
||||
}
|
||||
|
||||
static void update_build_button_enable_state()
|
||||
|
|
@ -150,8 +161,6 @@ public:
|
|||
{
|
||||
mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL);
|
||||
buildFromFile("panel_bottomtray_lite.xml");
|
||||
// Necessary for focus movement among child controls
|
||||
setFocusRoot(TRUE);
|
||||
}
|
||||
|
||||
BOOL postBuild()
|
||||
|
|
@ -218,9 +227,6 @@ LLBottomTray::LLBottomTray(const LLSD&)
|
|||
//destroyed LLBottomTray requires some subsystems that are long gone
|
||||
//LLUI::getRootView()->addChild(this);
|
||||
|
||||
// Necessary for focus movement among child controls
|
||||
setFocusRoot(TRUE);
|
||||
|
||||
{
|
||||
mBottomTrayLite = new LLBottomTrayLite();
|
||||
mBottomTrayLite->setFollowsAll();
|
||||
|
|
@ -513,6 +519,9 @@ void LLBottomTray::toggleCameraControls()
|
|||
|
||||
BOOL LLBottomTray::postBuild()
|
||||
{
|
||||
LLHints::registerHintTarget("bottom_tray", LLView::getHandle());
|
||||
LLHints::registerHintTarget("dest_guide_btn", getChild<LLUICtrl>("destination_btn")->getHandle());
|
||||
LLHints::registerHintTarget("avatar_picker_btn", getChild<LLUICtrl>("avatar_btn")->getHandle());
|
||||
|
||||
LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("NearbyChatBar.Action", boost::bind(&LLBottomTray::onContextMenuItemClicked, this, _2));
|
||||
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("NearbyChatBar.EnableMenuItem", boost::bind(&LLBottomTray::onContextMenuItemEnabled, this, _2));
|
||||
|
|
|
|||
|
|
@ -54,7 +54,9 @@ class LLBottomtrayButton : public LLButton
|
|||
public:
|
||||
struct Params : public LLInitParam::Block<Params, LLButton::Params>
|
||||
{
|
||||
Params(){}
|
||||
Optional<bool> can_drag;
|
||||
Params()
|
||||
: can_drag("can_drag", true){}
|
||||
};
|
||||
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
|
||||
|
|
@ -62,11 +64,14 @@ public:
|
|||
|
||||
protected:
|
||||
LLBottomtrayButton(const Params& p)
|
||||
: LLButton(p)
|
||||
: LLButton(p),
|
||||
mCanDrag(p.can_drag)
|
||||
{
|
||||
|
||||
}
|
||||
friend class LLUICtrlFactory;
|
||||
|
||||
bool mCanDrag;
|
||||
};
|
||||
|
||||
class LLBottomTray
|
||||
|
|
|
|||
|
|
@ -345,7 +345,10 @@ bool LLCommandLineParser::parseCommandLine(int argc, char **argv)
|
|||
bool LLCommandLineParser::parseCommandLineString(const std::string& str)
|
||||
{
|
||||
// Split the string content into tokens
|
||||
boost::escaped_list_separator<char> sep("\\", "\r\n ", "\"'");
|
||||
const char* escape_chars = "\\";
|
||||
const char* separator_chars = "\r\n ";
|
||||
const char* quote_chars = "\"'";
|
||||
boost::escaped_list_separator<char> sep(escape_chars, separator_chars, quote_chars);
|
||||
boost::tokenizer< boost::escaped_list_separator<char> > tok(str, sep);
|
||||
std::vector<std::string> tokens;
|
||||
// std::copy(tok.begin(), tok.end(), std::back_inserter(tokens));
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include "llframetimer.h"
|
||||
#include "lltrans.h"
|
||||
#include "llwindow.h" // beforeDialog()
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
#if LL_LINUX || LL_SOLARIS
|
||||
# include "llfilepicker.h"
|
||||
|
|
@ -53,6 +54,23 @@ LLDirPicker LLDirPicker::sInstance;
|
|||
//
|
||||
// Implementation
|
||||
//
|
||||
|
||||
// utility function to check if access to local file system via file browser
|
||||
// is enabled and if not, tidy up and indicate we're not allowed to do this.
|
||||
bool LLDirPicker::check_local_file_access_enabled()
|
||||
{
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
bool local_file_system_browsing_enabled = gSavedSettings.getBOOL("LocalFileSystemBrowsingEnabled");
|
||||
if ( ! local_file_system_browsing_enabled )
|
||||
{
|
||||
mDir.clear(); // Windows
|
||||
mFileName = NULL; // Mac/Linux
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#if LL_WINDOWS
|
||||
|
||||
LLDirPicker::LLDirPicker() :
|
||||
|
|
@ -72,6 +90,13 @@ BOOL LLDirPicker::getDir(std::string* filename)
|
|||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
if ( check_local_file_access_enabled() == false )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL success = FALSE;
|
||||
|
||||
// Modal, so pause agent
|
||||
|
|
@ -231,7 +256,13 @@ BOOL LLDirPicker::getDir(std::string* filename)
|
|||
if( mLocked ) return FALSE;
|
||||
BOOL success = FALSE;
|
||||
OSStatus error = noErr;
|
||||
|
||||
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
if ( check_local_file_access_enabled() == false )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mFileName = filename;
|
||||
|
||||
// mNavOptions.saveFileName
|
||||
|
|
@ -289,6 +320,13 @@ void LLDirPicker::reset()
|
|||
BOOL LLDirPicker::getDir(std::string* filename)
|
||||
{
|
||||
reset();
|
||||
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
if ( check_local_file_access_enabled() == false )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (mFilePicker)
|
||||
{
|
||||
GtkWindow* picker = mFilePicker->buildFilePicker(false, true,
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ private:
|
|||
};
|
||||
|
||||
void buildDirname( void );
|
||||
bool check_local_file_access_enabled();
|
||||
|
||||
#if LL_DARWIN
|
||||
NavDialogCreationOptions mNavOptions;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "lldir.h"
|
||||
#include "llframetimer.h"
|
||||
#include "lltrans.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llwindow.h" // beforeDialog()
|
||||
|
||||
#if LL_SDL
|
||||
|
|
@ -104,6 +105,20 @@ LLFilePicker::~LLFilePicker()
|
|||
// nothing
|
||||
}
|
||||
|
||||
// utility function to check if access to local file system via file browser
|
||||
// is enabled and if not, tidy up and indicate we're not allowed to do this.
|
||||
bool LLFilePicker::check_local_file_access_enabled()
|
||||
{
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
bool local_file_system_browsing_enabled = gSavedSettings.getBOOL("LocalFileSystemBrowsingEnabled");
|
||||
if ( ! local_file_system_browsing_enabled )
|
||||
{
|
||||
mFiles.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const std::string LLFilePicker::getFirstFile()
|
||||
{
|
||||
|
|
@ -203,6 +218,12 @@ BOOL LLFilePicker::getOpenFile(ELoadFilter filter)
|
|||
}
|
||||
BOOL success = FALSE;
|
||||
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
if ( check_local_file_access_enabled() == false )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// don't provide default file selection
|
||||
mFilesW[0] = '\0';
|
||||
|
||||
|
|
@ -241,6 +262,12 @@ BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter)
|
|||
}
|
||||
BOOL success = FALSE;
|
||||
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
if ( check_local_file_access_enabled() == false )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// don't provide default file selection
|
||||
mFilesW[0] = '\0';
|
||||
|
||||
|
|
@ -304,6 +331,12 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename)
|
|||
}
|
||||
BOOL success = FALSE;
|
||||
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
if ( check_local_file_access_enabled() == false )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mOFN.lpstrFile = mFilesW;
|
||||
if (!filename.empty())
|
||||
{
|
||||
|
|
@ -581,6 +614,12 @@ OSStatus LLFilePicker::doNavChooseDialog(ELoadFilter filter)
|
|||
NavDialogRef navRef = NULL;
|
||||
NavReplyRecord navReply;
|
||||
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
if ( check_local_file_access_enabled() == false )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
memset(&navReply, 0, sizeof(navReply));
|
||||
|
||||
// NOTE: we are passing the address of a local variable here.
|
||||
|
|
@ -809,6 +848,12 @@ BOOL LLFilePicker::getOpenFile(ELoadFilter filter)
|
|||
|
||||
BOOL success = FALSE;
|
||||
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
if ( check_local_file_access_enabled() == false )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
OSStatus error = noErr;
|
||||
|
||||
reset();
|
||||
|
|
@ -845,6 +890,12 @@ BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter)
|
|||
|
||||
BOOL success = FALSE;
|
||||
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
if ( check_local_file_access_enabled() == false )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
OSStatus error = noErr;
|
||||
|
||||
reset();
|
||||
|
|
@ -876,6 +927,12 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename)
|
|||
BOOL success = FALSE;
|
||||
OSStatus error = noErr;
|
||||
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
if ( check_local_file_access_enabled() == false )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
reset();
|
||||
|
||||
mNavOptions.optionFlags &= ~kNavAllowMultipleFiles;
|
||||
|
|
@ -1100,6 +1157,12 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename
|
|||
{
|
||||
BOOL rtn = FALSE;
|
||||
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
if ( check_local_file_access_enabled() == false )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gViewerWindow->mWindow->beforeDialog();
|
||||
|
||||
reset();
|
||||
|
|
@ -1189,6 +1252,12 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter )
|
|||
{
|
||||
BOOL rtn = FALSE;
|
||||
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
if ( check_local_file_access_enabled() == false )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gViewerWindow->mWindow->beforeDialog();
|
||||
|
||||
reset();
|
||||
|
|
@ -1233,6 +1302,12 @@ BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter )
|
|||
{
|
||||
BOOL rtn = FALSE;
|
||||
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
if ( check_local_file_access_enabled() == false )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gViewerWindow->mWindow->beforeDialog();
|
||||
|
||||
reset();
|
||||
|
|
@ -1263,6 +1338,13 @@ BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter )
|
|||
|
||||
BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename )
|
||||
{
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
// (Even though this is a stub, I think we still should not return anything at all)
|
||||
if ( check_local_file_access_enabled() == false )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
reset();
|
||||
|
||||
llinfos << "getSaveFile suggested filename is [" << filename
|
||||
|
|
@ -1277,6 +1359,13 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename
|
|||
|
||||
BOOL LLFilePicker::getOpenFile( ELoadFilter filter )
|
||||
{
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
// (Even though this is a stub, I think we still should not return anything at all)
|
||||
if ( check_local_file_access_enabled() == false )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
reset();
|
||||
|
||||
// HACK: Static filenames for 'open' until we implement filepicker
|
||||
|
|
@ -1295,6 +1384,13 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter )
|
|||
|
||||
BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter )
|
||||
{
|
||||
// if local file browsing is turned off, return without opening dialog
|
||||
// (Even though this is a stub, I think we still should not return anything at all)
|
||||
if ( check_local_file_access_enabled() == false )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
reset();
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,6 +140,10 @@ private:
|
|||
//FILENAME_BUFFER_SIZE = 65536
|
||||
FILENAME_BUFFER_SIZE = 65000
|
||||
};
|
||||
|
||||
// utility function to check if access to local file system via file browser
|
||||
// is enabled and if not, tidy up and indicate we're not allowed to do this.
|
||||
bool check_local_file_access_enabled();
|
||||
|
||||
#if LL_WINDOWS
|
||||
OPENFILENAMEW mOFN; // for open and save dialogs
|
||||
|
|
|
|||
|
|
@ -100,9 +100,16 @@ void LLFirstUse::useSandbox()
|
|||
void LLFirstUse::notUsingDestinationGuide(bool enable)
|
||||
{
|
||||
// not doing this yet
|
||||
//firstUseNotification("FirstNotUseDestinationGuide", enable, "HintDestinationGuide", LLSD(), LLSD().with("target", "dest_guide_btn").with("direction", "left"));
|
||||
firstUseNotification("FirstNotUseDestinationGuide", enable, "HintDestinationGuide", LLSD(), LLSD().with("target", "dest_guide_btn").with("direction", "top"));
|
||||
}
|
||||
|
||||
void LLFirstUse::notUsingAvatarPicker(bool enable)
|
||||
{
|
||||
// not doing this yet
|
||||
firstUseNotification("FirstNotUseAvatarPicker", enable, "HintAvatarPicker", LLSD(), LLSD().with("target", "avatar_picker_btn").with("direction", "top"));
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLFirstUse::notUsingSidePanel(bool enable)
|
||||
{
|
||||
|
|
@ -113,7 +120,15 @@ void LLFirstUse::notUsingSidePanel(bool enable)
|
|||
// static
|
||||
void LLFirstUse::notMoving(bool enable)
|
||||
{
|
||||
// fire off 2 notifications and rely on filtering to select the relevant one
|
||||
firstUseNotification("FirstNotMoving", enable, "HintMove", LLSD(), LLSD().with("target", "move_btn").with("direction", "top"));
|
||||
firstUseNotification("FirstNotMoving", enable, "HintMoveArrows", LLSD(), LLSD().with("target", "bottom_tray").with("direction", "top").with("hint_image", "arrow_keys.png").with("down_arrow", ""));
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFirstUse::viewPopup(bool enable)
|
||||
{
|
||||
firstUseNotification("FirstViewPopup", enable, "HintView", LLSD(), LLSD().with("target", "view_popup").with("direction", "right"));
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
|
|||
|
|
@ -87,8 +87,10 @@ public:
|
|||
static void otherAvatarChatFirst(bool enable = true);
|
||||
static void sit(bool enable = true);
|
||||
static void notUsingDestinationGuide(bool enable = true);
|
||||
static void notUsingAvatarPicker(bool enable = true);
|
||||
static void notUsingSidePanel(bool enable = true);
|
||||
static void notMoving(bool enable = true);
|
||||
static void viewPopup(bool enable = true);
|
||||
static void newInventory(bool enable = true);
|
||||
static void receiveLindens(bool enable = true);
|
||||
static void setDisplayName(bool enable = true);
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@
|
|||
#include "lltoolmgr.h"
|
||||
#include "lltoolfocus.h"
|
||||
#include "llslider.h"
|
||||
#include "llfirstuse.h"
|
||||
#include "llhints.h"
|
||||
|
||||
static LLDefaultChildRegistry::Register<LLPanelCameraItem> r("panel_camera_item");
|
||||
|
||||
|
|
@ -73,6 +75,8 @@ protected:
|
|||
void onZoomPlusHeldDown();
|
||||
void onZoomMinusHeldDown();
|
||||
void onSliderValueChanged();
|
||||
void onCameraTrack();
|
||||
void onCameraRotate();
|
||||
F32 getOrbitRate(F32 time);
|
||||
|
||||
private:
|
||||
|
|
@ -162,6 +166,8 @@ LLPanelCameraZoom::LLPanelCameraZoom()
|
|||
mCommitCallbackRegistrar.add("Zoom.minus", boost::bind(&LLPanelCameraZoom::onZoomMinusHeldDown, this));
|
||||
mCommitCallbackRegistrar.add("Zoom.plus", boost::bind(&LLPanelCameraZoom::onZoomPlusHeldDown, this));
|
||||
mCommitCallbackRegistrar.add("Slider.value_changed", boost::bind(&LLPanelCameraZoom::onSliderValueChanged, this));
|
||||
mCommitCallbackRegistrar.add("Camera.track", boost::bind(&LLPanelCameraZoom::onCameraTrack, this));
|
||||
mCommitCallbackRegistrar.add("Camera.rotate", boost::bind(&LLPanelCameraZoom::onCameraRotate, this));
|
||||
}
|
||||
|
||||
BOOL LLPanelCameraZoom::postBuild()
|
||||
|
|
@ -198,6 +204,18 @@ void LLPanelCameraZoom::onZoomMinusHeldDown()
|
|||
gAgentCamera.setOrbitOutKey(getOrbitRate(time));
|
||||
}
|
||||
|
||||
void LLPanelCameraZoom::onCameraTrack()
|
||||
{
|
||||
// EXP-202 when camera panning activated, remove the hint
|
||||
LLFirstUse::viewPopup( false );
|
||||
}
|
||||
|
||||
void LLPanelCameraZoom::onCameraRotate()
|
||||
{
|
||||
// EXP-202 when camera rotation activated, remove the hint
|
||||
LLFirstUse::viewPopup( false );
|
||||
}
|
||||
|
||||
F32 LLPanelCameraZoom::getOrbitRate(F32 time)
|
||||
{
|
||||
if( time < NUDGE_TIME )
|
||||
|
|
@ -294,6 +312,8 @@ LLFloaterCamera* LLFloaterCamera::findInstance()
|
|||
|
||||
void LLFloaterCamera::onOpen(const LLSD& key)
|
||||
{
|
||||
LLFirstUse::viewPopup();
|
||||
|
||||
LLButton *anchor_panel = LLBottomTray::getInstance()->getChild<LLButton>("camera_btn");
|
||||
|
||||
setDockControl(new LLDockControl(
|
||||
|
|
@ -336,6 +356,7 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val)
|
|||
mCurrMode(CAMERA_CTRL_MODE_PAN),
|
||||
mPrevMode(CAMERA_CTRL_MODE_PAN)
|
||||
{
|
||||
LLHints::registerHintTarget("view_popup", LLView::getHandle());
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ BOOL LLFloaterNotificationConsole::postBuild()
|
|||
// these are in the order of processing
|
||||
addChannel("Unexpired");
|
||||
addChannel("Ignore");
|
||||
addChannel("VisibilityRules");
|
||||
addChannel("Visible", true);
|
||||
// all the ones below attach to the Visible channel
|
||||
addChannel("Persistent");
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "lltextbox.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "lliconctrl.h"
|
||||
#include "llsdparam.h"
|
||||
|
||||
class LLHintPopup : public LLPanel
|
||||
|
|
@ -80,7 +81,8 @@ public:
|
|||
up_arrow,
|
||||
right_arrow,
|
||||
down_arrow,
|
||||
lower_left_arrow;
|
||||
lower_left_arrow,
|
||||
hint_image;
|
||||
|
||||
Optional<S32> left_arrow_offset,
|
||||
up_arrow_offset,
|
||||
|
|
@ -96,6 +98,7 @@ public:
|
|||
right_arrow("right_arrow"),
|
||||
down_arrow("down_arrow"),
|
||||
lower_left_arrow("lower_left_arrow"),
|
||||
hint_image("hint_image"),
|
||||
left_arrow_offset("left_arrow_offset"),
|
||||
up_arrow_offset("up_arrow_offset"),
|
||||
right_arrow_offset("right_arrow_offset"),
|
||||
|
|
@ -166,7 +169,15 @@ LLHintPopup::LLHintPopup(const LLHintPopup::Params& p)
|
|||
mDirection = p.target_params.direction;
|
||||
mTarget = p.target_params.target;
|
||||
}
|
||||
buildFromFile( "panel_hint.xml", NULL, p);
|
||||
if (p.hint_image.isProvided())
|
||||
{
|
||||
buildFromFile("panel_hint_image.xml", NULL, p);
|
||||
getChild<LLIconCtrl>("hint_image")->setImage(p.hint_image());
|
||||
}
|
||||
else
|
||||
{
|
||||
buildFromFile( "panel_hint.xml", NULL, p);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLHintPopup::postBuild()
|
||||
|
|
|
|||
|
|
@ -194,9 +194,6 @@ void LLHUDText::renderText()
|
|||
|
||||
mRadius = (width_vec + height_vec).magVec() * 0.5f;
|
||||
|
||||
LLCoordGL screen_pos;
|
||||
LLViewerCamera::getInstance()->projectPosAgentToScreen(mPositionAgent, screen_pos, FALSE);
|
||||
|
||||
LLVector2 screen_offset;
|
||||
screen_offset = mPositionOffset;
|
||||
|
||||
|
|
|
|||
|
|
@ -2107,7 +2107,7 @@ void LLIncomingCallDialog::onOpen(const LLSD& key)
|
|||
void LLIncomingCallDialog::onAccept(void* user_data)
|
||||
{
|
||||
LLIncomingCallDialog* self = (LLIncomingCallDialog*)user_data;
|
||||
self->processCallResponse(0);
|
||||
processCallResponse(0, self->mPayload);
|
||||
self->closeFloater();
|
||||
}
|
||||
|
||||
|
|
@ -2115,7 +2115,7 @@ void LLIncomingCallDialog::onAccept(void* user_data)
|
|||
void LLIncomingCallDialog::onReject(void* user_data)
|
||||
{
|
||||
LLIncomingCallDialog* self = (LLIncomingCallDialog*)user_data;
|
||||
self->processCallResponse(1);
|
||||
processCallResponse(1, self->mPayload);
|
||||
self->closeFloater();
|
||||
}
|
||||
|
||||
|
|
@ -2123,20 +2123,21 @@ void LLIncomingCallDialog::onReject(void* user_data)
|
|||
void LLIncomingCallDialog::onStartIM(void* user_data)
|
||||
{
|
||||
LLIncomingCallDialog* self = (LLIncomingCallDialog*)user_data;
|
||||
self->processCallResponse(2);
|
||||
processCallResponse(2, self->mPayload);
|
||||
self->closeFloater();
|
||||
}
|
||||
|
||||
void LLIncomingCallDialog::processCallResponse(S32 response)
|
||||
// static
|
||||
void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload)
|
||||
{
|
||||
if (!gIMMgr || gDisconnected)
|
||||
return;
|
||||
|
||||
LLUUID session_id = mPayload["session_id"].asUUID();
|
||||
LLUUID caller_id = mPayload["caller_id"].asUUID();
|
||||
std::string session_name = mPayload["session_name"].asString();
|
||||
EInstantMessage type = (EInstantMessage)mPayload["type"].asInteger();
|
||||
LLIMMgr::EInvitationType inv_type = (LLIMMgr::EInvitationType)mPayload["inv_type"].asInteger();
|
||||
LLUUID session_id = payload["session_id"].asUUID();
|
||||
LLUUID caller_id = payload["caller_id"].asUUID();
|
||||
std::string session_name = payload["session_name"].asString();
|
||||
EInstantMessage type = (EInstantMessage)payload["type"].asInteger();
|
||||
LLIMMgr::EInvitationType inv_type = (LLIMMgr::EInvitationType)payload["inv_type"].asInteger();
|
||||
bool voice = true;
|
||||
switch(response)
|
||||
{
|
||||
|
|
@ -2153,8 +2154,8 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
|
|||
session_id = gIMMgr->addP2PSession(
|
||||
session_name,
|
||||
caller_id,
|
||||
mPayload["session_handle"].asString(),
|
||||
mPayload["session_uri"].asString());
|
||||
payload["session_handle"].asString(),
|
||||
payload["session_uri"].asString());
|
||||
|
||||
if (voice)
|
||||
{
|
||||
|
|
@ -2218,10 +2219,10 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
|
|||
inv_type));
|
||||
|
||||
// send notification message to the corresponding chat
|
||||
if (mPayload["notify_box_type"].asString() == "VoiceInviteGroup" || mPayload["notify_box_type"].asString() == "VoiceInviteAdHoc")
|
||||
if (payload["notify_box_type"].asString() == "VoiceInviteGroup" || payload["notify_box_type"].asString() == "VoiceInviteAdHoc")
|
||||
{
|
||||
LLStringUtil::format_map_t string_args;
|
||||
string_args["[NAME]"] = mPayload["caller_name"].asString();
|
||||
string_args["[NAME]"] = payload["caller_name"].asString();
|
||||
std::string message = LLTrans::getString("name_started_call", string_args);
|
||||
LLIMModel::getInstance()->addMessageSilently(session_id, SYSTEM_FROM, LLUUID::null, message);
|
||||
}
|
||||
|
|
@ -2238,7 +2239,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
|
|||
{
|
||||
if(LLVoiceClient::getInstance())
|
||||
{
|
||||
std::string s = mPayload["session_handle"].asString();
|
||||
std::string s = payload["session_handle"].asString();
|
||||
LLVoiceClient::getInstance()->declineInvite(s);
|
||||
}
|
||||
}
|
||||
|
|
@ -2645,16 +2646,19 @@ void LLIMMgr::inviteToSession(
|
|||
std::string question_type = "VoiceInviteQuestionDefault";
|
||||
|
||||
BOOL ad_hoc_invite = FALSE;
|
||||
BOOL voice_invite = FALSE;
|
||||
if(type == IM_SESSION_P2P_INVITE)
|
||||
{
|
||||
//P2P is different...they only have voice invitations
|
||||
notify_box_type = "VoiceInviteP2P";
|
||||
voice_invite = TRUE;
|
||||
}
|
||||
else if ( gAgent.isInGroup(session_id) )
|
||||
{
|
||||
//only really old school groups have voice invitations
|
||||
notify_box_type = "VoiceInviteGroup";
|
||||
question_type = "VoiceInviteQuestionGroup";
|
||||
voice_invite = TRUE;
|
||||
}
|
||||
else if ( inv_type == INVITATION_TYPE_VOICE )
|
||||
{
|
||||
|
|
@ -2662,6 +2666,7 @@ void LLIMMgr::inviteToSession(
|
|||
//and a voice ad-hoc
|
||||
notify_box_type = "VoiceInviteAdHoc";
|
||||
ad_hoc_invite = TRUE;
|
||||
voice_invite = TRUE;
|
||||
}
|
||||
else if ( inv_type == INVITATION_TYPE_IMMEDIATE )
|
||||
{
|
||||
|
|
@ -2685,23 +2690,21 @@ void LLIMMgr::inviteToSession(
|
|||
if (channelp && channelp->callStarted())
|
||||
{
|
||||
// you have already started a call to the other user, so just accept the invite
|
||||
LLNotifications::instance().forceResponse(LLNotification::Params("VoiceInviteP2P").payload(payload), 0);
|
||||
LLIncomingCallDialog::processCallResponse(0, payload);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == IM_SESSION_P2P_INVITE || ad_hoc_invite)
|
||||
if (voice_invite)
|
||||
{
|
||||
// is the inviter a friend?
|
||||
if (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL)
|
||||
if ( // if we're rejecting all incoming call requests
|
||||
gSavedSettings.getBOOL("VoiceCallsRejectAll")
|
||||
// or we're rejecting non-friend voice calls and this isn't a friend
|
||||
|| (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL))
|
||||
)
|
||||
{
|
||||
// if not, and we are ignoring voice invites from non-friends
|
||||
// then silently decline
|
||||
if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly"))
|
||||
{
|
||||
// invite not from a friend, so decline
|
||||
LLNotifications::instance().forceResponse(LLNotification::Params("VoiceInviteP2P").payload(payload), 1);
|
||||
return;
|
||||
}
|
||||
// silently decline the call
|
||||
LLIncomingCallDialog::processCallResponse(1, payload);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -542,6 +542,7 @@ public:
|
|||
static void onReject(void* user_data);
|
||||
static void onStartIM(void* user_data);
|
||||
|
||||
static void processCallResponse(S32 response, const LLSD& payload);
|
||||
private:
|
||||
void setCallerName(const std::string& ui_title,
|
||||
const std::string& ui_label,
|
||||
|
|
@ -551,7 +552,6 @@ private:
|
|||
const std::string& call_type);
|
||||
|
||||
/*virtual*/ void onLifetimeExpired();
|
||||
void processCallResponse(S32 response);
|
||||
};
|
||||
|
||||
class LLOutgoingCallDialog : public LLCallDialog
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
#include "llviewermenu.h" // for LLViewerMenuHolderGL
|
||||
|
||||
LLListContextMenu::LLListContextMenu()
|
||||
: mMenu(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -51,23 +50,22 @@ LLListContextMenu::~LLListContextMenu()
|
|||
// of mMenu has already been deleted except of using LLHandle. EXT-4762.
|
||||
if (!mMenuHandle.isDead())
|
||||
{
|
||||
mMenu->die();
|
||||
mMenu = NULL;
|
||||
mMenuHandle.get()->die();
|
||||
}
|
||||
}
|
||||
|
||||
void LLListContextMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y)
|
||||
{
|
||||
if (mMenu)
|
||||
LLContextMenu* menup = mMenuHandle.get();
|
||||
if (menup)
|
||||
{
|
||||
//preventing parent (menu holder) from deleting already "dead" context menus on exit
|
||||
LLView* parent = mMenu->getParent();
|
||||
LLView* parent = menup->getParent();
|
||||
if (parent)
|
||||
{
|
||||
parent->removeChild(mMenu);
|
||||
parent->removeChild(menup);
|
||||
}
|
||||
delete mMenu;
|
||||
mMenu = NULL;
|
||||
delete menup;
|
||||
mUUIDs.clear();
|
||||
}
|
||||
|
||||
|
|
@ -79,23 +77,23 @@ void LLListContextMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32
|
|||
mUUIDs.resize(uuids.size());
|
||||
std::copy(uuids.begin(), uuids.end(), mUUIDs.begin());
|
||||
|
||||
mMenu = createMenu();
|
||||
if (!mMenu)
|
||||
menup = createMenu();
|
||||
if (!menup)
|
||||
{
|
||||
llwarns << "Context menu creation failed" << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
mMenuHandle = mMenu->getHandle();
|
||||
mMenu->show(x, y);
|
||||
LLMenuGL::showPopup(spawning_view, mMenu, x, y);
|
||||
mMenuHandle = menup->getHandle();
|
||||
menup->show(x, y);
|
||||
LLMenuGL::showPopup(spawning_view, menup, x, y);
|
||||
}
|
||||
|
||||
void LLListContextMenu::hide()
|
||||
{
|
||||
if(mMenu)
|
||||
if(mMenuHandle.get())
|
||||
{
|
||||
mMenu->hide();
|
||||
mMenuHandle.get()->hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,8 +71,7 @@ protected:
|
|||
static void handleMultiple(functor_t functor, const uuid_vec_t& ids);
|
||||
|
||||
uuid_vec_t mUUIDs;
|
||||
LLContextMenu* mMenu;
|
||||
LLHandle<LLView> mMenuHandle;
|
||||
LLHandle<LLContextMenu> mMenuHandle;
|
||||
};
|
||||
|
||||
#endif // LL_LLLISTCONTEXTMENU_H
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
|
|||
request_params["version"] = LLVersionInfo::getVersionAndChannel(); // Includes channel name
|
||||
request_params["channel"] = LLVersionInfo::getChannel();
|
||||
request_params["id0"] = mSerialNumber;
|
||||
request_params["host_id"] = gSavedSettings.getString("HostID");
|
||||
|
||||
mRequestData.clear();
|
||||
mRequestData["method"] = "login_to_simulator";
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ LLMediaCtrl::Params::Params()
|
|||
caret_color("caret_color"),
|
||||
initial_mime_type("initial_mime_type"),
|
||||
media_id("media_id"),
|
||||
trusted_content("trusted_content", false)
|
||||
trusted_content("trusted_content", false),
|
||||
focus_on_click("focus_on_click", true)
|
||||
{
|
||||
tab_stop(false);
|
||||
}
|
||||
|
|
@ -86,7 +87,7 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
|
|||
mIgnoreUIScale( true ),
|
||||
mAlwaysRefresh( false ),
|
||||
mMediaSource( 0 ),
|
||||
mTakeFocusOnClick( true ),
|
||||
mTakeFocusOnClick( p.focus_on_click ),
|
||||
mCurrentNavUrl( "" ),
|
||||
mStretchToFill( true ),
|
||||
mMaintainAspectRatio ( true ),
|
||||
|
|
@ -206,14 +207,6 @@ BOOL LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask )
|
|||
if (mMediaSource)
|
||||
{
|
||||
mMediaSource->mouseUp(x, y, mask);
|
||||
|
||||
// *HACK: LLMediaImplLLMozLib automatically takes focus on mouseup,
|
||||
// in addition to the onFocusReceived() call below. Undo this. JC
|
||||
if (!mTakeFocusOnClick)
|
||||
{
|
||||
mMediaSource->focus(false);
|
||||
gViewerWindow->focusClient();
|
||||
}
|
||||
}
|
||||
|
||||
gFocusMgr.setMouseCapture( NULL );
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ public:
|
|||
ignore_ui_scale,
|
||||
hide_loading,
|
||||
decouple_texture_size,
|
||||
trusted_content;
|
||||
trusted_content,
|
||||
focus_on_click;
|
||||
|
||||
Optional<S32> texture_width,
|
||||
texture_height;
|
||||
|
|
|
|||
|
|
@ -448,17 +448,20 @@ void LLFloaterMove::updatePosition()
|
|||
LLBottomTray* tray = LLBottomTray::getInstance();
|
||||
if (!tray) return;
|
||||
|
||||
LLButton* movement_btn = tray->getChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
|
||||
LLButton* movement_btn = tray->findChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
|
||||
|
||||
//align centers of a button and a floater
|
||||
S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
|
||||
|
||||
S32 y = 0;
|
||||
if (!mModeActionsPanel->getVisible())
|
||||
if (movement_btn)
|
||||
{
|
||||
y = mModeActionsPanel->getRect().getHeight();
|
||||
//align centers of a button and a floater
|
||||
S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
|
||||
|
||||
S32 y = 0;
|
||||
if (!mModeActionsPanel->getVisible())
|
||||
{
|
||||
y = mModeActionsPanel->getRect().getHeight();
|
||||
}
|
||||
setOrigin(x, y);
|
||||
}
|
||||
setOrigin(x, y);
|
||||
}
|
||||
|
||||
//static
|
||||
|
|
@ -735,10 +738,18 @@ void LLPanelStandStopFlying::updatePosition()
|
|||
LLBottomTray* tray = LLBottomTray::getInstance();
|
||||
if (!tray || mAttached) return;
|
||||
|
||||
LLButton* movement_btn = tray->getChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
|
||||
LLButton* movement_btn = tray->findChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
|
||||
|
||||
// Align centers of the button and the panel.
|
||||
S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
|
||||
S32 x = 0;
|
||||
if (movement_btn)
|
||||
{
|
||||
// Align centers of the button and the panel.
|
||||
x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = tray->calcScreenRect().getCenterX() - getRect().getWidth()/2;
|
||||
}
|
||||
setOrigin(x, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -276,9 +276,6 @@ LLNavigationBar::LLNavigationBar()
|
|||
|
||||
// set a listener function for LoginComplete event
|
||||
LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLNavigationBar::handleLoginComplete, this));
|
||||
|
||||
// Necessary for focus movement among child controls
|
||||
setFocusRoot(TRUE);
|
||||
}
|
||||
|
||||
LLNavigationBar::~LLNavigationBar()
|
||||
|
|
|
|||
|
|
@ -94,15 +94,19 @@ public:
|
|||
|
||||
LLGestureComboList::Params::Params()
|
||||
: combo_button("combo_button"),
|
||||
combo_list("combo_list")
|
||||
combo_list("combo_list"),
|
||||
get_more("get_more", true),
|
||||
view_all("view_all", true)
|
||||
{
|
||||
}
|
||||
|
||||
LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p)
|
||||
: LLUICtrl(p)
|
||||
, mLabel(p.label)
|
||||
, mViewAllItemIndex(0)
|
||||
, mGetMoreItemIndex(0)
|
||||
: LLUICtrl(p),
|
||||
mLabel(p.label),
|
||||
mViewAllItemIndex(-1),
|
||||
mGetMoreItemIndex(-1),
|
||||
mShowViewAll(p.view_all),
|
||||
mShowGetMore(p.get_more)
|
||||
{
|
||||
LLBottomtrayButton::Params button_params = p.combo_button;
|
||||
button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM|FOLLOWS_RIGHT);
|
||||
|
|
@ -286,12 +290,16 @@ void LLGestureComboList::refreshGestures()
|
|||
sortByName();
|
||||
|
||||
// store indices for Get More and View All items (idx is the index followed by the last added Gesture)
|
||||
mGetMoreItemIndex = idx;
|
||||
mViewAllItemIndex = idx + 1;
|
||||
|
||||
// add Get More and View All items at the bottom
|
||||
mList->addSimpleElement(LLTrans::getString("GetMoreGestures"), ADD_BOTTOM, LLSD(mGetMoreItemIndex));
|
||||
mList->addSimpleElement(LLTrans::getString("ViewAllGestures"), ADD_BOTTOM, LLSD(mViewAllItemIndex));
|
||||
if (mShowGetMore)
|
||||
{
|
||||
mGetMoreItemIndex = idx;
|
||||
mList->addSimpleElement(LLTrans::getString("GetMoreGestures"), ADD_BOTTOM, LLSD(mGetMoreItemIndex));
|
||||
}
|
||||
if (mShowViewAll)
|
||||
{
|
||||
mViewAllItemIndex = idx + 1;
|
||||
mList->addSimpleElement(LLTrans::getString("ViewAllGestures"), ADD_BOTTOM, LLSD(mViewAllItemIndex));
|
||||
}
|
||||
|
||||
// Insert label after sorting, at top, with separator below it
|
||||
mList->addSeparator(ADD_TOP);
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ public:
|
|||
{
|
||||
Optional<LLBottomtrayButton::Params> combo_button;
|
||||
Optional<LLScrollListCtrl::Params> combo_list;
|
||||
Optional<bool> get_more,
|
||||
view_all;
|
||||
|
||||
Params();
|
||||
};
|
||||
|
|
@ -56,6 +58,8 @@ protected:
|
|||
LLGestureComboList(const Params&);
|
||||
std::vector<LLMultiGesture*> mGestures;
|
||||
std::string mLabel;
|
||||
bool mShowViewAll;
|
||||
bool mShowGetMore;
|
||||
LLSD::Integer mViewAllItemIndex;
|
||||
LLSD::Integer mGetMoreItemIndex;
|
||||
|
||||
|
|
|
|||
|
|
@ -382,7 +382,10 @@ void LLNearbyChatScreenChannel::showToastsBottom()
|
|||
return;
|
||||
|
||||
LLRect toast_rect;
|
||||
S32 bottom = getRect().mBottom;
|
||||
updateBottom();
|
||||
S32 channel_bottom = getRect().mBottom;
|
||||
|
||||
S32 bottom = channel_bottom;
|
||||
S32 margin = gSavedSettings.getS32("ToastGap");
|
||||
|
||||
//sort active toasts
|
||||
|
|
@ -514,6 +517,14 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
|
|||
}
|
||||
|
||||
nearby_chat->addMessage(chat_msg, true, args);
|
||||
|
||||
if(chat_msg.mSourceType == CHAT_SOURCE_AGENT
|
||||
&& chat_msg.mFromID.notNull()
|
||||
&& chat_msg.mFromID != gAgentID)
|
||||
{
|
||||
LLFirstUse::otherAvatarChatFirst();
|
||||
}
|
||||
|
||||
if( nearby_chat->getVisible()
|
||||
|| ( chat_msg.mSourceType == CHAT_SOURCE_AGENT
|
||||
&& gSavedSettings.getBOOL("UseChatBubbles") ) )
|
||||
|
|
@ -573,13 +584,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
|
|||
notification["font_size"] = (S32)LLViewerChat::getChatFontSize() ;
|
||||
channel->addNotification(notification);
|
||||
}
|
||||
|
||||
if(chat_msg.mSourceType == CHAT_SOURCE_AGENT
|
||||
&& chat_msg.mFromID.notNull()
|
||||
&& chat_msg.mFromID != gAgentID)
|
||||
{
|
||||
LLFirstUse::otherAvatarChatFirst();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void LLNearbyChatHandler::onDeleteToast(LLToast* toast)
|
||||
|
|
|
|||
|
|
@ -163,8 +163,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
|
|||
mHtmlAvailable( TRUE ),
|
||||
mListener(new LLPanelLoginListener(this))
|
||||
{
|
||||
setFocusRoot(TRUE);
|
||||
|
||||
setBackgroundVisible(FALSE);
|
||||
setBackgroundOpaque(TRUE);
|
||||
|
||||
|
|
@ -181,8 +179,11 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
|
|||
mPasswordModified = FALSE;
|
||||
LLPanelLogin::sInstance = this;
|
||||
|
||||
// add to front so we are the bottom-most child
|
||||
gViewerWindow->getRootView()->addChildInBack(this);
|
||||
LLView* login_holder = gViewerWindow->getLoginPanelHolder();
|
||||
if (login_holder)
|
||||
{
|
||||
login_holder->addChild(this);
|
||||
}
|
||||
|
||||
// Logo
|
||||
mLogoImage = LLUI::getUIImage("startup_logo");
|
||||
|
|
@ -761,7 +762,7 @@ void LLPanelLogin::closePanel()
|
|||
{
|
||||
if (sInstance)
|
||||
{
|
||||
gViewerWindow->getRootView()->removeChild( LLPanelLogin::sInstance );
|
||||
LLPanelLogin::sInstance->getParent()->removeChild( LLPanelLogin::sInstance );
|
||||
|
||||
delete sInstance;
|
||||
sInstance = NULL;
|
||||
|
|
|
|||
|
|
@ -186,14 +186,8 @@ private:
|
|||
// Populate the menu with items like "New Skin", "New Pants", etc.
|
||||
static void populateCreateWearableSubmenus(LLMenuGL* menu)
|
||||
{
|
||||
LLView* menu_clothes = gMenuHolder->findChildView("COF.Gear.New_Clothes", FALSE);
|
||||
LLView* menu_bp = gMenuHolder->findChildView("COF.Geear.New_Body_Parts", FALSE);
|
||||
|
||||
if (!menu_clothes || !menu_bp)
|
||||
{
|
||||
llassert(menu_clothes && menu_bp);
|
||||
return;
|
||||
}
|
||||
LLView* menu_clothes = gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE);
|
||||
LLView* menu_bp = gMenuHolder->getChildView("COF.Geear.New_Body_Parts", FALSE);
|
||||
|
||||
for (U8 i = LLWearableType::WT_SHAPE; i != (U8) LLWearableType::WT_COUNT; ++i)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -348,8 +348,6 @@ BOOL LLPanelPlaces::postBuild()
|
|||
|
||||
void LLPanelPlaces::onOpen(const LLSD& key)
|
||||
{
|
||||
LLFirstUse::notUsingDestinationGuide(false);
|
||||
|
||||
if (!mPlaceProfile || !mLandmarkInfo)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -519,7 +519,7 @@ void LLPanelPrimMediaControls::updateShape()
|
|||
if(LLPluginClassMediaOwner::MEDIA_LOADING == media_plugin->getStatus())
|
||||
{
|
||||
mMediaProgressPanel->setVisible(true);
|
||||
mMediaProgressBar->setPercent(media_plugin->getProgressPercent());
|
||||
mMediaProgressBar->setValue(media_plugin->getProgressPercent());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -620,12 +620,12 @@ void LLPanelPrimMediaControls::updateShape()
|
|||
// convert screenspace bbox to pixels (in screen coords)
|
||||
LLRect window_rect = gViewerWindow->getWorldViewRectScaled();
|
||||
LLCoordGL screen_min;
|
||||
screen_min.mX = llround((F32)window_rect.getWidth() * (min.mV[VX] + 1.f) * 0.5f);
|
||||
screen_min.mY = llround((F32)window_rect.getHeight() * (min.mV[VY] + 1.f) * 0.5f);
|
||||
screen_min.mX = llround((F32)window_rect.mLeft + (F32)window_rect.getWidth() * (min.mV[VX] + 1.f) * 0.5f);
|
||||
screen_min.mY = llround((F32)window_rect.mBottom + (F32)window_rect.getHeight() * (min.mV[VY] + 1.f) * 0.5f);
|
||||
|
||||
LLCoordGL screen_max;
|
||||
screen_max.mX = llround((F32)window_rect.getWidth() * (max.mV[VX] + 1.f) * 0.5f);
|
||||
screen_max.mY = llround((F32)window_rect.getHeight() * (max.mV[VY] + 1.f) * 0.5f);
|
||||
screen_max.mX = llround((F32)window_rect.mLeft + (F32)window_rect.getWidth() * (max.mV[VX] + 1.f) * 0.5f);
|
||||
screen_max.mY = llround((F32)window_rect.mBottom + (F32)window_rect.getHeight() * (max.mV[VY] + 1.f) * 0.5f);
|
||||
|
||||
// grow panel so that screenspace bounding box fits inside "media_region" element of panel
|
||||
LLRect media_panel_rect;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@ bool view_visible(LLView* viewp)
|
|||
}
|
||||
|
||||
|
||||
LLPopupView::LLPopupView()
|
||||
LLPopupView::LLPopupView(const LLPopupView::Params& p)
|
||||
: LLPanel(p)
|
||||
{
|
||||
// register ourself as handler of UI popups
|
||||
LLUI::setPopupFuncs(boost::bind(&LLPopupView::addPopup, this, _1), boost::bind(&LLPopupView::removePopup, this, _1), boost::bind(&LLPopupView::clearPopups, this));
|
||||
|
|
@ -137,64 +138,102 @@ BOOL LLPopupView::handleMouseEvent(boost::function<BOOL(LLView*, S32, S32)> func
|
|||
|
||||
BOOL LLPopupView::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if (!handleMouseEvent(boost::bind(&LLMouseHandler::handleMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true))
|
||||
BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true);
|
||||
if (!handled)
|
||||
{
|
||||
return FALSE;
|
||||
handled = LLPanel::handleMouseDown(x, y, mask);
|
||||
}
|
||||
return TRUE;
|
||||
return handled;
|
||||
}
|
||||
|
||||
BOOL LLPopupView::handleMouseUp(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
return handleMouseEvent(boost::bind(&LLMouseHandler::handleMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
|
||||
BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
|
||||
if (!handled)
|
||||
{
|
||||
handled = LLPanel::handleMouseUp(x, y, mask);
|
||||
}
|
||||
return handled;
|
||||
}
|
||||
|
||||
BOOL LLPopupView::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if (!handleMouseEvent(boost::bind(&LLMouseHandler::handleMiddleMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true))
|
||||
BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleMiddleMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true);
|
||||
if (!handled)
|
||||
{
|
||||
return FALSE;
|
||||
handled = LLPanel::handleMiddleMouseDown(x, y, mask);
|
||||
}
|
||||
return TRUE;
|
||||
return handled;
|
||||
}
|
||||
|
||||
BOOL LLPopupView::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
return handleMouseEvent(boost::bind(&LLMouseHandler::handleMiddleMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
|
||||
BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleMiddleMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
|
||||
if (!handled)
|
||||
{
|
||||
handled = LLPanel::handleMiddleMouseUp(x, y, mask);
|
||||
}
|
||||
return handled;
|
||||
}
|
||||
|
||||
BOOL LLPopupView::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if (!handleMouseEvent(boost::bind(&LLMouseHandler::handleRightMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true))
|
||||
BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleRightMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true);
|
||||
if (!handled)
|
||||
{
|
||||
return FALSE;
|
||||
handled = LLPanel::handleRightMouseDown(x, y, mask);
|
||||
}
|
||||
return TRUE;
|
||||
return handled;
|
||||
}
|
||||
|
||||
BOOL LLPopupView::handleRightMouseUp(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
return handleMouseEvent(boost::bind(&LLMouseHandler::handleRightMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
|
||||
BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleRightMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
|
||||
if (!handled)
|
||||
{
|
||||
handled = LLPanel::handleRightMouseUp(x, y, mask);
|
||||
}
|
||||
return handled;
|
||||
}
|
||||
|
||||
BOOL LLPopupView::handleDoubleClick(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
return handleMouseEvent(boost::bind(&LLMouseHandler::handleDoubleClick, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
|
||||
BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleDoubleClick, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
|
||||
if (!handled)
|
||||
{
|
||||
handled = LLPanel::handleDoubleClick(x, y, mask);
|
||||
}
|
||||
return handled;
|
||||
}
|
||||
|
||||
BOOL LLPopupView::handleHover(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
return handleMouseEvent(boost::bind(&LLMouseHandler::handleHover, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
|
||||
BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleHover, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
|
||||
if (!handled)
|
||||
{
|
||||
handled = LLPanel::handleHover(x, y, mask);
|
||||
}
|
||||
return handled;
|
||||
}
|
||||
|
||||
BOOL LLPopupView::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
||||
{
|
||||
return handleMouseEvent(boost::bind(&LLMouseHandler::handleScrollWheel, _1, _2, _3, clicks), view_visible_and_enabled, x, y, false);
|
||||
BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleScrollWheel, _1, _2, _3, clicks), view_visible_and_enabled, x, y, false);
|
||||
if (!handled)
|
||||
{
|
||||
handled = LLPanel::handleScrollWheel(x, y, clicks);
|
||||
}
|
||||
return handled;
|
||||
}
|
||||
|
||||
BOOL LLPopupView::handleToolTip(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
return handleMouseEvent(boost::bind(&LLMouseHandler::handleToolTip, _1, _2, _3, mask), view_visible, x, y, false);
|
||||
BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleToolTip, _1, _2, _3, mask), view_visible, x, y, false);
|
||||
if (!handled)
|
||||
{
|
||||
handled = LLPanel::handleToolTip(x, y, mask);
|
||||
}
|
||||
return handled;
|
||||
}
|
||||
|
||||
void LLPopupView::addPopup(LLView* popup)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
class LLPopupView : public LLPanel
|
||||
{
|
||||
public:
|
||||
LLPopupView();
|
||||
LLPopupView(const Params& p = LLPanel::Params());
|
||||
~LLPopupView();
|
||||
|
||||
/*virtual*/ void draw();
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ void LLProgressView::setText(const std::string& text)
|
|||
|
||||
void LLProgressView::setPercent(const F32 percent)
|
||||
{
|
||||
mProgressBar->setPercent(percent);
|
||||
mProgressBar->setValue(percent);
|
||||
}
|
||||
|
||||
void LLProgressView::setMessage(const std::string& msg)
|
||||
|
|
|
|||
|
|
@ -42,27 +42,5 @@ public:
|
|||
LLRootView(const Params& p)
|
||||
: LLView(p)
|
||||
{}
|
||||
|
||||
// added to provide possibility to handle mouse click event inside all application
|
||||
// window without creating any floater
|
||||
typedef boost::signals2::signal<void(S32 x, S32 y, MASK mask)>
|
||||
mouse_signal_t;
|
||||
|
||||
private:
|
||||
mouse_signal_t mMouseDownSignal;
|
||||
|
||||
public:
|
||||
/*virtual*/
|
||||
BOOL handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
mMouseDownSignal(x, y, mask);
|
||||
return LLView::handleMouseDown(x, y, mask);
|
||||
}
|
||||
|
||||
boost::signals2::connection addMouseDownCallback(
|
||||
const mouse_signal_t::slot_type& cb)
|
||||
{
|
||||
return mMouseDownSignal.connect(cb);
|
||||
}
|
||||
};
|
||||
#endif //LL_LLROOTVIEW_H
|
||||
|
|
|
|||
|
|
@ -136,12 +136,22 @@ void LLScreenChannelBase::init(S32 channel_left, S32 channel_right)
|
|||
side_bar->getCollapseSignal().connect(boost::bind(&LLScreenChannelBase::resetPositionAndSize, this, _2));
|
||||
}
|
||||
|
||||
S32 channel_top = gViewerWindow->getWorldViewRectScaled().getHeight();
|
||||
S32 channel_bottom = gViewerWindow->getWorldViewRectScaled().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");
|
||||
setRect(LLRect(channel_left, channel_top, channel_right, channel_bottom));
|
||||
// top and bottom set by updateBottom()
|
||||
setRect(LLRect(channel_left, 0, channel_right, 0));
|
||||
updateBottom();
|
||||
setVisible(TRUE);
|
||||
}
|
||||
|
||||
void LLScreenChannelBase::updateBottom()
|
||||
{
|
||||
S32 channel_top = gViewerWindow->getWorldViewRectScaled().getHeight();
|
||||
S32 channel_bottom = gSavedSettings.getS32("ChannelBottomPanelMargin");
|
||||
S32 channel_left = getRect().mLeft;
|
||||
S32 channel_right = getRect().mRight;
|
||||
setRect(LLRect(channel_left, channel_top, channel_right, channel_bottom));
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
//////////////////////
|
||||
// LLScreenChannel
|
||||
|
|
@ -511,6 +521,8 @@ void LLScreenChannel::showToastsBottom()
|
|||
S32 toast_margin = 0;
|
||||
std::vector<ToastElem>::reverse_iterator it;
|
||||
|
||||
updateBottom();
|
||||
|
||||
LLDockableFloater* floater = dynamic_cast<LLDockableFloater*>(LLDockableFloater::getInstanceHandle().get());
|
||||
|
||||
for(it = mToastList.rbegin(); it != mToastList.rend(); ++it)
|
||||
|
|
@ -850,13 +862,7 @@ void LLScreenChannel::updateShowToastsState()
|
|||
return;
|
||||
}
|
||||
|
||||
S32 channel_bottom = gViewerWindow->getWorldViewRectScaled().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");;
|
||||
LLRect this_rect = getRect();
|
||||
|
||||
if(channel_bottom != this_rect.mBottom)
|
||||
{
|
||||
setRect(LLRect(this_rect.mLeft, this_rect.mTop, this_rect.mRight, channel_bottom));
|
||||
}
|
||||
updateBottom();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -111,6 +111,8 @@ public:
|
|||
LLUUID getChannelID() { return mID; }
|
||||
|
||||
protected:
|
||||
void updateBottom();
|
||||
|
||||
// Channel's flags
|
||||
bool mControlHovering;
|
||||
LLToast* mHoveredToast;
|
||||
|
|
|
|||
|
|
@ -159,8 +159,6 @@ LLSideTrayTab::LLSideTrayTab(const Params& p)
|
|||
mDescription(p.description),
|
||||
mMainPanel(NULL)
|
||||
{
|
||||
// Necessary for focus movement among child controls
|
||||
setFocusRoot(TRUE);
|
||||
}
|
||||
|
||||
LLSideTrayTab::~LLSideTrayTab()
|
||||
|
|
@ -914,7 +912,6 @@ void LLSideTray::createButtons ()
|
|||
}
|
||||
}
|
||||
LLHints::registerHintTarget("inventory_btn", mTabButtons["sidebar_inventory"]->getHandle());
|
||||
LLHints::registerHintTarget("dest_guide_btn", mTabButtons["sidebar_places"]->getHandle());
|
||||
}
|
||||
|
||||
void LLSideTray::processTriState ()
|
||||
|
|
|
|||
|
|
@ -233,6 +233,8 @@ static LLHost gFirstSim;
|
|||
static std::string gFirstSimSeedCap;
|
||||
static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f);
|
||||
static std::string gAgentStartLocation = "safe";
|
||||
static bool mLoginStatePastUI = false;
|
||||
|
||||
|
||||
boost::scoped_ptr<LLEventPump> LLStartUp::sStateWatcher(new LLEventStream("StartupState"));
|
||||
boost::scoped_ptr<LLStartupListener> LLStartUp::sListener(new LLStartupListener());
|
||||
|
|
@ -706,7 +708,15 @@ bool idle_startup()
|
|||
if (STATE_LOGIN_SHOW == LLStartUp::getStartupState())
|
||||
{
|
||||
LL_DEBUGS("AppInit") << "Initializing Window" << LL_ENDL;
|
||||
|
||||
|
||||
// if we've gone backwards in the login state machine, to this state where we show the UI
|
||||
// AND the debug setting to exit in this case is true, then go ahead and bail quickly
|
||||
if ( mLoginStatePastUI && gSavedSettings.getBOOL("QuitOnLoginActivated") )
|
||||
{
|
||||
// no requirement for notification here - just exit
|
||||
LLAppViewer::instance()->earlyExitNoNotify();
|
||||
}
|
||||
|
||||
gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
|
||||
|
||||
timeout_count = 0;
|
||||
|
|
@ -784,6 +794,11 @@ bool idle_startup()
|
|||
|
||||
if (STATE_LOGIN_WAIT == LLStartUp::getStartupState())
|
||||
{
|
||||
// when we get to this state, we've already been past the login UI
|
||||
// (possiblely automatically) - flag this so we can test in the
|
||||
// STATE_LOGIN_SHOW state if we've gone backwards
|
||||
mLoginStatePastUI = true;
|
||||
|
||||
// Don't do anything. Wait for the login view to call the login_callback,
|
||||
// which will push us to the next state.
|
||||
|
||||
|
|
@ -810,6 +825,11 @@ bool idle_startup()
|
|||
gKeyboard->resetKeys();
|
||||
}
|
||||
|
||||
// when we get to this state, we've already been past the login UI
|
||||
// (possiblely automatically) - flag this so we can test in the
|
||||
// STATE_LOGIN_SHOW state if we've gone backwards
|
||||
mLoginStatePastUI = true;
|
||||
|
||||
// save the credentials
|
||||
std::string userid = "unknown";
|
||||
if(gUserCredential.notNull())
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "llview.h"
|
||||
|
||||
#include "llviewerwindow.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "lltoolcomp.h"
|
||||
#include "lltoolfocus.h"
|
||||
#include "llfocusmgr.h"
|
||||
|
|
@ -190,9 +191,12 @@ LLTool* LLTool::getOverrideTool(MASK mask)
|
|||
{
|
||||
return NULL;
|
||||
}
|
||||
if (mask & MASK_ALT)
|
||||
if (gSavedSettings.getBOOL("EnableAltZoom"))
|
||||
{
|
||||
return LLToolCamera::getInstance();
|
||||
if (mask & MASK_ALT)
|
||||
{
|
||||
return LLToolCamera::getInstance();
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,9 +81,11 @@ LLToolPie::LLToolPie()
|
|||
: LLTool(std::string("Pie")),
|
||||
mGrabMouseButtonDown( FALSE ),
|
||||
mMouseOutsideSlop( FALSE ),
|
||||
mClickAction(0)
|
||||
{ }
|
||||
|
||||
mClickAction(0),
|
||||
mClickActionBuyEnabled( gSavedSettings.getBOOL("ClickActionBuyEnabled") ),
|
||||
mClickActionPayEnabled( gSavedSettings.getBOOL("ClickActionPayEnabled") )
|
||||
{
|
||||
}
|
||||
|
||||
BOOL LLToolPie::handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktype, BOOL down)
|
||||
{
|
||||
|
|
@ -211,12 +213,28 @@ BOOL LLToolPie::pickLeftMouseDownCallback()
|
|||
} // else nothing (fall through to touch)
|
||||
}
|
||||
case CLICK_ACTION_PAY:
|
||||
if ((object && object->flagTakesMoney())
|
||||
|| (parent && parent->flagTakesMoney()))
|
||||
if ( mClickActionPayEnabled )
|
||||
{
|
||||
// pay event goes to object actually clicked on
|
||||
mClickActionObject = object;
|
||||
mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE);
|
||||
if ((object && object->flagTakesMoney())
|
||||
|| (parent && parent->flagTakesMoney()))
|
||||
{
|
||||
// pay event goes to object actually clicked on
|
||||
mClickActionObject = object;
|
||||
mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE);
|
||||
if (LLSelectMgr::getInstance()->selectGetAllValid())
|
||||
{
|
||||
// call this right away, since we have all the info we need to continue the action
|
||||
selectionPropertiesReceived();
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CLICK_ACTION_BUY:
|
||||
if ( mClickActionBuyEnabled )
|
||||
{
|
||||
mClickActionObject = parent;
|
||||
mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE, TRUE);
|
||||
if (LLSelectMgr::getInstance()->selectGetAllValid())
|
||||
{
|
||||
// call this right away, since we have all the info we need to continue the action
|
||||
|
|
@ -225,15 +243,6 @@ BOOL LLToolPie::pickLeftMouseDownCallback()
|
|||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case CLICK_ACTION_BUY:
|
||||
mClickActionObject = parent;
|
||||
mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE, TRUE);
|
||||
if (LLSelectMgr::getInstance()->selectGetAllValid())
|
||||
{
|
||||
// call this right away, since we have all the info we need to continue the action
|
||||
selectionPropertiesReceived();
|
||||
}
|
||||
return TRUE;
|
||||
case CLICK_ACTION_OPEN:
|
||||
if (parent && parent->allowOpen())
|
||||
{
|
||||
|
|
@ -393,7 +402,7 @@ U8 final_click_action(LLViewerObject* obj)
|
|||
return click_action;
|
||||
}
|
||||
|
||||
ECursorType cursor_from_object(LLViewerObject* object)
|
||||
ECursorType LLToolPie::cursorFromObject(LLViewerObject* object)
|
||||
{
|
||||
LLViewerObject* parent = NULL;
|
||||
if (object)
|
||||
|
|
@ -413,7 +422,10 @@ ECursorType cursor_from_object(LLViewerObject* object)
|
|||
}
|
||||
break;
|
||||
case CLICK_ACTION_BUY:
|
||||
cursor = UI_CURSOR_TOOLBUY;
|
||||
if ( mClickActionBuyEnabled )
|
||||
{
|
||||
cursor = UI_CURSOR_TOOLBUY;
|
||||
}
|
||||
break;
|
||||
case CLICK_ACTION_OPEN:
|
||||
// Open always opens the parent.
|
||||
|
|
@ -423,10 +435,13 @@ ECursorType cursor_from_object(LLViewerObject* object)
|
|||
}
|
||||
break;
|
||||
case CLICK_ACTION_PAY:
|
||||
if ((object && object->flagTakesMoney())
|
||||
|| (parent && parent->flagTakesMoney()))
|
||||
if ( mClickActionPayEnabled )
|
||||
{
|
||||
cursor = UI_CURSOR_TOOLBUY;
|
||||
if ((object && object->flagTakesMoney())
|
||||
|| (parent && parent->flagTakesMoney()))
|
||||
{
|
||||
cursor = UI_CURSOR_TOOLBUY;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CLICK_ACTION_ZOOM:
|
||||
|
|
@ -474,10 +489,16 @@ void LLToolPie::selectionPropertiesReceived()
|
|||
switch (click_action)
|
||||
{
|
||||
case CLICK_ACTION_BUY:
|
||||
handle_buy();
|
||||
if ( LLToolPie::getInstance()->mClickActionBuyEnabled )
|
||||
{
|
||||
handle_buy();
|
||||
}
|
||||
break;
|
||||
case CLICK_ACTION_PAY:
|
||||
handle_give_money_dialog();
|
||||
if ( LLToolPie::getInstance()->mClickActionPayEnabled )
|
||||
{
|
||||
handle_give_money_dialog();
|
||||
}
|
||||
break;
|
||||
case CLICK_ACTION_OPEN:
|
||||
LLFloaterReg::showInstance("openobject");
|
||||
|
|
@ -518,7 +539,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
|
|||
else if (click_action_object && useClickAction(mask, click_action_object, click_action_object->getRootEdit()))
|
||||
{
|
||||
show_highlight = true;
|
||||
ECursorType cursor = cursor_from_object(click_action_object);
|
||||
ECursorType cursor = cursorFromObject(click_action_object);
|
||||
gViewerWindow->setCursor(cursor);
|
||||
lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
|
||||
}
|
||||
|
|
@ -571,7 +592,9 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
|
|||
{
|
||||
switch(click_action)
|
||||
{
|
||||
// NOTE: mClickActionBuyEnabled flag enables/disables BUY action but setting cursor to default is okay
|
||||
case CLICK_ACTION_BUY:
|
||||
// NOTE: mClickActionPayEnabled flag enables/disables PAY action but setting cursor to default is okay
|
||||
case CLICK_ACTION_PAY:
|
||||
case CLICK_ACTION_OPEN:
|
||||
case CLICK_ACTION_ZOOM:
|
||||
|
|
@ -1228,15 +1251,17 @@ void LLToolPie::handleDeselect()
|
|||
|
||||
LLTool* LLToolPie::getOverrideTool(MASK mask)
|
||||
{
|
||||
if (mask == MASK_CONTROL)
|
||||
if (gSavedSettings.getBOOL("EnableGrab"))
|
||||
{
|
||||
return LLToolGrab::getInstance();
|
||||
if (mask == MASK_CONTROL)
|
||||
{
|
||||
return LLToolGrab::getInstance();
|
||||
}
|
||||
else if (mask == (MASK_CONTROL | MASK_SHIFT))
|
||||
{
|
||||
return LLToolGrab::getInstance();
|
||||
}
|
||||
}
|
||||
else if (mask == (MASK_CONTROL | MASK_SHIFT))
|
||||
{
|
||||
return LLToolGrab::getInstance();
|
||||
}
|
||||
|
||||
return LLTool::getOverrideTool(mask);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ private:
|
|||
BOOL useClickAction (MASK mask, LLViewerObject* object,LLViewerObject* parent);
|
||||
|
||||
void showVisualContextMenuEffect();
|
||||
ECursorType cursorFromObject(LLViewerObject* object);
|
||||
|
||||
bool handleMediaClick(const LLPickInfo& info);
|
||||
bool handleMediaHover(const LLPickInfo& info);
|
||||
|
|
@ -96,8 +97,8 @@ private:
|
|||
LLPointer<LLViewerObject> mClickActionObject;
|
||||
U8 mClickAction;
|
||||
LLSafeHandle<LLObjectSelection> mLeftClickSelection;
|
||||
|
||||
BOOL mClickActionBuyEnabled;
|
||||
BOOL mClickActionPayEnabled;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -109,6 +109,8 @@ void LLTracker::stopTracking(void* userdata)
|
|||
// static virtual
|
||||
void LLTracker::drawHUDArrow()
|
||||
{
|
||||
if (!gSavedSettings.getBOOL("RenderTrackerBeacon")) return;
|
||||
|
||||
static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white);
|
||||
|
||||
/* tracking autopilot destination has been disabled
|
||||
|
|
@ -155,7 +157,7 @@ void LLTracker::drawHUDArrow()
|
|||
// static
|
||||
void LLTracker::render3D()
|
||||
{
|
||||
if (!gFloaterWorldMap)
|
||||
if (!gFloaterWorldMap || !gSavedSettings.getBOOL("RenderTrackerBeacon"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ LLTransientFloaterMgr::LLTransientFloaterMgr()
|
|||
{
|
||||
if(gViewerWindow)
|
||||
{
|
||||
gViewerWindow->getRootView()->addMouseDownCallback(boost::bind(
|
||||
&LLTransientFloaterMgr::leftMouseClickCallback, this, _1, _2, _3));
|
||||
gViewerWindow->getRootView()->getChild<LLUICtrl>("popup_holder")->setMouseDownCallback(boost::bind(
|
||||
&LLTransientFloaterMgr::leftMouseClickCallback, this, _2, _3, _4));
|
||||
}
|
||||
|
||||
mGroupControls.insert(std::pair<ETransientGroup, std::set<LLView*> >(GLOBAL, std::set<LLView*>()));
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
#include "llviewerwindow.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "llfloatercamera.h"
|
||||
#include "llinitparam.h"
|
||||
|
||||
//
|
||||
// Constants
|
||||
|
|
@ -53,6 +54,11 @@ const S32 NUDGE_FRAMES = 2;
|
|||
const F32 ORBIT_NUDGE_RATE = 0.05f; // fraction of normal speed
|
||||
const F32 YAW_NUDGE_RATE = 0.05f; // fraction of normal speed
|
||||
|
||||
struct LLKeyboardActionRegistry
|
||||
: public LLRegistrySingleton<std::string, boost::function<void (EKeystate keystate)>, LLKeyboardActionRegistry>
|
||||
{
|
||||
};
|
||||
|
||||
LLViewerKeyboard gViewerKeyboard;
|
||||
|
||||
void agent_jump( EKeystate s )
|
||||
|
|
@ -550,52 +556,50 @@ void start_gesture( EKeystate s )
|
|||
}
|
||||
}
|
||||
|
||||
void bind_keyboard_functions()
|
||||
{
|
||||
gViewerKeyboard.bindNamedFunction("jump", agent_jump);
|
||||
gViewerKeyboard.bindNamedFunction("push_down", agent_push_down);
|
||||
gViewerKeyboard.bindNamedFunction("push_forward", agent_push_forward);
|
||||
gViewerKeyboard.bindNamedFunction("push_backward", agent_push_backward);
|
||||
gViewerKeyboard.bindNamedFunction("look_up", agent_look_up);
|
||||
gViewerKeyboard.bindNamedFunction("look_down", agent_look_down);
|
||||
gViewerKeyboard.bindNamedFunction("toggle_fly", agent_toggle_fly);
|
||||
gViewerKeyboard.bindNamedFunction("turn_left", agent_turn_left);
|
||||
gViewerKeyboard.bindNamedFunction("turn_right", agent_turn_right);
|
||||
gViewerKeyboard.bindNamedFunction("slide_left", agent_slide_left);
|
||||
gViewerKeyboard.bindNamedFunction("slide_right", agent_slide_right);
|
||||
gViewerKeyboard.bindNamedFunction("spin_around_ccw", camera_spin_around_ccw);
|
||||
gViewerKeyboard.bindNamedFunction("spin_around_cw", camera_spin_around_cw);
|
||||
gViewerKeyboard.bindNamedFunction("spin_around_ccw_sitting", camera_spin_around_ccw_sitting);
|
||||
gViewerKeyboard.bindNamedFunction("spin_around_cw_sitting", camera_spin_around_cw_sitting);
|
||||
gViewerKeyboard.bindNamedFunction("spin_over", camera_spin_over);
|
||||
gViewerKeyboard.bindNamedFunction("spin_under", camera_spin_under);
|
||||
gViewerKeyboard.bindNamedFunction("spin_over_sitting", camera_spin_over_sitting);
|
||||
gViewerKeyboard.bindNamedFunction("spin_under_sitting", camera_spin_under_sitting);
|
||||
gViewerKeyboard.bindNamedFunction("move_forward", camera_move_forward);
|
||||
gViewerKeyboard.bindNamedFunction("move_backward", camera_move_backward);
|
||||
gViewerKeyboard.bindNamedFunction("move_forward_sitting", camera_move_forward_sitting);
|
||||
gViewerKeyboard.bindNamedFunction("move_backward_sitting", camera_move_backward_sitting);
|
||||
gViewerKeyboard.bindNamedFunction("pan_up", camera_pan_up);
|
||||
gViewerKeyboard.bindNamedFunction("pan_down", camera_pan_down);
|
||||
gViewerKeyboard.bindNamedFunction("pan_left", camera_pan_left);
|
||||
gViewerKeyboard.bindNamedFunction("pan_right", camera_pan_right);
|
||||
gViewerKeyboard.bindNamedFunction("pan_in", camera_pan_in);
|
||||
gViewerKeyboard.bindNamedFunction("pan_out", camera_pan_out);
|
||||
gViewerKeyboard.bindNamedFunction("move_forward_fast", camera_move_forward_fast);
|
||||
gViewerKeyboard.bindNamedFunction("move_backward_fast", camera_move_backward_fast);
|
||||
gViewerKeyboard.bindNamedFunction("edit_avatar_spin_ccw", edit_avatar_spin_ccw);
|
||||
gViewerKeyboard.bindNamedFunction("edit_avatar_spin_cw", edit_avatar_spin_cw);
|
||||
gViewerKeyboard.bindNamedFunction("edit_avatar_spin_over", edit_avatar_spin_over);
|
||||
gViewerKeyboard.bindNamedFunction("edit_avatar_spin_under", edit_avatar_spin_under);
|
||||
gViewerKeyboard.bindNamedFunction("edit_avatar_move_forward", edit_avatar_move_forward);
|
||||
gViewerKeyboard.bindNamedFunction("edit_avatar_move_backward", edit_avatar_move_backward);
|
||||
gViewerKeyboard.bindNamedFunction("stop_moving", stop_moving);
|
||||
gViewerKeyboard.bindNamedFunction("start_chat", start_chat);
|
||||
gViewerKeyboard.bindNamedFunction("start_gesture", start_gesture);
|
||||
}
|
||||
#define REGISTER_KEYBOARD_ACTION(KEY, ACTION) LLREGISTER_STATIC(LLKeyboardActionRegistry, KEY, ACTION);
|
||||
REGISTER_KEYBOARD_ACTION("jump", agent_jump);
|
||||
REGISTER_KEYBOARD_ACTION("push_down", agent_push_down);
|
||||
REGISTER_KEYBOARD_ACTION("push_forward", agent_push_forward);
|
||||
REGISTER_KEYBOARD_ACTION("push_backward", agent_push_backward);
|
||||
REGISTER_KEYBOARD_ACTION("look_up", agent_look_up);
|
||||
REGISTER_KEYBOARD_ACTION("look_down", agent_look_down);
|
||||
REGISTER_KEYBOARD_ACTION("toggle_fly", agent_toggle_fly);
|
||||
REGISTER_KEYBOARD_ACTION("turn_left", agent_turn_left);
|
||||
REGISTER_KEYBOARD_ACTION("turn_right", agent_turn_right);
|
||||
REGISTER_KEYBOARD_ACTION("slide_left", agent_slide_left);
|
||||
REGISTER_KEYBOARD_ACTION("slide_right", agent_slide_right);
|
||||
REGISTER_KEYBOARD_ACTION("spin_around_ccw", camera_spin_around_ccw);
|
||||
REGISTER_KEYBOARD_ACTION("spin_around_cw", camera_spin_around_cw);
|
||||
REGISTER_KEYBOARD_ACTION("spin_around_ccw_sitting", camera_spin_around_ccw_sitting);
|
||||
REGISTER_KEYBOARD_ACTION("spin_around_cw_sitting", camera_spin_around_cw_sitting);
|
||||
REGISTER_KEYBOARD_ACTION("spin_over", camera_spin_over);
|
||||
REGISTER_KEYBOARD_ACTION("spin_under", camera_spin_under);
|
||||
REGISTER_KEYBOARD_ACTION("spin_over_sitting", camera_spin_over_sitting);
|
||||
REGISTER_KEYBOARD_ACTION("spin_under_sitting", camera_spin_under_sitting);
|
||||
REGISTER_KEYBOARD_ACTION("move_forward", camera_move_forward);
|
||||
REGISTER_KEYBOARD_ACTION("move_backward", camera_move_backward);
|
||||
REGISTER_KEYBOARD_ACTION("move_forward_sitting", camera_move_forward_sitting);
|
||||
REGISTER_KEYBOARD_ACTION("move_backward_sitting", camera_move_backward_sitting);
|
||||
REGISTER_KEYBOARD_ACTION("pan_up", camera_pan_up);
|
||||
REGISTER_KEYBOARD_ACTION("pan_down", camera_pan_down);
|
||||
REGISTER_KEYBOARD_ACTION("pan_left", camera_pan_left);
|
||||
REGISTER_KEYBOARD_ACTION("pan_right", camera_pan_right);
|
||||
REGISTER_KEYBOARD_ACTION("pan_in", camera_pan_in);
|
||||
REGISTER_KEYBOARD_ACTION("pan_out", camera_pan_out);
|
||||
REGISTER_KEYBOARD_ACTION("move_forward_fast", camera_move_forward_fast);
|
||||
REGISTER_KEYBOARD_ACTION("move_backward_fast", camera_move_backward_fast);
|
||||
REGISTER_KEYBOARD_ACTION("edit_avatar_spin_ccw", edit_avatar_spin_ccw);
|
||||
REGISTER_KEYBOARD_ACTION("edit_avatar_spin_cw", edit_avatar_spin_cw);
|
||||
REGISTER_KEYBOARD_ACTION("edit_avatar_spin_over", edit_avatar_spin_over);
|
||||
REGISTER_KEYBOARD_ACTION("edit_avatar_spin_under", edit_avatar_spin_under);
|
||||
REGISTER_KEYBOARD_ACTION("edit_avatar_move_forward", edit_avatar_move_forward);
|
||||
REGISTER_KEYBOARD_ACTION("edit_avatar_move_backward", edit_avatar_move_backward);
|
||||
REGISTER_KEYBOARD_ACTION("stop_moving", stop_moving);
|
||||
REGISTER_KEYBOARD_ACTION("start_chat", start_chat);
|
||||
REGISTER_KEYBOARD_ACTION("start_gesture", start_gesture);
|
||||
#undef REGISTER_KEYBOARD_ACTION
|
||||
|
||||
LLViewerKeyboard::LLViewerKeyboard() :
|
||||
mNamedFunctionCount(0)
|
||||
LLViewerKeyboard::LLViewerKeyboard()
|
||||
{
|
||||
for (S32 i = 0; i < MODE_COUNT; i++)
|
||||
{
|
||||
|
|
@ -613,16 +617,6 @@ LLViewerKeyboard::LLViewerKeyboard() :
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void LLViewerKeyboard::bindNamedFunction(const std::string& name, LLKeyFunc func)
|
||||
{
|
||||
S32 i = mNamedFunctionCount;
|
||||
mNamedFunctions[i].mName = name;
|
||||
mNamedFunctions[i].mFunction = func;
|
||||
mNamedFunctionCount++;
|
||||
}
|
||||
|
||||
|
||||
BOOL LLViewerKeyboard::modeFromString(const std::string& string, S32 *mode)
|
||||
{
|
||||
if (string == "FIRST_PERSON")
|
||||
|
|
@ -695,8 +689,9 @@ BOOL LLViewerKeyboard::handleKey(KEY translated_key, MASK translated_mask, BOOL
|
|||
|
||||
BOOL LLViewerKeyboard::bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name)
|
||||
{
|
||||
S32 i,index;
|
||||
void (*function)(EKeystate keystate) = NULL;
|
||||
S32 index;
|
||||
typedef boost::function<void(EKeystate)> function_t;
|
||||
function_t function = NULL;
|
||||
std::string name;
|
||||
|
||||
// Allow remapping of F2-F12
|
||||
|
|
@ -719,13 +714,11 @@ BOOL LLViewerKeyboard::bindKey(const S32 mode, const KEY key, const MASK mask, c
|
|||
}
|
||||
|
||||
// Not remapped, look for a function
|
||||
for (i = 0; i < mNamedFunctionCount; i++)
|
||||
|
||||
function_t* result = LLKeyboardActionRegistry::getValue(function_name);
|
||||
if (result)
|
||||
{
|
||||
if (function_name == mNamedFunctions[i].mName)
|
||||
{
|
||||
function = mNamedFunctions[i].mFunction;
|
||||
name = mNamedFunctions[i].mName;
|
||||
}
|
||||
function = *result;
|
||||
}
|
||||
|
||||
if (!function)
|
||||
|
|
@ -755,7 +748,6 @@ BOOL LLViewerKeyboard::bindKey(const S32 mode, const KEY key, const MASK mask, c
|
|||
|
||||
mBindings[mode][index].mKey = key;
|
||||
mBindings[mode][index].mMask = mask;
|
||||
// mBindings[mode][index].mName = name;
|
||||
mBindings[mode][index].mFunction = function;
|
||||
|
||||
if (index == mBindingCount[mode])
|
||||
|
|
@ -764,6 +756,61 @@ BOOL LLViewerKeyboard::bindKey(const S32 mode, const KEY key, const MASK mask, c
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
LLViewerKeyboard::KeyBinding::KeyBinding()
|
||||
: key("key"),
|
||||
mask("mask"),
|
||||
command("command")
|
||||
{}
|
||||
|
||||
LLViewerKeyboard::KeyMode::KeyMode(EKeyboardMode _mode)
|
||||
: bindings("binding"),
|
||||
mode(_mode)
|
||||
{}
|
||||
|
||||
LLViewerKeyboard::Keys::Keys()
|
||||
: first_person("first_person", KeyMode(MODE_FIRST_PERSON)),
|
||||
third_person("third_person", KeyMode(MODE_THIRD_PERSON)),
|
||||
edit("edit", KeyMode(MODE_EDIT)),
|
||||
sitting("sitting", KeyMode(MODE_SITTING)),
|
||||
edit_avatar("edit_avatar", KeyMode(MODE_EDIT_AVATAR))
|
||||
{}
|
||||
|
||||
S32 LLViewerKeyboard::loadBindingsXML(const std::string& filename)
|
||||
{
|
||||
S32 binding_count = 0;
|
||||
Keys keys;
|
||||
LLSimpleXUIParser parser;
|
||||
|
||||
if (parser.readXUI(filename, keys)
|
||||
&& keys.validateBlock())
|
||||
{
|
||||
binding_count += loadBindingMode(keys.first_person);
|
||||
binding_count += loadBindingMode(keys.third_person);
|
||||
binding_count += loadBindingMode(keys.edit);
|
||||
binding_count += loadBindingMode(keys.sitting);
|
||||
binding_count += loadBindingMode(keys.edit_avatar);
|
||||
}
|
||||
return binding_count;
|
||||
}
|
||||
|
||||
S32 LLViewerKeyboard::loadBindingMode(const LLViewerKeyboard::KeyMode& keymode)
|
||||
{
|
||||
S32 binding_count = 0;
|
||||
for (LLInitParam::ParamIterator<KeyBinding>::const_iterator it = keymode.bindings.begin(),
|
||||
end_it = keymode.bindings.end();
|
||||
it != end_it;
|
||||
++it)
|
||||
{
|
||||
KEY key;
|
||||
MASK mask;
|
||||
LLKeyboard::keyFromString(it->key, &key);
|
||||
LLKeyboard::maskFromString(it->mask, &mask);
|
||||
bindKey(keymode.mode, key, mask, it->command);
|
||||
binding_count++;
|
||||
}
|
||||
|
||||
return binding_count;
|
||||
}
|
||||
|
||||
S32 LLViewerKeyboard::loadBindings(const std::string& filename)
|
||||
{
|
||||
|
|
@ -912,18 +959,18 @@ void LLViewerKeyboard::scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_lev
|
|||
if (key_down && !repeat)
|
||||
{
|
||||
// ...key went down this frame, call function
|
||||
(*binding[i].mFunction)( KEYSTATE_DOWN );
|
||||
binding[i].mFunction( KEYSTATE_DOWN );
|
||||
}
|
||||
else if (key_up)
|
||||
{
|
||||
// ...key went down this frame, call function
|
||||
(*binding[i].mFunction)( KEYSTATE_UP );
|
||||
binding[i].mFunction( KEYSTATE_UP );
|
||||
}
|
||||
else if (key_level)
|
||||
{
|
||||
// ...key held down from previous frame
|
||||
// Not windows, just call the function.
|
||||
(*binding[i].mFunction)( KEYSTATE_LEVEL );
|
||||
binding[i].mFunction( KEYSTATE_LEVEL );
|
||||
}//if
|
||||
}//if
|
||||
}//for
|
||||
|
|
|
|||
|
|
@ -55,26 +55,51 @@ typedef enum e_keyboard_mode
|
|||
|
||||
void bind_keyboard_functions();
|
||||
|
||||
|
||||
class LLViewerKeyboard
|
||||
{
|
||||
public:
|
||||
struct KeyBinding : public LLInitParam::Block<KeyBinding>
|
||||
{
|
||||
Mandatory<std::string> key,
|
||||
mask,
|
||||
command;
|
||||
|
||||
KeyBinding();
|
||||
};
|
||||
|
||||
struct KeyMode : public LLInitParam::Block<KeyMode>
|
||||
{
|
||||
Multiple<KeyBinding> bindings;
|
||||
EKeyboardMode mode;
|
||||
KeyMode(EKeyboardMode mode);
|
||||
};
|
||||
|
||||
struct Keys : public LLInitParam::Block<Keys>
|
||||
{
|
||||
Optional<KeyMode> first_person,
|
||||
third_person,
|
||||
edit,
|
||||
sitting,
|
||||
edit_avatar;
|
||||
|
||||
Keys();
|
||||
};
|
||||
|
||||
LLViewerKeyboard();
|
||||
|
||||
BOOL handleKey(KEY key, MASK mask, BOOL repeated);
|
||||
|
||||
void bindNamedFunction(const std::string& name, LLKeyFunc func);
|
||||
|
||||
S32 loadBindings(const std::string& filename); // returns number bound, 0 on error
|
||||
S32 loadBindingsXML(const std::string& filename); // returns number bound, 0 on error
|
||||
EKeyboardMode getMode();
|
||||
|
||||
BOOL modeFromString(const std::string& string, S32 *mode); // False on failure
|
||||
|
||||
void scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level);
|
||||
protected:
|
||||
|
||||
private:
|
||||
S32 loadBindingMode(const LLViewerKeyboard::KeyMode& keymode);
|
||||
BOOL bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name);
|
||||
S32 mNamedFunctionCount;
|
||||
LLNamedFunction mNamedFunctions[MAX_NAMED_FUNCTIONS];
|
||||
|
||||
// Hold all the ugly stuff torn out to make LLKeyboard non-viewer-specific here
|
||||
S32 mBindingCount[MODE_COUNT];
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
#include "llconsole.h"
|
||||
#include "lldebugview.h"
|
||||
#include "llfilepicker.h"
|
||||
//#include "llfirstuse.h"
|
||||
#include "llfirstuse.h"
|
||||
#include "llfloaterbuy.h"
|
||||
#include "llfloaterbuycontents.h"
|
||||
#include "llbuycurrencyhtml.h"
|
||||
|
|
@ -191,6 +191,8 @@ BOOL is_selection_buy_not_take();
|
|||
S32 selection_price();
|
||||
BOOL enable_take();
|
||||
void handle_take();
|
||||
void handle_object_show_inspector();
|
||||
void handle_avatar_show_inspector();
|
||||
bool confirm_take(const LLSD& notification, const LLSD& response);
|
||||
|
||||
void handle_buy_object(LLSaleInfo sale_info);
|
||||
|
|
@ -841,6 +843,35 @@ class LLAdvancedCheckFeature : public view_listener_t
|
|||
}
|
||||
};
|
||||
|
||||
void LLDestinationAndAvatarShow(const LLSD& value)
|
||||
{
|
||||
S32 panel_idx = value.isDefined() ? value.asInteger() : -1;
|
||||
LLView* container = gViewerWindow->getRootView()->getChildView("avatar_picker_and_destination_guide_container");
|
||||
LLMediaCtrl* destinations = container->findChild<LLMediaCtrl>("destination_guide_contents");
|
||||
LLMediaCtrl* avatar_picker = container->findChild<LLMediaCtrl>("avatar_picker_contents");
|
||||
|
||||
switch(panel_idx)
|
||||
{
|
||||
case 0:
|
||||
container->setVisible(true);
|
||||
destinations->setVisible(true);
|
||||
avatar_picker->setVisible(false);
|
||||
LLFirstUse::notUsingDestinationGuide(false);
|
||||
break;
|
||||
case 1:
|
||||
container->setVisible(true);
|
||||
destinations->setVisible(false);
|
||||
avatar_picker->setVisible(true);
|
||||
LLFirstUse::notUsingAvatarPicker(false);
|
||||
break;
|
||||
default:
|
||||
container->setVisible(false);
|
||||
destinations->setVisible(false);
|
||||
avatar_picker->setVisible(false);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//////////////////
|
||||
// INFO DISPLAY //
|
||||
|
|
@ -4294,6 +4325,33 @@ void handle_take()
|
|||
}
|
||||
}
|
||||
|
||||
void handle_object_show_inspector()
|
||||
{
|
||||
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
|
||||
LLViewerObject* objectp = selection->getFirstRootObject(TRUE);
|
||||
if (!objectp)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLSD params;
|
||||
params["object_id"] = objectp->getID();
|
||||
LLFloaterReg::showInstance("inspect_object", params);
|
||||
}
|
||||
|
||||
void handle_avatar_show_inspector()
|
||||
{
|
||||
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
|
||||
if(avatar)
|
||||
{
|
||||
LLSD params;
|
||||
params["avatar_id"] = avatar->getID();
|
||||
LLFloaterReg::showInstance("inspect_avatar", params);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool confirm_take(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
|
|
@ -8046,6 +8104,7 @@ void initialize_menus()
|
|||
view_listener_t::addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug");
|
||||
view_listener_t::addMenu(new LLAvatarInviteToGroup(), "Avatar.InviteToGroup");
|
||||
commit.add("Avatar.Eject", boost::bind(&handle_avatar_eject, LLSD()));
|
||||
commit.add("Avatar.ShowInspector", boost::bind(&handle_avatar_show_inspector));
|
||||
view_listener_t::addMenu(new LLAvatarSendIM(), "Avatar.SendIM");
|
||||
view_listener_t::addMenu(new LLAvatarCall(), "Avatar.Call");
|
||||
enable.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall));
|
||||
|
|
@ -8073,6 +8132,7 @@ void initialize_menus()
|
|||
commit.add("Object.Inspect", boost::bind(&handle_object_inspect));
|
||||
commit.add("Object.Open", boost::bind(&handle_object_open));
|
||||
commit.add("Object.Take", boost::bind(&handle_take));
|
||||
commit.add("Object.ShowInspector", boost::bind(&handle_object_show_inspector));
|
||||
enable.add("Object.EnableOpen", boost::bind(&enable_object_open));
|
||||
enable.add("Object.EnableTouch", boost::bind(&enable_object_touch, _1));
|
||||
enable.add("Object.EnableDelete", boost::bind(&enable_object_delete));
|
||||
|
|
@ -8132,4 +8192,6 @@ void initialize_menus()
|
|||
view_listener_t::addMenu(new LLEditableSelectedMono(), "EditableSelectedMono");
|
||||
|
||||
view_listener_t::addMenu(new LLToggleUIHints(), "ToggleUIHints");
|
||||
|
||||
commit.add("DestinationAndAvatar.show", boost::bind(&LLDestinationAndAvatarShow, _2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3347,6 +3347,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
|||
// then this info is news to us.
|
||||
void process_teleport_start(LLMessageSystem *msg, void**)
|
||||
{
|
||||
// on teleport, don't tell them about destination guide anymore
|
||||
LLFirstUse::notUsingDestinationGuide(false);
|
||||
U32 teleport_flags = 0x0;
|
||||
msg->getU32("Info", "TeleportFlags", teleport_flags);
|
||||
|
||||
|
|
@ -6686,6 +6688,8 @@ void process_initiate_download(LLMessageSystem* msg, void**)
|
|||
|
||||
void process_script_teleport_request(LLMessageSystem* msg, void**)
|
||||
{
|
||||
if (!gSavedSettings.getBOOL("ScriptsCanShowUI")) return;
|
||||
|
||||
std::string object_name;
|
||||
std::string sim_name;
|
||||
LLVector3 pos;
|
||||
|
|
|
|||
|
|
@ -117,7 +117,6 @@ void process_alert_core(const std::string& message, BOOL modal);
|
|||
typedef std::list<LLMeanCollisionData*> mean_collision_list_t;
|
||||
extern mean_collision_list_t gMeanCollisionList;
|
||||
|
||||
void handle_show_mean_events(void *);
|
||||
void process_mean_collision_alert_message(LLMessageSystem* msg, void**);
|
||||
|
||||
void process_frozen_message(LLMessageSystem* msg, void**);
|
||||
|
|
|
|||
|
|
@ -850,7 +850,7 @@ LLParcel* LLViewerParcelMgr::getCollisionParcel() const
|
|||
|
||||
void LLViewerParcelMgr::render()
|
||||
{
|
||||
if (mSelected && mRenderSelection)
|
||||
if (mSelected && mRenderSelection && gSavedSettings.getBOOL("RenderParcelSelection"))
|
||||
{
|
||||
// Rendering is done in agent-coordinates, so need to supply
|
||||
// an appropriate offset to the render code.
|
||||
|
|
@ -1784,8 +1784,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
|
|||
|
||||
void optionally_start_music(const std::string& music_url)
|
||||
{
|
||||
if (gSavedSettings.getBOOL("AudioStreamingMusic") &&
|
||||
gSavedSettings.getBOOL("AudioStreamingMedia"))
|
||||
if (gSavedSettings.getBOOL("AudioStreamingMusic"))
|
||||
{
|
||||
// only play music when you enter a new parcel if the UI control for this
|
||||
// was not *explicitly* stopped by the user. (part of SL-4878)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue