aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpreviewscript.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-12-26 22:18:51 -0700
committerMcCabe Maxsted2009-12-26 22:18:51 -0700
commit6451ba34580e4646c5f36df0ed12c1feefcddd20 (patch)
treedab493c8219c60459cad6c568a7c09a1bd2206d2 /linden/indra/newview/llpreviewscript.cpp
parentUse Liberation-Sans font sizes (diff)
downloadmeta-impy-6451ba34580e4646c5f36df0ed12c1feefcddd20.zip
meta-impy-6451ba34580e4646c5f36df0ed12c1feefcddd20.tar.gz
meta-impy-6451ba34580e4646c5f36df0ed12c1feefcddd20.tar.bz2
meta-impy-6451ba34580e4646c5f36df0ed12c1feefcddd20.tar.xz
Added script creation resource to the script editor's help menu
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpreviewscript.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/linden/indra/newview/llpreviewscript.cpp b/linden/indra/newview/llpreviewscript.cpp
index 082b95c..ccec75b 100644
--- a/linden/indra/newview/llpreviewscript.cpp
+++ b/linden/indra/newview/llpreviewscript.cpp
@@ -446,6 +446,10 @@ void LLScriptEdCore::initMenu()
446 menuItem->setMenuCallback(onBtnSaveToDisc, this); 446 menuItem->setMenuCallback(onBtnSaveToDisc, this);
447 menuItem->setEnabledCallback(NULL); 447 menuItem->setEnabledCallback(NULL);
448 448
449 menuItem = getChild<LLMenuItemCallGL>("Launch Autoscript...");
450 menuItem->setMenuCallback(onBtnAutoscript, this);
451 menuItem->setEnabledCallback(NULL);
452
449 menuItem = getChild<LLMenuItemCallGL>("LSL Wiki Help..."); 453 menuItem = getChild<LLMenuItemCallGL>("LSL Wiki Help...");
450 menuItem->setMenuCallback(onBtnDynamicHelp, this); 454 menuItem->setMenuCallback(onBtnDynamicHelp, this);
451 menuItem->setEnabledCallback(NULL); 455 menuItem->setEnabledCallback(NULL);
@@ -676,6 +680,22 @@ bool LLScriptEdCore::onHelpWebDialog(const LLSD& notification, const LLSD& respo
676} 680}
677 681
678// static 682// static
683bool LLScriptEdCore::onHelpAutoscript(const LLSD& notification, const LLSD& response)
684{
685 S32 option = LLNotification::getSelectedOption(notification, response);
686
687 switch(option)
688 {
689 case 0:
690 LLWeb::loadURLInternal(notification["payload"]["autoscript_url"]);
691 break;
692 default:
693 break;
694 }
695 return false;
696}
697
698// static
679void LLScriptEdCore::onBtnHelp(void* userdata) 699void LLScriptEdCore::onBtnHelp(void* userdata)
680{ 700{
681 LLScriptEdCore* corep = (LLScriptEdCore*)userdata; 701 LLScriptEdCore* corep = (LLScriptEdCore*)userdata;
@@ -685,6 +705,15 @@ void LLScriptEdCore::onBtnHelp(void* userdata)
685} 705}
686 706
687// static 707// static
708void LLScriptEdCore::onBtnAutoscript(void* userdata)
709{
710 LLScriptEdCore* corep = (LLScriptEdCore*)userdata;
711 LLSD payload;
712 payload["autoscript_url"] = corep->getString("autoscript_url");
713 LLNotifications::instance().add("WebLaunchAutoscript", LLSD(), payload, onHelpAutoscript);
714}
715
716// static
688void LLScriptEdCore::onBtnDynamicHelp(void* userdata) 717void LLScriptEdCore::onBtnDynamicHelp(void* userdata)
689{ 718{
690 LLScriptEdCore* corep = (LLScriptEdCore*)userdata; 719 LLScriptEdCore* corep = (LLScriptEdCore*)userdata;