From 321b4a313b0b26b861252d9cdf966866e2db2fb9 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Fri, 7 May 2010 19:03:58 +0300 Subject: EXT-7106 FIX remove multiply binding for switch tab callback Reviwed by V.Savchuk at https://codereview.productengine.com/secondlife/r/361/ --HG-- branch : product-engine --- indra/newview/llpanelgrouproles.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 0c24e6ad22..a77ba0c69c 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -145,8 +145,6 @@ BOOL LLPanelGroupRoles::postBuild() llwarns << "Invalid subtab panel: " << panel->getName() << llendl; return FALSE; } - // Add click callbacks to all the tabs. - mSubTabContainer->setCommitCallback(boost::bind(&LLPanelGroupRoles::handleClickSubTab, this)); // Hand the subtab a pointer to this LLPanelGroupRoles, so that it can // look around for the widgets it is interested in. @@ -155,6 +153,8 @@ BOOL LLPanelGroupRoles::postBuild() //subtabp->addObserver(this); } + // Add click callbacks to all the tabs. + mSubTabContainer->setCommitCallback(boost::bind(&LLPanelGroupRoles::handleClickSubTab, this)); // Set the current tab to whatever is currently being shown. mCurrentTab = (LLPanelGroupTab*) mSubTabContainer->getCurrentPanel(); -- cgit v1.2.3 From 73e6407af8f802bbc4a3932bc5ac32ca8f13ab56 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Fri, 7 May 2010 22:07:01 +0300 Subject: EXT-2493 FIXED Added strafe buttons. - Added slide left and Move right buttons to movement actions panel, when inserting them in xml organized buttons in panel into 3 columns to make their position more easily configurable. - Removed hiding of fly up and down buttons. When not flying(in walk/run mode) they act as jump ans crouch. - Added movement mode(walk/run/fly) dependent tooltips for fly/jump/crouch and slide buttons. - Added comment regarding implementation of move floater buttons toggling when user moves via keyboard (because it's not quite obvious and time consuming when you first encounter it) to LLFloaterMove::postBuild(). Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/360 --HG-- branch : product-engine --- indra/newview/llagent.cpp | 2 + indra/newview/llmoveview.cpp | 29 ++-- indra/newview/llmoveview.h | 3 +- .../textures/bottomtray/Movement_Left_Off.png | Bin 0 -> 47887 bytes .../textures/bottomtray/Movement_Left_On.png | Bin 0 -> 47995 bytes .../textures/bottomtray/Movement_Right_Off.png | Bin 0 -> 48333 bytes .../textures/bottomtray/Movement_Right_On.png | Bin 0 -> 47187 bytes indra/newview/skins/default/textures/textures.xml | 4 + .../skins/default/xui/en/floater_moveview.xml | 146 +++++++++++++++------ .../default/xui/en/panel_stand_stop_flying.xml | 6 +- 10 files changed, 140 insertions(+), 50 deletions(-) create mode 100644 indra/newview/skins/default/textures/bottomtray/Movement_Left_Off.png create mode 100644 indra/newview/skins/default/textures/bottomtray/Movement_Left_On.png create mode 100644 indra/newview/skins/default/textures/bottomtray/Movement_Right_Off.png create mode 100644 indra/newview/skins/default/textures/bottomtray/Movement_Right_On.png (limited to 'indra/newview') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index ddcaeb113d..88ba5dce11 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1495,6 +1495,8 @@ void LLAgent::propagate(const F32 dt) floater_move->mBackwardButton ->setToggleState( gAgentCamera.getAtKey() < 0 || gAgentCamera.getWalkKey() < 0 ); floater_move->mTurnLeftButton ->setToggleState( gAgentCamera.getYawKey() > 0.f ); floater_move->mTurnRightButton ->setToggleState( gAgentCamera.getYawKey() < 0.f ); + floater_move->mSlideLeftButton ->setToggleState( gAgentCamera.getLeftKey() > 0.f ); + floater_move->mSlideRightButton ->setToggleState( gAgentCamera.getLeftKey() < 0.f ); floater_move->mMoveUpButton ->setToggleState( gAgentCamera.getUpKey() > 0 ); floater_move->mMoveDownButton ->setToggleState( gAgentCamera.getUpKey() < 0 ); } diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 2f22512aba..afca9daa67 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -91,12 +91,20 @@ BOOL LLFloaterMove::postBuild() LLDockableFloater::postBuild(); + // Code that implements floater buttons toggling when user moves via keyboard is located in LLAgent::propagate() + mForwardButton = getChild("forward btn"); mForwardButton->setHeldDownDelay(MOVE_BUTTON_DELAY); mBackwardButton = getChild("backward btn"); mBackwardButton->setHeldDownDelay(MOVE_BUTTON_DELAY); + mSlideLeftButton = getChild("move left btn"); + mSlideLeftButton->setHeldDownDelay(MOVE_BUTTON_DELAY); + + mSlideRightButton = getChild("move right btn"); + mSlideRightButton->setHeldDownDelay(MOVE_BUTTON_DELAY); + mTurnLeftButton = getChild("turn left btn"); mTurnLeftButton->setHeldDownDelay(MOVE_BUTTON_DELAY); mTurnLeftButton->setHeldDownCallback(boost::bind(&LLFloaterMove::turnLeft, this)); @@ -125,8 +133,6 @@ BOOL LLFloaterMove::postBuild() btn = getChild("mode_fly_btn"); btn->setCommitCallback(boost::bind(&LLFloaterMove::onFlyButtonClick, this)); - showFlyControls(false); - initModeTooltips(); initModeButtonMap(); @@ -345,33 +351,38 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode) void LLFloaterMove::updateButtonsWithMovementMode(const EMovementMode newMode) { - showFlyControls(MM_FLY == newMode); setModeTooltip(newMode); setModeButtonToggleState(newMode); setModeTitle(newMode); } -void LLFloaterMove::showFlyControls(bool bShow) -{ - mMoveUpButton->setVisible(bShow); - mMoveDownButton->setVisible(bShow); -} - void LLFloaterMove::initModeTooltips() { control_tooltip_map_t walkTipMap; walkTipMap.insert(std::make_pair(mForwardButton, getString("walk_forward_tooltip"))); walkTipMap.insert(std::make_pair(mBackwardButton, getString("walk_back_tooltip"))); + walkTipMap.insert(std::make_pair(mSlideLeftButton, getString("walk_left_tooltip"))); + walkTipMap.insert(std::make_pair(mSlideRightButton, getString("walk_right_tooltip"))); + walkTipMap.insert(std::make_pair(mMoveUpButton, getString("jump_tooltip"))); + walkTipMap.insert(std::make_pair(mMoveDownButton, getString("crouch_tooltip"))); mModeControlTooltipsMap[MM_WALK] = walkTipMap; control_tooltip_map_t runTipMap; runTipMap.insert(std::make_pair(mForwardButton, getString("run_forward_tooltip"))); runTipMap.insert(std::make_pair(mBackwardButton, getString("run_back_tooltip"))); + runTipMap.insert(std::make_pair(mSlideLeftButton, getString("run_left_tooltip"))); + runTipMap.insert(std::make_pair(mSlideRightButton, getString("run_right_tooltip"))); + runTipMap.insert(std::make_pair(mMoveUpButton, getString("jump_tooltip"))); + runTipMap.insert(std::make_pair(mMoveDownButton, getString("crouch_tooltip"))); mModeControlTooltipsMap[MM_RUN] = runTipMap; control_tooltip_map_t flyTipMap; flyTipMap.insert(std::make_pair(mForwardButton, getString("fly_forward_tooltip"))); flyTipMap.insert(std::make_pair(mBackwardButton, getString("fly_back_tooltip"))); + flyTipMap.insert(std::make_pair(mSlideLeftButton, getString("fly_left_tooltip"))); + flyTipMap.insert(std::make_pair(mSlideRightButton, getString("fly_right_tooltip"))); + flyTipMap.insert(std::make_pair(mMoveUpButton, getString("fly_up_tooltip"))); + flyTipMap.insert(std::make_pair(mMoveDownButton, getString("fly_down_tooltip"))); mModeControlTooltipsMap[MM_FLY] = flyTipMap; setModeTooltip(MM_WALK); diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index dcca8308d9..fcf643f050 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -88,7 +88,6 @@ private: void onFlyButtonClick(); void initMovementMode(); void setMovementMode(const EMovementMode mode); - void showFlyControls(bool bShow); void initModeTooltips(); void setModeTooltip(const EMovementMode mode); void setModeTitle(const EMovementMode mode); @@ -102,6 +101,8 @@ public: LLJoystickAgentTurn* mForwardButton; LLJoystickAgentTurn* mBackwardButton; + LLJoystickAgentSlide* mSlideLeftButton; + LLJoystickAgentSlide* mSlideRightButton; LLButton* mTurnLeftButton; LLButton* mTurnRightButton; LLButton* mMoveUpButton; diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Left_Off.png b/indra/newview/skins/default/textures/bottomtray/Movement_Left_Off.png new file mode 100644 index 0000000000..ded370a46f Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/Movement_Left_Off.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Left_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_Left_On.png new file mode 100644 index 0000000000..98bf415f84 Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/Movement_Left_On.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Right_Off.png b/indra/newview/skins/default/textures/bottomtray/Movement_Right_Off.png new file mode 100644 index 0000000000..2d8d55fa91 Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/Movement_Right_Off.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Right_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_Right_On.png new file mode 100644 index 0000000000..a91517d31f Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/Movement_Right_On.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index bbb82d86b1..15bac6de0d 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -241,6 +241,10 @@ with the same filename but different name + + + + diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml index 8e2c57764b..a685094190 100644 --- a/indra/newview/skins/default/xui/en/floater_moveview.xml +++ b/indra/newview/skins/default/xui/en/floater_moveview.xml @@ -13,7 +13,7 @@ save_rect="true" save_visibility="true" save_dock_state="true" - width="115"> + width="113"> Walk Forward (press Up Arrow or W) @@ -22,6 +22,14 @@ name="walk_back_tooltip"> Walk Backwards (press Down Arrow or S) + + Walk left (press Shift + Left Arrow or A) + + + Walk right (press Shift + Right Arrow or D) + Run Forward (press Up Arrow or W) @@ -30,6 +38,14 @@ name="run_back_tooltip"> Run Backwards (press Down Arrow or S) + + Run left (press Shift + Left Arrow or A) + + + Run right (press Shift + Right Arrow or D) + Fly Forward (press Up Arrow or W) @@ -38,6 +54,30 @@ name="fly_back_tooltip"> Fly Backwards (press Down Arrow or S) + + Fly left (press Shift + Left Arrow or A) + + + Fly right (press Shift + Right Arrow or D) + + + Fly up (press E) + + + Fly down (press C) + + + Jump (press E) + + + Crouch (press C) + Walk @@ -59,59 +99,91 @@ mouse_opaque="false" name="panel_actions" top="0" - width="115"> + width="113"> + +