diff options
author | Jacek Antonelli | 2009-05-24 22:32:56 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-05-25 18:37:34 -0500 |
commit | f8b927f29f4adbee50ead87d26a9f0531231e540 (patch) | |
tree | 017975caf9fe5bc9cdcbc8e3cfe3e6e00837e06f | |
parent | Moved LLAgent::teleportHome() definition. (diff) | |
download | meta-impy-f8b927f29f4adbee50ead87d26a9f0531231e540.zip meta-impy-f8b927f29f4adbee50ead87d26a9f0531231e540.tar.gz meta-impy-f8b927f29f4adbee50ead87d26a9f0531231e540.tar.bz2 meta-impy-f8b927f29f4adbee50ead87d26a9f0531231e540.tar.xz |
Added Teleport Home confirmation and callback methods.
LLAgent::teleportHomeConfirm()
LLAgent::teleportHomeCallback()
-rw-r--r-- | ChangeLog.txt | 8 | ||||
-rw-r--r-- | linden/indra/newview/llagent.cpp | 15 | ||||
-rw-r--r-- | linden/indra/newview/llagent.h | 2 |
3 files changed, 25 insertions, 0 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index b26fc7e..d7048ad 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -1,6 +1,14 @@ | |||
1 | 2009-05-24 Jacek Antonelli <jacek.antonelli@gmail.com> | 1 | 2009-05-24 Jacek Antonelli <jacek.antonelli@gmail.com> |
2 | 2 | ||
3 | * linden/indra/newview/llagent.cpp: | 3 | * linden/indra/newview/llagent.cpp: |
4 | Added Teleport Home confirmation and callback methods. | ||
5 | LLAgent::teleportHomeConfirm() | ||
6 | LLAgent::teleportHomeCallback() | ||
7 | * linden/indra/newview/llagent.h: | ||
8 | Ditto. | ||
9 | |||
10 | |||
11 | * linden/indra/newview/llagent.cpp: | ||
4 | Moved LLAgent::teleportHome() definition. | 12 | Moved LLAgent::teleportHome() definition. |
5 | Was in llagent.h for no good reason, now in llagent.cpp. | 13 | Was in llagent.h for no good reason, now in llagent.cpp. |
6 | * linden/indra/newview/llagent.h: | 14 | * linden/indra/newview/llagent.h: |
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 7f6cd0c..46dc6f3 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -5932,6 +5932,21 @@ void LLAgent::teleportHome() | |||
5932 | teleportViaLandmark(LLUUID::null); | 5932 | teleportViaLandmark(LLUUID::null); |
5933 | } | 5933 | } |
5934 | 5934 | ||
5935 | void LLAgent::teleportHomeConfirm() | ||
5936 | { | ||
5937 | gViewerWindow->alertXml("ConfirmTeleportHome", LLAgent::teleportHomeCallback, (void *)this); | ||
5938 | } | ||
5939 | |||
5940 | // static | ||
5941 | void LLAgent::teleportHomeCallback(S32 option, void *userdata) | ||
5942 | { | ||
5943 | if( option == 0 ) | ||
5944 | { | ||
5945 | // They confirmed it. Here we go! | ||
5946 | ((LLAgent *) userdata)->teleportHome(); | ||
5947 | } | ||
5948 | } | ||
5949 | |||
5935 | 5950 | ||
5936 | void LLAgent::setTeleportState(ETeleportState state) | 5951 | void LLAgent::setTeleportState(ETeleportState state) |
5937 | { | 5952 | { |
diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h index bc06e92..dd204af 100644 --- a/linden/indra/newview/llagent.h +++ b/linden/indra/newview/llagent.h | |||
@@ -463,6 +463,8 @@ public: | |||
463 | 463 | ||
464 | // go home | 464 | // go home |
465 | void teleportHome(); | 465 | void teleportHome(); |
466 | void teleportHomeConfirm(); | ||
467 | static void teleportHomeCallback(S32 option, void *userdata); | ||
466 | 468 | ||
467 | // to an invited location | 469 | // to an invited location |
468 | void teleportViaLure(const LLUUID& lure_id, BOOL godlike); | 470 | void teleportViaLure(const LLUUID& lure_id, BOOL godlike); |