diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 0d114091b8..cd992cebad 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -20877,5 +20877,18 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1 + + FSAnimatedScriptDialogs + + Comment + Animates script dialogs V1 style. Only effective when dialogs in top right are activated. + Persist + 1 + Type + Boolean + Value + 0 + + diff --git a/indra/newview/app_settings/settings_phoenix.xml b/indra/newview/app_settings/settings_phoenix.xml index c1c463ba95..6d21e63788 100644 --- a/indra/newview/app_settings/settings_phoenix.xml +++ b/indra/newview/app_settings/settings_phoenix.xml @@ -497,5 +497,18 @@ 1 + + FSAnimatedScriptDialogs + + Comment + Animates script dialogs V1 style. Only effective when dialogs in top right are activated. + Persist + 1 + Type + Boolean + Value + 1 + + diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 08a4117a52..f51244210f 100755 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -209,7 +209,20 @@ void LLScriptFloater::createForm(const LLUUID& notification_id) // make floater size fit form size LLRect panel_rect = mScriptForm->getRect(); - toast_rect.setLeftTopAndSize(toast_rect.mLeft, toast_rect.mTop, panel_rect.getWidth(), panel_rect.getHeight() + getHeaderHeight()); + // Animated dialogs + // toast_rect.setLeftTopAndSize(toast_rect.mLeft, toast_rect.mTop, panel_rect.getWidth(), panel_rect.getHeight() + getHeaderHeight()); + mDesiredHeight=panel_rect.getHeight()+getHeaderHeight(); + if(gSavedSettings.getBOOL("FSAnimatedScriptDialogs") && gSavedSettings.getBOOL("ShowScriptDialogsTopRight")) + { + mCurrentHeight=0; + mStartTime=LLFrameTimer::getElapsedSeconds(); + } + else + { + mCurrentHeight=mDesiredHeight; + } + toast_rect.setLeftTopAndSize(toast_rect.mLeft,toast_rect.mTop,panel_rect.getWidth(),mCurrentHeight); + // setShape(toast_rect); } @@ -744,4 +757,25 @@ bool LLScriptFloater::isScriptTextbox(LLNotificationPtr notification) return false; } +// Animated dialogs +void LLScriptFloater::draw() +{ + if(mCurrentHeightmDesiredHeight) + { + mCurrentHeight=mDesiredHeight; + } + + LLRect toast_rect=getRect(); + toast_rect.setLeftTopAndSize(toast_rect.mLeft,toast_rect.mTop,toast_rect.getWidth(),mCurrentHeight); + setShape(toast_rect); + } + + LLDockableFloater::draw(); +} +// + // EOF diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index 647763d074..8d03d50e96 100755 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -211,6 +211,15 @@ private: LLUUID mObjectId; bool mSaveFloaterPosition; bool mNoTransparency; + +// Animated menus +public: + S32 mCurrentHeight; + S32 mDesiredHeight; + F64 mStartTime; + + virtual void draw(); +// }; #endif //LL_SCRIPTFLOATER_H diff --git a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml index 2bf0c7e4db..d76f1193f3 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml @@ -384,12 +384,25 @@ tool_tip="Set this to move script dialog notifications to the top right corner of the screen (Classic V1.x behavior)." top_pad="2" width="256" /> +