From 642acca6218595aae029ec4eabe2aa5e05190f45 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 12 Jan 2009 07:18:00 -0700 Subject: Added cheat sheet help buttons in tools window, tweaked the layout a bit --- linden/indra/newview/llpanelface.cpp | 11 ++++ linden/indra/newview/llpanelface.h | 1 + linden/indra/newview/llpanelobject.cpp | 12 ++++ linden/indra/newview/llpanelobject.h | 1 + .../newview/skins/default/xui/en-us/alerts.xml | 67 ++++++++++++++++++++++ .../skins/default/xui/en-us/floater_tools.xml | 30 ++++++---- 6 files changed, 110 insertions(+), 12 deletions(-) (limited to 'linden/indra/newview') diff --git a/linden/indra/newview/llpanelface.cpp b/linden/indra/newview/llpanelface.cpp index e9555c6..d1c34f1 100644 --- a/linden/indra/newview/llpanelface.cpp +++ b/linden/indra/newview/llpanelface.cpp @@ -61,6 +61,7 @@ #include "llviewermedia.h" #include "llviewerobject.h" #include "llviewerstats.h" +#include "llviewerwindow.h" #include "lluictrlfactory.h" // @@ -180,6 +181,7 @@ BOOL LLPanelFace::postBuild() childSetCommitCallback("TexOffsetU",LLPanelFace::onCommitTextureInfo, this); childSetCommitCallback("TexOffsetV",LLPanelFace::onCommitTextureInfo, this); childSetAction("button align",onClickAutoFix,this); + childSetAction("texture_math_constants",onClickTextureConstants,this); clearCtrls(); @@ -756,6 +758,7 @@ void LLPanelFace::getState() childSetEnabled("button apply",enabled); } } + childSetEnabled("texture_math_constants",true); // Set variable values for numeric expressions calcp->setVar(LLCalc::TEX_U_SCALE, childGetValue("TexScaleU").asReal()); @@ -799,6 +802,8 @@ void LLPanelFace::getState() childSetEnabled("button align",FALSE); childSetEnabled("button apply",FALSE); + childSetEnabled("texture_math_constants",false); + // Set variable values for numeric expressions calcp->clearVar(LLCalc::TEX_U_SCALE); calcp->clearVar(LLCalc::TEX_V_SCALE); @@ -989,3 +994,9 @@ void LLPanelFace::onClickAutoFix(void* userdata) LLPanelFaceSendFunctor sendfunc; LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc); } + +// static +void LLPanelFace::onClickTextureConstants(void *) +{ + gViewerWindow->alertXml("ClickTextureConstants"); +} \ No newline at end of file diff --git a/linden/indra/newview/llpanelface.h b/linden/indra/newview/llpanelface.h index 230772b..b977583 100644 --- a/linden/indra/newview/llpanelface.h +++ b/linden/indra/newview/llpanelface.h @@ -88,6 +88,7 @@ protected: static void onClickApply(void*); static void onClickAutoFix(void*); + static void onClickTextureConstants(void *); static F32 valueGlow(LLViewerObject* object, S32 face); }; diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp index 8efa39a..5cd8690 100644 --- a/linden/indra/newview/llpanelobject.cpp +++ b/linden/indra/newview/llpanelobject.cpp @@ -110,6 +110,9 @@ BOOL LLPanelObject::postBuild() // Top //-------------------------------------------------------- + // Build constant tipsheet + childSetAction("build_math_constants",onClickBuildConstants,this); + // Lock checkbox mCheckLock = getChild("checkbox locked"); childSetCommitCallback("checkbox locked",onCommitLock,this); @@ -369,6 +372,7 @@ void LLPanelObject::getState( ) BOOL enable_scale = objectp->permMove() && objectp->permModify(); BOOL enable_rotate = objectp->permMove() && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts")); + childSetEnabled("build_math_constants",true); LLVector3 vec; if (enable_move) { @@ -1953,6 +1957,8 @@ void LLPanelObject::clearCtrls() childSetEnabled( "advanced_cut", FALSE ); childSetEnabled( "advanced_dimple", FALSE ); childSetVisible("advanced_slice", FALSE); + + childSetEnabled("build_math_constants",false); } // @@ -2091,3 +2097,9 @@ void LLPanelObject::onCommitSculptType(LLUICtrl *ctrl, void* userdata) self->sendSculpt(); } + +// static +void LLPanelObject::onClickBuildConstants(void *) +{ + gViewerWindow->alertXml("ClickBuildConstants"); +} diff --git a/linden/indra/newview/llpanelobject.h b/linden/indra/newview/llpanelobject.h index afdfd30..b72289c 100644 --- a/linden/indra/newview/llpanelobject.h +++ b/linden/indra/newview/llpanelobject.h @@ -83,6 +83,7 @@ public: static BOOL onDropSculpt( LLUICtrl* ctrl, LLInventoryItem* item, void* ud); static void onCommitSculptType( LLUICtrl *ctrl, void* userdata); + static void onClickBuildConstants(void *); protected: void getState(); diff --git a/linden/indra/newview/skins/default/xui/en-us/alerts.xml b/linden/indra/newview/skins/default/xui/en-us/alerts.xml index c2d4301..dc9b5ea 100644 --- a/linden/indra/newview/skins/default/xui/en-us/alerts.xml +++ b/linden/indra/newview/skins/default/xui/en-us/alerts.xml @@ -385,6 +385,73 @@ Go to the Second Life web site for more information on partnering? Cancel + + + The following constants are accepted in this tab: + + XP -- X-axis position + YP -- Y-axis position + ZP -- Z-axis position + XS -- X-axis size + YS -- Y-axis size + ZS -- Z-axis size + XR -- X-axis rotation + YR -- Y-axis rotation + ZR -- Z-axis rotation + CB -- Path cut begin + CE -- Path cut end + HLW -- Hollow size + SKW -- Skew + PB -- Slice/Dimple/Profile cut begin + PE -- Slice/Dimple/Profile cut end + XSH -- X-axis top shear + YSH -- Y-axis top shear + XHL -- X-axis hole size + YHL -- Y-axis hole size + XTP -- X-axis taper + YTP -- Y-axis taper + ROF -- Radius offset + REV -- Revolutions + + * -- Multiplication + \ -- Division + + -- Addition + - -- Subtraction + + Examples: + + * Enter 'ZP + 20' in the Z-axis position field + to move an object up 20 meters. + * Enter 'XS - YS' in the X-axis size field + to subtract the Y size from the X size. + + + + + The following constants are accepted in this tab: + + TSU -- Repeats per face (horizontal) + TSV -- Repeats per face (vertical) + TOU -- Offsets per face (horizontal) + TOV -- Offsets per face (vertical) + TRNS -- Transparency + TROT -- Texture rotation + GLOW -- Glow + + * -- Multiplication + \ -- Division + + -- Addition + - -- Subtraction + + Examples: + + * Enter 'TSU * 4' in horizantal repeats field + to increase the amount of repeats by 4x. + * Enter 'TSV' in the horizontal repeats field + to make the horizontal and vertical + repeats match. + + If this Resident has set a web profile URL then you can: diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml index 05cf101..eb9b1c6 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml @@ -587,7 +587,10 @@ mouse_opaque="true" name="edit_object" v_pad="0" width="252"> Edit object parameters: - + - - + + @@ -872,10 +875,10 @@ - + + mouse_opaque="true" name="Revolutions" width="68" label=" " label_width="10" /> + mouse_opaque="true" name="ColorTrans" width="58" /> + min_val="0" mouse_opaque="true" name="glow" width="58" /> @@ -1201,6 +1204,9 @@