diff options
Diffstat (limited to 'linden/indra/newview/llgesturemgr.cpp')
-rw-r--r-- | linden/indra/newview/llgesturemgr.cpp | 202 |
1 files changed, 202 insertions, 0 deletions
diff --git a/linden/indra/newview/llgesturemgr.cpp b/linden/indra/newview/llgesturemgr.cpp index 2203452..bb678d7 100644 --- a/linden/indra/newview/llgesturemgr.cpp +++ b/linden/indra/newview/llgesturemgr.cpp | |||
@@ -58,6 +58,7 @@ | |||
58 | #include "llpreviewtexture.h" | 58 | #include "llpreviewtexture.h" |
59 | #include "llviewermessage.h" | 59 | #include "llviewermessage.h" |
60 | #include "llvoavatar.h" | 60 | #include "llvoavatar.h" |
61 | #include "llviewercontrol.h" | ||
61 | #include "llviewerimagelist.h" | 62 | #include "llviewerimagelist.h" |
62 | #include "llviewerstats.h" | 63 | #include "llviewerstats.h" |
63 | #include "llweb.h" | 64 | #include "llweb.h" |
@@ -602,6 +603,207 @@ BOOL LLGestureManager::triggerAndReviseString(const std::string &utf8str, std::s | |||
602 | LLWeb::loadURLInternal("http://failbook.failblog.org/"); | 603 | LLWeb::loadURLInternal("http://failbook.failblog.org/"); |
603 | return TRUE; | 604 | return TRUE; |
604 | } | 605 | } |
606 | else if (LLStringUtil::compareInsensitive("/icanhaszombie", cur_token) == 0 || | ||
607 | LLStringUtil::compareInsensitive("/icanhaszombies", cur_token) == 0) | ||
608 | { | ||
609 | LLViewerImage* kitteh = gImageList.getImageFromFile("zombiecat.png", TRUE, TRUE); | ||
610 | if (kitteh) | ||
611 | { | ||
612 | S32 left, top; | ||
613 | gFloaterView->getNewFloaterPosition(&left, &top); | ||
614 | LLRect rect = gSavedSettings.getRect("PreviewTextureRect"); | ||
615 | rect.translate(left - rect.mLeft, top - rect.mTop); | ||
616 | |||
617 | LLPreviewTexture* preview; | ||
618 | preview = new LLPreviewTexture(rect, "Zombiecat!", kitteh); | ||
619 | preview->setSourceID(LLUUID::generateNewID()); | ||
620 | preview->setFocus(TRUE); | ||
621 | preview->center(); | ||
622 | gFloaterView->adjustToFitScreen(preview, FALSE); | ||
623 | } | ||
624 | return TRUE; | ||
625 | } | ||
626 | else if (LLStringUtil::compareInsensitive("/icanhassupport", cur_token) == 0 || | ||
627 | LLStringUtil::compareInsensitive("/icanhashelp", cur_token) == 0 || | ||
628 | LLStringUtil::compareInsensitive("/icanhashalp", cur_token) == 0) | ||
629 | { | ||
630 | LLWeb::loadURLInternal("http://support.imprudenceviewer.org/"); | ||
631 | return TRUE; | ||
632 | } | ||
633 | else if (LLStringUtil::compareInsensitive("/icanhasblog", cur_token) == 0) | ||
634 | { | ||
635 | LLWeb::loadURLInternal("http://www.imprudenceviewer.org/"); | ||
636 | return TRUE; | ||
637 | } | ||
638 | else if (LLStringUtil::compareInsensitive("/icanhascodie", cur_token) == 0) | ||
639 | { | ||
640 | LLChat chat; | ||
641 | chat.mText = "All work and no play makes Codie a dull girl. All work and no play..."; | ||
642 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
643 | LLFloaterChat::addChat(chat); | ||
644 | if (revised_string) | ||
645 | { | ||
646 | revised_string->assign(LLStringUtil::null); | ||
647 | } | ||
648 | return TRUE; | ||
649 | } | ||
650 | else if (LLStringUtil::compareInsensitive("/icanhasfail", cur_token) == 0) | ||
651 | { | ||
652 | LLWeb::loadURLInternal("http://www.failblog.org/"); | ||
653 | return TRUE; | ||
654 | } | ||
655 | else if (LLStringUtil::compareInsensitive("/icanhasdownload", cur_token) == 0 || | ||
656 | LLStringUtil::compareInsensitive("/icanhasdownloads", cur_token) == 0 || | ||
657 | LLStringUtil::compareInsensitive("/icanhasupdate", cur_token) == 0 || | ||
658 | LLStringUtil::compareInsensitive("/icanhasupdates", cur_token) == 0 ) | ||
659 | { | ||
660 | LLWeb::loadURLInternal("http://imprudenceviewer.org/wiki/Downloads"); | ||
661 | return TRUE; | ||
662 | } | ||
663 | else if (LLStringUtil::compareInsensitive("/icanhasfeatures", cur_token) == 0) | ||
664 | { | ||
665 | LLWeb::loadURLInternal("http://imprudenceviewer.org/wiki/Features"); | ||
666 | return TRUE; | ||
667 | } | ||
668 | else if (LLStringUtil::compareInsensitive("/icanhaswiki", cur_token) == 0) | ||
669 | { | ||
670 | LLWeb::loadURLInternal("http://imprudenceviewer.org/wiki/"); | ||
671 | return TRUE; | ||
672 | } | ||
673 | else if (LLStringUtil::compareInsensitive("/icanhasbugs", cur_token) == 0 || | ||
674 | LLStringUtil::compareInsensitive("/icanhasbug", cur_token) == 0 ) | ||
675 | { | ||
676 | LLWeb::loadURLInternal("http://redmine.imprudenceviewer.org/"); | ||
677 | return TRUE; | ||
678 | } | ||
679 | else if (LLStringUtil::compareInsensitive("/icanhasgit", cur_token) == 0) | ||
680 | { | ||
681 | LLWeb::loadURLInternal("http://github.com/imprudence/imprudence/"); | ||
682 | return TRUE; | ||
683 | } | ||
684 | else if (LLStringUtil::compareInsensitive("/icanhasplurk", cur_token) == 0) | ||
685 | { | ||
686 | LLWeb::loadURLInternal("http://plurk.com/imprudence"); | ||
687 | return TRUE; | ||
688 | } | ||
689 | else if (LLStringUtil::compareInsensitive("/icanhastwitter", cur_token) == 0) | ||
690 | { | ||
691 | LLWeb::loadURLInternal("http://twitter.com/ImpViewer"); | ||
692 | return TRUE; | ||
693 | } | ||
694 | |||
695 | |||
696 | else if (LLStringUtil::compareInsensitive("/icanhasimprudence", cur_token) == 0) | ||
697 | { | ||
698 | LLChat chat; | ||
699 | chat.mText = "You are using it right now, silly!..."; | ||
700 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
701 | LLFloaterChat::addChat(chat); | ||
702 | if (revised_string) | ||
703 | { | ||
704 | revised_string->assign(LLStringUtil::null); | ||
705 | } | ||
706 | return TRUE; | ||
707 | } | ||
708 | else if (LLStringUtil::compareInsensitive("/icanhasnoms", cur_token) == 0 || | ||
709 | LLStringUtil::compareInsensitive("/icanhasnom", cur_token) == 0) | ||
710 | { | ||
711 | LLViewerImage* kitteh = gImageList.getImageFromFile("nomnom.png", TRUE, TRUE); | ||
712 | if (kitteh) | ||
713 | { | ||
714 | S32 left, top; | ||
715 | gFloaterView->getNewFloaterPosition(&left, &top); | ||
716 | LLRect rect = gSavedSettings.getRect("PreviewTextureRect"); | ||
717 | rect.translate(left - rect.mLeft, top - rect.mTop); | ||
718 | |||
719 | LLPreviewTexture* preview; | ||
720 | preview = new LLPreviewTexture(rect, "Om nom nom!", kitteh); | ||
721 | preview->setSourceID(LLUUID::generateNewID()); | ||
722 | preview->setFocus(TRUE); | ||
723 | preview->center(); | ||
724 | gFloaterView->adjustToFitScreen(preview, FALSE); | ||
725 | } | ||
726 | return TRUE; | ||
727 | } | ||
728 | else if (LLStringUtil::compareInsensitive("/icanhasceilingcat", cur_token) == 0 || | ||
729 | LLStringUtil::compareInsensitive("/icanhascielingcat", cur_token) == 0) | ||
730 | { | ||
731 | LLViewerImage* kitteh = gImageList.getImageFromFile("ceilingcat.png", TRUE, TRUE); | ||
732 | if (kitteh) | ||
733 | { | ||
734 | S32 left, top; | ||
735 | gFloaterView->getNewFloaterPosition(&left, &top); | ||
736 | LLRect rect = gSavedSettings.getRect("PreviewTextureRect"); | ||
737 | rect.translate(left - rect.mLeft, top - rect.mTop); | ||
738 | |||
739 | LLPreviewTexture* preview; | ||
740 | preview = new LLPreviewTexture(rect, "Ceiling Cat is watching you!", kitteh); | ||
741 | preview->setSourceID(LLUUID::generateNewID()); | ||
742 | preview->setFocus(TRUE); | ||
743 | preview->center(); | ||
744 | gFloaterView->adjustToFitScreen(preview, FALSE); | ||
745 | } | ||
746 | return TRUE; | ||
747 | } | ||
748 | else if (LLStringUtil::compareInsensitive("/icanhascake", cur_token) == 0 ) | ||
749 | { | ||
750 | LLViewerImage* kitteh = gImageList.getImageFromFile("cakeisalie.png", TRUE, TRUE); | ||
751 | if (kitteh) | ||
752 | { | ||
753 | S32 left, top; | ||
754 | gFloaterView->getNewFloaterPosition(&left, &top); | ||
755 | LLRect rect = gSavedSettings.getRect("PreviewTextureRect"); | ||
756 | rect.translate(left - rect.mLeft, top - rect.mTop); | ||
757 | |||
758 | LLPreviewTexture* preview; | ||
759 | preview = new LLPreviewTexture(rect, "THE CAKE IS A LIE!", kitteh); | ||
760 | preview->setSourceID(LLUUID::generateNewID()); | ||
761 | preview->setFocus(TRUE); | ||
762 | preview->center(); | ||
763 | gFloaterView->adjustToFitScreen(preview, FALSE); | ||
764 | } | ||
765 | return TRUE; | ||
766 | } | ||
767 | else if (LLStringUtil::compareInsensitive("/icanhastentacles", cur_token) == 0 ) | ||
768 | { | ||
769 | LLViewerImage* kitteh = gImageList.getImageFromFile("octopus.png", TRUE, TRUE); | ||
770 | if (kitteh) | ||
771 | { | ||
772 | S32 left, top; | ||
773 | gFloaterView->getNewFloaterPosition(&left, &top); | ||
774 | LLRect rect = gSavedSettings.getRect("PreviewTextureRect"); | ||
775 | rect.translate(left - rect.mLeft, top - rect.mTop); | ||
776 | |||
777 | LLPreviewTexture* preview; | ||
778 | preview = new LLPreviewTexture(rect, "All hail the mighty octopus!", kitteh); | ||
779 | preview->setSourceID(LLUUID::generateNewID()); | ||
780 | preview->setFocus(TRUE); | ||
781 | preview->center(); | ||
782 | gFloaterView->adjustToFitScreen(preview, FALSE); | ||
783 | } | ||
784 | return TRUE; | ||
785 | } | ||
786 | else if (LLStringUtil::compareInsensitive("/icanhashugs", cur_token) == 0 || | ||
787 | LLStringUtil::compareInsensitive("/icanhashug", cur_token) == 0) | ||
788 | { | ||
789 | LLViewerImage* kitteh = gImageList.getImageFromFile("hugs.png", TRUE, TRUE); | ||
790 | if (kitteh) | ||
791 | { | ||
792 | S32 left, top; | ||
793 | gFloaterView->getNewFloaterPosition(&left, &top); | ||
794 | LLRect rect = gSavedSettings.getRect("PreviewTextureRect"); | ||
795 | rect.translate(left - rect.mLeft, top - rect.mTop); | ||
796 | |||
797 | LLPreviewTexture* preview; | ||
798 | preview = new LLPreviewTexture(rect, "Yes, you can has hugs!", kitteh); | ||
799 | preview->setSourceID(LLUUID::generateNewID()); | ||
800 | preview->setFocus(TRUE); | ||
801 | preview->center(); | ||
802 | gFloaterView->adjustToFitScreen(preview, FALSE); | ||
803 | } | ||
804 | return TRUE; | ||
805 | } | ||
806 | |||
605 | } | 807 | } |
606 | 808 | ||
607 | if(!gesture) | 809 | if(!gesture) |