summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llagent.cpp2
-rw-r--r--indra/newview/llmoveview.cpp29
-rw-r--r--indra/newview/llmoveview.h3
-rw-r--r--indra/newview/llpanelgrouproles.cpp4
-rw-r--r--indra/newview/skins/default/textures/bottomtray/Movement_Left_Off.pngbin0 -> 47887 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/Movement_Left_On.pngbin0 -> 47995 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/Movement_Right_Off.pngbin0 -> 48333 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/Movement_Right_On.pngbin0 -> 47187 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_moveview.xml146
-rw-r--r--indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml6
11 files changed, 142 insertions, 52 deletions
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<LLJoystickAgentTurn>("forward btn");
mForwardButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
mBackwardButton = getChild<LLJoystickAgentTurn>("backward btn");
mBackwardButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
+ mSlideLeftButton = getChild<LLJoystickAgentSlide>("move left btn");
+ mSlideLeftButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
+
+ mSlideRightButton = getChild<LLJoystickAgentSlide>("move right btn");
+ mSlideRightButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
+
mTurnLeftButton = getChild<LLButton>("turn left btn");
mTurnLeftButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
mTurnLeftButton->setHeldDownCallback(boost::bind(&LLFloaterMove::turnLeft, this));
@@ -125,8 +133,6 @@ BOOL LLFloaterMove::postBuild()
btn = getChild<LLButton>("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/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();
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
--- /dev/null
+++ b/indra/newview/skins/default/textures/bottomtray/Movement_Left_Off.png
Binary files 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
--- /dev/null
+++ b/indra/newview/skins/default/textures/bottomtray/Movement_Left_On.png
Binary files 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
--- /dev/null
+++ b/indra/newview/skins/default/textures/bottomtray/Movement_Right_Off.png
Binary files 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
--- /dev/null
+++ b/indra/newview/skins/default/textures/bottomtray/Movement_Right_On.png
Binary files 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
<texture name="Movement_Down_On" file_name="bottomtray/Movement_Down_On.png" preload="false" />
<texture name="Movement_Forward_Off" file_name="bottomtray/Movement_Forward_Off.png" preload="false" />
<texture name="Movement_Forward_On" file_name="bottomtray/Movement_Forward_On.png" preload="false" />
+ <texture name="Movement_Left_Off" file_name="bottomtray/Movement_Left_Off.png" preload="false" />
+ <texture name="Movement_Left_On" file_name="bottomtray/Movement_Left_On.png" preload="false" />
+ <texture name="Movement_Right_Off" file_name="bottomtray/Movement_Right_Off.png" preload="false" />
+ <texture name="Movement_Right_On" file_name="bottomtray/Movement_Right_On.png" preload="false" />
<texture name="Movement_TurnLeft_Off" file_name="bottomtray/Movement_TurnLeft_Off.png" preload="false" />
<texture name="Movement_TurnLeft_On" file_name="bottomtray/Movement_TurnLeft_On.png" preload="false" />
<texture name="Movement_TurnRight_Off" file_name="bottomtray/Movement_TurnRight_Off.png" preload="false" />
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">
<string
name="walk_forward_tooltip">
Walk Forward (press Up Arrow or W)
@@ -23,6 +23,14 @@
Walk Backwards (press Down Arrow or S)
</string>
<string
+ name="walk_left_tooltip">
+ Walk left (press Shift + Left Arrow or A)
+ </string>
+ <string
+ name="walk_right_tooltip">
+ Walk right (press Shift + Right Arrow or D)
+ </string>
+ <string
name="run_forward_tooltip">
Run Forward (press Up Arrow or W)
</string>
@@ -31,6 +39,14 @@
Run Backwards (press Down Arrow or S)
</string>
<string
+ name="run_left_tooltip">
+ Run left (press Shift + Left Arrow or A)
+ </string>
+ <string
+ name="run_right_tooltip">
+ Run right (press Shift + Right Arrow or D)
+ </string>
+ <string
name="fly_forward_tooltip">
Fly Forward (press Up Arrow or W)
</string>
@@ -39,6 +55,30 @@
Fly Backwards (press Down Arrow or S)
</string>
<string
+ name="fly_left_tooltip">
+ Fly left (press Shift + Left Arrow or A)
+ </string>
+ <string
+ name="fly_right_tooltip">
+ Fly right (press Shift + Right Arrow or D)
+ </string>
+ <string
+ name="fly_up_tooltip">
+ Fly up (press E)
+ </string>
+ <string
+ name="fly_down_tooltip">
+ Fly down (press C)
+ </string>
+ <string
+ name="jump_tooltip">
+ Jump (press E)
+ </string>
+ <string
+ name="crouch_tooltip">
+ Crouch (press C)
+ </string>
+ <string
name="walk_title">
Walk
</string>
@@ -59,59 +99,91 @@
mouse_opaque="false"
name="panel_actions"
top="0"
- width="115">
+ width="113">
+ <!-- Buttons in panel are organized in 3 columns to enable their easy vertical adjustment via top_pad-->
+ <!-- Left column -->
<button
follows="left|bottom"
- height="25"
+ height="24"
+ image_selected="Movement_Up_On"
+ image_pressed_selected="Movement_Up_On"
+ image_unselected="Movement_Up_Off"
+ layout="topleft"
+ left="23"
+ name="move up btn"
+ scale_image="false"
+ tool_tip="Fly up (press E)"
+ top="18"
+ width="24" />
+ <button
+ follows="left|bottom"
+ height="24"
image_selected="Movement_TurnLeft_On"
image_pressed_selected="Movement_TurnLeft_On"
image_unselected="Movement_TurnLeft_Off"
layout="topleft"
- left="17"
+ left="15"
name="turn left btn"
scale_image="false"
tool_tip="Turn left (press Left Arrow or A)"
- top="45"
- width="25" />
- <button
- follows="left|bottom"
- height="25"
- image_selected="Movement_TurnRight_On"
- image_pressed_selected="Movement_TurnRight_On"
- image_unselected="Movement_TurnRight_Off"
- layout="topleft"
- left_pad="34"
- name="turn right btn"
- scale_image="false"
- tool_tip="Turn right (press Right Arrow or D)"
- top_delta="0"
- width="25" />
- <button
+ top_pad="-3"
+ width="24" />
+ <joystick_slide
follows="left|bottom"
- height="25"
- image_selected="Movement_Up_On"
- image_pressed_selected="Movement_Up_On"
- image_unselected="Movement_Up_Off"
+ height="24"
+ image_selected="Movement_Left_On"
+ image_pressed_selected="Movement_Left_On"
+ image_unselected="Movement_Left_Off"
layout="topleft"
- left="10"
- name="move up btn"
+ left="18"
+ name="move left btn"
+ quadrant="left"
scale_image="false"
- tool_tip="Fly up, press E"
- top="14"
- width="25" />
+ tool_tip="Walk left (press Shift + Left Arrow or A)"
+ top_pad="-3"
+ width="24" />
+ <!-- Right column -->
<button
follows="left|bottom"
- height="25"
+ height="24"
image_selected="Movement_Down_On"
image_pressed_selected="Movement_Down_On"
image_unselected="Movement_Down_Off"
layout="topleft"
- left_pad="45"
+ right="-21"
name="move down btn"
scale_image="false"
- tool_tip="Fly down, press C"
- top_delta="0"
- width="20" />
+ tool_tip="Fly down (press C)"
+ top="18"
+ width="24" />
+ <button
+ follows="left|bottom"
+ height="24"
+ image_selected="Movement_TurnRight_On"
+ image_pressed_selected="Movement_TurnRight_On"
+ image_unselected="Movement_TurnRight_Off"
+ layout="topleft"
+ right="-13"
+ name="turn right btn"
+ scale_image="false"
+ tool_tip="Turn left (press Right Arrow or D)"
+ top_pad="-3"
+ width="24" />
+ <joystick_slide
+ follows="left|bottom"
+ height="24"
+ image_selected="Movement_Right_On"
+ image_pressed_selected="Movement_Right_On"
+ image_unselected="Movement_Right_Off"
+ layout="topleft"
+ name="move right btn"
+ quadrant="right"
+ right="-16"
+ scale_image="false"
+ tool_tip="Walk right (press Shift + Right Arrow or D)"
+ top_pad="-3"
+ width="24" />
+ <!-- Middle column -->
<joystick_turn
follows="left|bottom"
height="25"
@@ -124,7 +196,7 @@
quadrant="up"
scale_image="false"
tool_tip="Walk forward (press up arrow or W)"
- top_delta="10"
+ top="22"
width="21" />
<joystick_turn
follows="left|bottom"
@@ -138,7 +210,7 @@
quadrant="down"
scale_image="false"
tool_tip="Walk backward (press down arrow or S)"
- top_delta="30"
+ top_pad="7"
width="21" />
</panel>
<!-- Width and height of this panel should be synchronized with panel_stand_stop_flying.xml -->
@@ -149,7 +221,7 @@
left="0"
name="panel_modes"
top_pad="0"
- width="115">
+ width="113">
<button
follows="left|bottom"
height="23"
diff --git a/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml b/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml
index b48943c699..3effc9de89 100644
--- a/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml
+++ b/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml
@@ -6,7 +6,7 @@
name="panel_stand_stop_flying"
mouse_opaque="false"
visible="true"
- width="115">
+ width="113">
<button
follows="left|bottom"
height="19"
@@ -16,7 +16,7 @@
tool_tip="Click here to stand up."
top="2"
visible="false"
- width="115" />
+ width="113" />
<button
follows="left|bottom"
height="19"
@@ -26,5 +26,5 @@
tool_tip="Stop flying"
top="2"
visible="false"
- width="115" />
+ width="113" />
</panel>