aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/panelradarentry.h
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-06-05 02:19:12 -0700
committerJacek Antonelli2010-06-19 02:43:30 -0500
commitfa004431e6dc454f1ceacace1234c39bb19f7d89 (patch)
tree51dd85d9c162284a8a3160293aae5459b72f81a2 /linden/indra/newview/panelradarentry.h
parentMake sure we only create menus once per session (diff)
downloadmeta-impy-fa004431e6dc454f1ceacace1234c39bb19f7d89.zip
meta-impy-fa004431e6dc454f1ceacace1234c39bb19f7d89.tar.gz
meta-impy-fa004431e6dc454f1ceacace1234c39bb19f7d89.tar.bz2
meta-impy-fa004431e6dc454f1ceacace1234c39bb19f7d89.tar.xz
Rewrote the radar code to fix some basic issues
i.e. avatars stuck as typing, appearing multiple times, or spamming the chat notify (also added a ban button while I was there)
Diffstat (limited to 'linden/indra/newview/panelradarentry.h')
-rw-r--r--linden/indra/newview/panelradarentry.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/linden/indra/newview/panelradarentry.h b/linden/indra/newview/panelradarentry.h
new file mode 100644
index 0000000..b54e1a6
--- /dev/null
+++ b/linden/indra/newview/panelradarentry.h
@@ -0,0 +1,83 @@
1/**
2 * @file panelradarentry.h
3 * @brief PanelRadarEntry class (container for nearby agents)
4 *
5 * Copyright (c) 2010, McCabe Maxsted
6 *
7 * The source code in this file ("Source Code") is provided to you
8 * under the terms of the GNU General Public License, version 2.0
9 * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
10 * this distribution, or online at
11 * http://secondlifegrid.net/programs/open_source/licensing/gplv2
12 *
13 * There are special exceptions to the terms and conditions of the GPL as
14 * it is applied to this Source Code. View the full text of the exception
15 * in the file doc/FLOSS-exception.txt in this software distribution, or
16 * online at
17 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
18 *
19 * By copying, modifying or distributing this software, you acknowledge
20 * that you have read and understood your obligations described above,
21 * and agree to abide by those obligations.
22 *
23 * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
24 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
25 * COMPLETENESS OR PERFORMANCE.
26 */
27
28
29#ifndef PANELRADARENTRY_H
30#define PANELRADARENTRY_H
31
32
33#include "llframetimer.h"
34
35enum RADAR_STATUS
36{
37 RADAR_STATUS_NONE,
38 RADAR_STATUS_TYPING,
39 RADAR_STATUS_EMITTING_SOUNDS,
40 RADAR_STATUS_EMITTING_PARTICLES,
41 RADAR_STATUS_FLYING,
42 RADAR_STATUS_BUSY,
43 RADAR_STATUS_AWAY
44};
45
46enum RADAR_NOTIFIED
47{
48 RADAR_NOTIFIED_NONE,
49 RADAR_NOTIFIED_SIM,
50 RADAR_NOTIFIED_CHAT
51};
52
53
54class PanelRadarEntry
55{
56public:
57 PanelRadarEntry(const LLUUID& agent_id, const std::string& agent_name, const F32& distance, const LLVector3d& position, const RADAR_STATUS& status, const RADAR_NOTIFIED& notified);
58
59 LLUUID getID() { return mID; }
60 std::string getName() { return mName; }
61 F32 getDistance() { return mDistance; }
62 LLVector3d getPosition() { return mPosition; }
63 RADAR_STATUS getStatus() { return mStatus; }
64 RADAR_NOTIFIED getNotified() { return mNotified; }
65 LLFrameTimer getStatusTimer(){ return mStatusTimer; }
66
67 void setName(const std::string& name);
68 void setDistance(const F32& distance);
69 void setPosition(const LLVector3d& position);
70 void setStatus(const RADAR_STATUS& status);
71 void setNotified(const RADAR_NOTIFIED& notified);
72
73private:
74 LLUUID mID;
75 std::string mName;
76 F32 mDistance;
77 LLVector3d mPosition;
78 RADAR_STATUS mStatus;
79 RADAR_NOTIFIED mNotified;
80 LLFrameTimer mStatusTimer;
81};
82
83#endif // PANELRADARENTRY_H