summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2009-11-18 20:52:53 +0800
committerangela <angela@lindenlab.com>2009-11-18 20:52:53 +0800
commita35fbddb910fa0dd068622c3dc64af1b27ca19b7 (patch)
tree691c23b2ec764eea9cd1677c1b701979ccf27241
parentacc53aa2f7a3fd939a207674a3bdf96d6e649f90 (diff)
EXT-2094
-rw-r--r--indra/llcommon/llclickaction.h6
-rw-r--r--indra/lscript/lscript_compile/indra.l1
-rw-r--r--indra/newview/app_settings/keywords.ini1
-rw-r--r--indra/newview/lltoolpie.cpp12
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml4
5 files changed, 22 insertions, 2 deletions
diff --git a/indra/llcommon/llclickaction.h b/indra/llcommon/llclickaction.h
index 8048724575..29c4df8df2 100644
--- a/indra/llcommon/llclickaction.h
+++ b/indra/llcommon/llclickaction.h
@@ -40,7 +40,9 @@ const U8 CLICK_ACTION_SIT = 1;
const U8 CLICK_ACTION_BUY = 2;
const U8 CLICK_ACTION_PAY = 3;
const U8 CLICK_ACTION_OPEN = 4;
-const U8 CLICK_ACTION_PLAY = 5;
-const U8 CLICK_ACTION_OPEN_MEDIA = 6;
+const U8 CLICK_ACTION_ZOOM = 5;
+const U8 CLICK_ACTION_PLAY = 6;
+const U8 CLICK_ACTION_OPEN_MEDIA = 7;
+
#endif
diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l
index 8c891b3e8f..e650c71bea 100644
--- a/indra/lscript/lscript_compile/indra.l
+++ b/indra/lscript/lscript_compile/indra.l
@@ -611,6 +611,7 @@ extern "C" { int yyerror(const char *fmt, ...); }
"CLICK_ACTION_BUY" { count(); yylval.ival = CLICK_ACTION_BUY; return(INTEGER_CONSTANT); }
"CLICK_ACTION_PAY" { count(); yylval.ival = CLICK_ACTION_PAY; return(INTEGER_CONSTANT); }
"CLICK_ACTION_OPEN" { count(); yylval.ival = CLICK_ACTION_OPEN; return(INTEGER_CONSTANT); }
+"CLICK_ACTION_ZOOM" { count(); yylval.ival = CLICK_ACTION_ZOOM; return(INTEGER_CONSTANT); }
"CLICK_ACTION_PLAY" { count(); yylval.ival = CLICK_ACTION_PLAY; return(INTEGER_CONSTANT); }
"CLICK_ACTION_OPEN_MEDIA" { count(); yylval.ival = CLICK_ACTION_OPEN_MEDIA; return(INTEGER_CONSTANT); }
diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini
index 5f6fd6e4a7..71ea12bacd 100644
--- a/indra/newview/app_settings/keywords.ini
+++ b/indra/newview/app_settings/keywords.ini
@@ -508,6 +508,7 @@ CLICK_ACTION_SIT Used with llSetClickAction to set sit as the default act
CLICK_ACTION_BUY Used with llSetClickAction to set buy as the default action when object is clicked
CLICK_ACTION_PAY Used with llSetClickAction to set pay as the default action when object is clicked
CLICK_ACTION_OPEN Used with llSetClickAction to set open as the default action when object is clicked
+CLICK_ACTION_ZOOM Used with llSetClickAction to set zoom in as the default action when object is clicked
CLICK_ACTION_PLAY Used with llSetClickAction to set play as the default action when object is clicked
CLICK_ACTION_OPEN_MEDIA Used with llSetClickAction to set open-media as the default action when object is clicked
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 9c8fca3552..d0350507ed 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -209,6 +209,7 @@ BOOL LLToolPie::pickLeftMouseDownCallback()
// touch behavior down below...
break;
case CLICK_ACTION_SIT:
+
if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->isSitting())) // agent not already sitting
{
handle_object_sit_or_stand();
@@ -253,6 +254,11 @@ BOOL LLToolPie::pickLeftMouseDownCallback()
}
}
return TRUE;
+ case CLICK_ACTION_ZOOM:
+ gAgent.setFocusOnAvatar(FALSE, FALSE);
+ gAgent.setFocusGlobal(mPick);
+ gAgent.setCameraZoomFraction(0.9);
+ return TRUE;
case CLICK_ACTION_PLAY:
handle_click_action_play();
return TRUE;
@@ -413,6 +419,9 @@ ECursorType cursor_from_object(LLViewerObject* object)
cursor = UI_CURSOR_HAND;
}
break;
+ case CLICK_ACTION_ZOOM:
+ cursor = UI_CURSOR_TOOLZOOMIN;
+ break;
case CLICK_ACTION_PLAY:
case CLICK_ACTION_OPEN_MEDIA:
cursor = cursor_from_parcel_media(click_action);
@@ -551,6 +560,9 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
case CLICK_ACTION_BUY:
case CLICK_ACTION_PAY:
case CLICK_ACTION_OPEN:
+ case CLICK_ACTION_ZOOM:
+ case CLICK_ACTION_PLAY:
+ case CLICK_ACTION_OPEN_MEDIA:
// Because these actions open UI dialogs, we won't change
// the cursor again until the next hover and GL pick over
// the world. Keep the cursor an arrow, assuming that
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 944b4cda98..59964ef39f 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -983,6 +983,10 @@
label="Open"
name="Open"
value="Open" />
+ <combo_box.item
+ label="Zoom"
+ name="Zoom"
+ value="Zoom" />
</combo_box>
<check_box
height="16"