From 87c6a2964325f7771cf03f6f7e82253a132c0e6d Mon Sep 17 00:00:00 2001 From: angela Date: Fri, 4 Dec 2009 20:01:09 +0800 Subject: EXT-2956 Animation preview floater play/pause buttons are hard-coded --- indra/newview/llfloateranimpreview.cpp | 84 ++++++++++++++++------ indra/newview/llfloateranimpreview.h | 2 + .../default/xui/en/floater_animation_preview.xml | 35 ++++++--- 3 files changed, 90 insertions(+), 31 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp index eae2747cc9..9e6ef2fc4d 100644 --- a/indra/newview/llfloateranimpreview.cpp +++ b/indra/newview/llfloateranimpreview.cpp @@ -208,7 +208,12 @@ BOOL LLFloaterAnimPreview::postBuild() mPlayButton = getChild( "play_btn"); mPlayButton->setClickedCallback(onBtnPlay, this); + mPlayButton->setVisible(true); + mPauseButton = getChild( "pause_btn"); + mPauseButton->setClickedCallback(onBtnPause, this); + mPauseButton->setVisible(false); + mStopButton = getChild( "stop_btn"); mStopButton->setClickedCallback(onBtnStop, this); @@ -560,24 +565,60 @@ void LLFloaterAnimPreview::onBtnPlay(void* user_data) if (previewp->mMotionID.notNull() && previewp->mAnimPreview) { LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); - + if(!avatarp->isMotionActive(previewp->mMotionID)) { previewp->resetMotion(); previewp->mPauseRequest = NULL; + previewp->mPauseButton->setVisible(TRUE); + previewp->mPauseButton->setEnabled(TRUE); + previewp->mPlayButton->setVisible(FALSE); + previewp->mPlayButton->setEnabled(FALSE); } - else + else if (avatarp->areAnimationsPaused()) { - if (avatarp->areAnimationsPaused()) - { - previewp->mPauseRequest = NULL; - } - else + + previewp->mPauseRequest = NULL; + previewp->mPauseButton->setVisible(TRUE); + previewp->mPauseButton->setEnabled(TRUE); + previewp->mPlayButton->setVisible(FALSE); + previewp->mPlayButton->setEnabled(FALSE); + } + + } + + + +} + +//----------------------------------------------------------------------------- +// onBtnPause() +//----------------------------------------------------------------------------- +void LLFloaterAnimPreview::onBtnPause(void* user_data) +{ + LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data; + if (!previewp->getEnabled()) + return; + + if (previewp->mMotionID.notNull() && previewp->mAnimPreview) + { + LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); + + if(avatarp->isMotionActive(previewp->mMotionID)) + { + if (!avatarp->areAnimationsPaused()) { previewp->mPauseRequest = avatarp->requestPause(); + + previewp->mPlayButton->setVisible(TRUE); + previewp->mPlayButton->setEnabled(TRUE); + previewp->mPauseButton->setVisible(FALSE); + previewp->mPauseButton->setEnabled(FALSE); } } } + + } //----------------------------------------------------------------------------- @@ -595,6 +636,10 @@ void LLFloaterAnimPreview::onBtnStop(void* user_data) previewp->resetMotion(); previewp->mPauseRequest = avatarp->requestPause(); } + previewp->mPlayButton->setVisible(TRUE); + previewp->mPlayButton->setEnabled(TRUE); + previewp->mPauseButton->setVisible(FALSE); + previewp->mPauseButton->setEnabled(FALSE); } //----------------------------------------------------------------------------- @@ -912,43 +957,38 @@ void LLFloaterAnimPreview::refresh() { childShow("bad_animation_text"); mPlayButton->setEnabled(FALSE); + mPlayButton->setVisible(TRUE); + mPauseButton->setVisible(FALSE); mStopButton->setEnabled(FALSE); childDisable("ok_btn"); } else { childHide("bad_animation_text"); - mPlayButton->setEnabled(TRUE); LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); if (avatarp->isMotionActive(mMotionID)) { mStopButton->setEnabled(TRUE); LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(mMotionID); - if (avatarp->areAnimationsPaused()) - { - - mPlayButton->setImages(std::string("button_anim_play.tga"), - std::string("button_anim_play_selected.tga")); - - } - else + if (!avatarp->areAnimationsPaused()) { if (motionp) { F32 fraction_complete = motionp->getLastUpdateTime() / motionp->getDuration(); childSetValue("playback_slider", fraction_complete); } - mPlayButton->setImages(std::string("button_anim_pause.tga"), - std::string("button_anim_pause_selected.tga")); - + + mPlayButton->setVisible(FALSE); + mPauseButton->setVisible(TRUE); + } + } else { mPauseRequest = avatarp->requestPause(); - mPlayButton->setImages(std::string("button_anim_play.tga"), - std::string("button_anim_play_selected.tga")); - + //mPlayButton->setVisible(TRUE); + //mPlayButton->setEnabled(TRUE); mStopButton->setEnabled(TRUE); // stop also resets, leave enabled. } childEnable("ok_btn"); diff --git a/indra/newview/llfloateranimpreview.h b/indra/newview/llfloateranimpreview.h index f1c4a6b0d0..09b04f1f42 100644 --- a/indra/newview/llfloateranimpreview.h +++ b/indra/newview/llfloateranimpreview.h @@ -87,6 +87,7 @@ public: void refresh(); static void onBtnPlay(void*); + static void onBtnPause(void*); static void onBtnStop(void*); static void onSliderMove(LLUICtrl*, void*); static void onCommitBaseAnim(LLUICtrl*, void*); @@ -119,6 +120,7 @@ protected: S32 mLastMouseX; S32 mLastMouseY; LLButton* mPlayButton; + LLButton* mPauseButton; LLButton* mStopButton; LLRect mPreviewRect; LLRectf mPreviewImageRect; diff --git a/indra/newview/skins/default/xui/en/floater_animation_preview.xml b/indra/newview/skins/default/xui/en/floater_animation_preview.xml index a8f875754e..4f4288b654 100644 --- a/indra/newview/skins/default/xui/en/floater_animation_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_animation_preview.xml @@ -456,26 +456,43 @@ Maximum animation length is [MAX_LENGTH] seconds. image_overlay="Play_Over" image_unselected="SegmentedBtn_Left_Off" image_selected="SegmentedBtn_Left_On_Selected" - image_disabled_selected="SegmentedBtn_Left_Selected_Disabled" - image_disabled="SegmentedBtn_Left_Disabled" - image_pressed="SegmentedBtn_Left_Press" - image_pressed_selected="SegmentedBtn_Left_Selected_Press" + image_disabled_selected="SegmentedBtn_Left_Selected_Disabled" + image_disabled="SegmentedBtn_Left_Disabled" + image_pressed="SegmentedBtn_Left_Press" + image_pressed_selected="SegmentedBtn_Left_Selected_Press" layout="topleft" left="10" name="play_btn" - tool_tip="Play/pause your animation" + tool_tip="Play your animation" top_pad="0" width="23" /> + - - -- cgit v1.2.3 From 6e50ea94d2aae2653d5de3e4e160a2c4c0557f3b Mon Sep 17 00:00:00 2001 From: Ramzi Linden Date: Fri, 4 Dec 2009 14:02:14 -0800 Subject: L10N: use better, consistent language in a preference about IMs. --- indra/newview/skins/default/xui/en/panel_preferences_chat.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index 3aa5d3fae4..fff53c1de2 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -332,7 +332,7 @@ control_name="ChatWindow" name="chat_window" top_pad="10" - tool_tip="Show chat in multiple windows(by default) or in one multi-tabbed window (requires restart)" + tool_tip="Show your Instant Messages in separate windows, or in one window with many tabs (Requires restart)" width="331"> Date: Fri, 4 Dec 2009 14:05:30 -0800 Subject: L10N: fix a typo. Use natural, consistent language in tool_tips about Picks. --- indra/newview/skins/default/xui/en/panel_picks.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml index 52bc72fe86..4facedc7ea 100644 --- a/indra/newview/skins/default/xui/en/panel_picks.xml +++ b/indra/newview/skins/default/xui/en/panel_picks.xml @@ -106,7 +106,7 @@ layout="topleft" left_pad="15" name="new_btn" - tool_tip="Create new pick or classified at current location" + tool_tip="Create a new pick or classified at the current location" top="5" width="18" /> + - diff --git a/indra/newview/skins/default/xui/en/inspect_remote_object.xml b/indra/newview/skins/default/xui/en/inspect_remote_object.xml index b5f2abf52a..ef3dd844cd 100644 --- a/indra/newview/skins/default/xui/en/inspect_remote_object.xml +++ b/indra/newview/skins/default/xui/en/inspect_remote_object.xml @@ -6,10 +6,10 @@ - Test Object Name That Is Really Long + word_wrap="true" + width="291"> + Test Object Name That Is Really Long OMG so long I can't believe how long the name of this object is, I mean really. + top_pad="12"> Owner: Longavatarname Johnsonlongstonnammer - Location: - + --> http://slurl.com/Ahern/50/50/50