diff options
author | McCabe Maxsted | 2010-03-30 22:53:55 -0700 |
---|---|---|
committer | McCabe Maxsted | 2010-03-30 22:53:55 -0700 |
commit | c55c7339ea950034d56ef61bdf34b450c28b510f (patch) | |
tree | c98ab9da656348845ef4b9ce799f69b38958f5e0 /linden/indra/newview/floaterao.h | |
parent | @nochangelog fixed line endings on /es/panel_avatar.xml (diff) | |
download | meta-impy-c55c7339ea950034d56ef61bdf34b450c28b510f.zip meta-impy-c55c7339ea950034d56ef61bdf34b450c28b510f.tar.gz meta-impy-c55c7339ea950034d56ef61bdf34b450c28b510f.tar.bz2 meta-impy-c55c7339ea950034d56ef61bdf34b450c28b510f.tar.xz |
Ported clientside AO from Emerald r1633
Diffstat (limited to 'linden/indra/newview/floaterao.h')
-rw-r--r-- | linden/indra/newview/floaterao.h | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/linden/indra/newview/floaterao.h b/linden/indra/newview/floaterao.h new file mode 100644 index 0000000..3ab06e0 --- /dev/null +++ b/linden/indra/newview/floaterao.h | |||
@@ -0,0 +1,127 @@ | |||
1 | |||
2 | #ifndef LL_LLFLOATERAO_H | ||
3 | #define LL_LLFLOATERAO_H | ||
4 | |||
5 | #include "llfloater.h" | ||
6 | #include "llviewercontrol.h" | ||
7 | #include "llagent.h" | ||
8 | |||
9 | |||
10 | class AONoteCardDropTarget; | ||
11 | |||
12 | const int STATE_AGENT_IDLE = 0; | ||
13 | const int STATE_AGENT_WALK = 1; | ||
14 | const int STATE_AGENT_RUN = 2; | ||
15 | const int STATE_AGENT_STAND = 3; | ||
16 | |||
17 | const int STATE_AGENT_PRE_JUMP = 4; | ||
18 | const int STATE_AGENT_JUMP = 5; | ||
19 | const int STATE_AGENT_TURNLEFT = 6; | ||
20 | const int STATE_AGENT_TURNRIGHT = 7; | ||
21 | |||
22 | const int STATE_AGENT_SIT = 8; | ||
23 | const int STATE_AGENT_GROUNDSIT = 9; | ||
24 | |||
25 | const int STATE_AGENT_HOVER = 10; | ||
26 | const int STATE_AGENT_HOVER_DOWN = 11; | ||
27 | const int STATE_AGENT_HOVER_UP = 12; | ||
28 | |||
29 | const int STATE_AGENT_CROUCH = 13; | ||
30 | const int STATE_AGENT_CROUCHWALK = 14; | ||
31 | const int STATE_AGENT_FALLDOWN = 15; | ||
32 | const int STATE_AGENT_STANDUP = 16; | ||
33 | const int STATE_AGENT_LAND = 17; | ||
34 | |||
35 | const int STATE_AGENT_FLY = 18; | ||
36 | const int STATE_AGENT_FLYSLOW = 19; | ||
37 | |||
38 | |||
39 | |||
40 | |||
41 | |||
42 | class AOStandTimer : public LLEventTimer | ||
43 | { | ||
44 | public: | ||
45 | AOStandTimer(); | ||
46 | ~AOStandTimer(); | ||
47 | virtual BOOL tick(); | ||
48 | virtual void reset(); | ||
49 | }; | ||
50 | |||
51 | class AOInvTimer : public LLEventTimer | ||
52 | { | ||
53 | public: | ||
54 | AOInvTimer(); | ||
55 | ~AOInvTimer(); | ||
56 | BOOL tick(); | ||
57 | }; | ||
58 | |||
59 | class LLFloaterAO : public LLFloater | ||
60 | { | ||
61 | public: | ||
62 | |||
63 | LLFloaterAO(); | ||
64 | virtual BOOL postBuild(); | ||
65 | virtual ~LLFloaterAO(); | ||
66 | |||
67 | static void show(void*); | ||
68 | static void init(); | ||
69 | |||
70 | static void onClickToggleAO(LLUICtrl *, void*); | ||
71 | static void onClickToggleSits(LLUICtrl *, void*); | ||
72 | static void run(); | ||
73 | static void updateLayout(LLFloaterAO* floater); | ||
74 | |||
75 | static BOOL loadAnims(); | ||
76 | |||
77 | static int getAnimationState(); | ||
78 | static void setAnimationState(int state); | ||
79 | static void setStates(const LLUUID& id, BOOL start); | ||
80 | |||
81 | static LLUUID getCurrentStandId(); | ||
82 | static void setCurrentStandId(const LLUUID& id); | ||
83 | static int stand_iterator; | ||
84 | static BOOL ChangeStand(); | ||
85 | |||
86 | static BOOL startMotion(const LLUUID& id, F32 time_offset = 0.f, BOOL stand = FALSE); | ||
87 | static BOOL stopMotion(const LLUUID& id, BOOL stop_immediate, BOOL stand = FALSE); | ||
88 | |||
89 | static LLUUID GetAnimID(const LLUUID& id); | ||
90 | |||
91 | static int GetStateFromAnimID(const LLUUID& id); | ||
92 | static LLUUID GetAnimIDFromState(const int state); | ||
93 | static int GetStateFromToken(std::string strtoken); | ||
94 | |||
95 | static void onClickLess(void* data) ; | ||
96 | static void onClickMore(void* data) ; | ||
97 | |||
98 | static void onClickPrevStand(void* userdata); | ||
99 | static void onClickNextStand(void* userdata); | ||
100 | static void onClickReloadCard(void* userdata); | ||
101 | static void onClickOpenCard(void* userdata); | ||
102 | |||
103 | |||
104 | static LLUUID invfolderid; | ||
105 | static const LLUUID& getAssetIDByName(const std::string& name); | ||
106 | |||
107 | private: | ||
108 | |||
109 | static LLFloaterAO* sInstance; | ||
110 | static int mAnimationState; | ||
111 | static LLUUID mCurrentStandId; | ||
112 | |||
113 | static AONoteCardDropTarget* mAOItemDropTarget; | ||
114 | static void AOItemDrop(LLViewerInventoryItem* item); | ||
115 | static void onSpinnerCommit(LLUICtrl* ctrl, void* userdata); | ||
116 | static void onComboBoxCommit(LLUICtrl* ctrl, void* userdata); | ||
117 | static BOOL SetDefault(void *userdata, LLUUID ao_id, std::string defaultanim); | ||
118 | |||
119 | BOOL mDirty; | ||
120 | |||
121 | protected: | ||
122 | |||
123 | static void onNotecardLoadComplete(LLVFS *vfs,const LLUUID& asset_uuid,LLAssetType::EType type,void* user_data, S32 status, LLExtStat ext_status); | ||
124 | |||
125 | }; | ||
126 | |||
127 | #endif \ No newline at end of file | ||