OROCHI
 
Loading...
Searching...
No Matches
GxToolPathSet.h
Go to the documentation of this file.
1//===========================================================================
9//===========================================================================
10#pragma once
11
12#if GX_EDITOR
13
14GX_CHARACTER_NAMESPACE_BEGIN()
15
16//===========================================================================
18//===========================================================================
19class GxToolPathSet : public GxToolResourceEditBase
20{
21 //-----------------------------------------------------------
23 //-----------------------------------------------------------
25public:
26 // RTTI定義
27 GX_RTTI_CLASS_NAME_ICON(GxToolPathSet, GxToolResourceEditBase, "経路編集", GxRtti::ICON_TYPE::CHARACTER)
28 // ClassBaseReference継承クラス用禁止宣言
30
31 // クラス定義
32 class GxGuiArea;
33 class GxGuiNode;
34 class GxGuiConnect;
35 class GxGuiRoute;
36 class GxGuiPadControlParameter;
37
39 enum
40 {
41 TAB_NODE = 0,
42 TAB_ROUTE,
43 TAB_PADSETTING,
44 };
45
47 static constexpr u32 BUTTON_SET_NODE = GxPad::RIGHT_1;
49 static constexpr u32 BUTTON_DELETE_NODE = GxPad::LEFT_1;
51 static constexpr u32 BUTTON_HOLD_NODE = GxPad::RIGHT_2;
53 static constexpr u32 BUTTON_CONNECT_NODE = GxPad::LEFT_2;
54
55private:
57 struct GxPadControlSetting : public GxStructBase
58 {
59 //-----------------------------------------------------------
61 //-----------------------------------------------------------
63 public:
64 // RTTI宣言
65 GX_RTTI_STRUCT( GxPadControlSetting );
66
68 //-----------------------------------------------------------
70 //-----------------------------------------------------------
72
74 GxPadControlSetting(void);
76 void reset( void );
77
79 //-----------------------------------------------------------
81 //-----------------------------------------------------------
83 public:
84 b32 _enablePadControl;
85 b32 _enablePadAssignDraw;
86 f32 _radiusNodeFocus;
87 f32 _drawRadiusNodeSelect;
88
90 };
91
93 //-----------------------------------------------------------
95 //-----------------------------------------------------------
97public:
99 GxToolPathSet(void);
101 GxToolPathSet(GxResBase* pResource);
103 void setResource(GxResBase* pResource) override;
105 b32 initialize( void ) override;
106
108 //-----------------------------------------------------------
110 //-----------------------------------------------------------
112
114 void update(void) override;
115
117 virtual void updatePadControl( void );
118
120 virtual void checkMouseEvent( void );
121
123 void addMenuOwnProperty( GxPropertyTable& table ) override;
124
126 void getPropertyInteractiveConnect( const void* pValue ) { *static_cast<b32*>(const_cast<void*>(pValue)) = _isInteractiveConnect; }
128 void setPropertyInteractiveConnect( const void* pValue ) { _isInteractiveConnect = *static_cast<b32*>(const_cast<void*>(pValue)); }
129
130private:
132 void addArea(void);
134 void eraseArea(void* pArea);
136 void addNode(void);
138 void eraseNode(void* pNode);
140 void addConnect(void);
142 void eraseConnect(void* pConnect);
144 void addRoute(void);
146 void eraseRoute(void* pRoute);
147
149 void addNodeFromPadControl(void);
150
152 void addConnect(GxResPathSetXml::GxEditArea::GxEditNode* pNodeFrom, GxResPathSetXml::GxEditArea::GxEditNode* pNodeTo);
153
154protected:
156 virtual GxUnitCharacterBase* getPadControlUnit(void);
157
159 //-----------------------------------------------------------
161 //-----------------------------------------------------------
163public:
165 constexpr GxResPathSetXml* getResource(void) const { return static_cast<GxResPathSetXml*>(Super::getResource()); }
166private:
168 void setAreaTable(void);
170 void setNodeTable(GxResPathSetXml::GxEditArea* pArea);
172 void setConnectTable(GxResPathSetXml::GxEditArea::GxEditNode* pNode);
174 void setRouteTable(GxResPathSetXml::GxEditArea* pArea);
176 void setRouteNodeTable(GxResPathSetXml::GxEditArea::GxEditRoute* pRoute);
177
179 //-----------------------------------------------------------
181 //-----------------------------------------------------------
183private:
184 GxResPathSetXml::GxEditArea* _pSelectArea;
185 GxResPathSetXml::GxEditArea::GxEditNode* _pSelectNode;
186 GxResPathSetXml::GxEditArea::GxEditRoute* _pSelectRoute;
187 GxResPathSetXml::GxEditArea::GxEditNode* _pNodeHandle;
188
189 GxGuiArea* _pAreaTable;
190 GxGuiNode* _pNodeTable;
191 GxGuiConnect* _pConnectTable;
192 GxGuiRoute* _pRouteTable;
193 GxGuiFormProperty* _pRouteNodeProperty;
194 GxGuiSplitter* _pSplitter0;
195 GxGuiSplitter* _pSplitter1;
196 GxGuiSplitter* _pSplitter2;
197 GxGuiTab* _pTab;
198
199 GxPadControlSetting _padSetting;
200 b32 _isInteractiveConnect;
201
203};
204
205//===========================================================================
207//===========================================================================
208class GxToolPathSet::GxGuiArea : public GxGuiPropertyTable
209{
210 //-----------------------------------------------------------
212 //-----------------------------------------------------------
214public:
215 // RTTI定義
216 GX_RTTI_CLASS(GxGuiArea, GxGuiPropertyTable)
217 // GxGuiPropertyTable継承クラス用禁止宣言
219
220
221 //-----------------------------------------------------------
223 //-----------------------------------------------------------
225private:
227 GxGuiArea(void) : _pOwner(nullptr){}
228public:
230 GxGuiArea(const GxProperty& property, GxTypedObject* pObject, GxToolPathSet* pOwner);
231
233 //-----------------------------------------------------------
235 //-----------------------------------------------------------
237
239 void onClick(const GxPoint2& position, u32 button) override;
241 void createPopupMenu(const GxPoint2& position);
243 void eventPopupAdd(void);
245 void eventPopupDelete(void* pObject);
246
248 //-----------------------------------------------------------
250 //-----------------------------------------------------------
252private:
253 GxToolPathSet* _pOwner;
254
256};
257
258//===========================================================================
260//===========================================================================
261class GxToolPathSet::GxGuiNode : public GxGuiPropertyTable
262{
263 //-----------------------------------------------------------
265 //-----------------------------------------------------------
267public:
268 // RTTI定義
269 GX_RTTI_CLASS(GxGuiNode, GxGuiPropertyTable)
270 // GxGuiPropertyTable継承クラス用禁止宣言
272
273
274 //-----------------------------------------------------------
276 //-----------------------------------------------------------
278private:
280 GxGuiNode(void) : _pOwner(nullptr){}
281public:
283 GxGuiNode(const GxProperty& property, GxTypedObject* pObject, GxToolPathSet* pOwner);
284
286 //-----------------------------------------------------------
288 //-----------------------------------------------------------
290
292 void onClick(const GxPoint2& position, u32 button) override;
294 void createPopupMenu(const GxPoint2& position);
296 void eventPopupAdd(void);
298 void eventPopupDelete(void* pObject);
299
301 u32 getObjectIndex( void* pObject );
302
304 //-----------------------------------------------------------
306 //-----------------------------------------------------------
308private:
309 GxToolPathSet* _pOwner;
310
312};
313
314//===========================================================================
316//===========================================================================
317class GxToolPathSet::GxGuiConnect : public GxGuiPropertyTable
318{
319 //-----------------------------------------------------------
321 //-----------------------------------------------------------
323public:
324 // RTTI定義
325 GX_RTTI_CLASS(GxGuiConnect, GxGuiPropertyTable)
326 // GxGuiPropertyTable継承クラス用禁止宣言
328
329
330 //-----------------------------------------------------------
332 //-----------------------------------------------------------
334private:
336 GxGuiConnect(void) : _pOwner(nullptr){}
337public:
339 GxGuiConnect(const GxProperty& property, GxTypedObject* pObject, GxToolPathSet* pOwner);
340
342 //-----------------------------------------------------------
344 //-----------------------------------------------------------
346
348 void onClick(const GxPoint2& position, u32 button) override;
350 void createPopupMenu(const GxPoint2& position);
352 void eventPopupAdd(void);
354 void eventPopupDelete(void* pObject);
355
357 //-----------------------------------------------------------
359 //-----------------------------------------------------------
361private:
362 GxToolPathSet* _pOwner;
363
365};
366
367//===========================================================================
369//===========================================================================
370class GxToolPathSet::GxGuiRoute : public GxGuiPropertyTable
371{
372 //-----------------------------------------------------------
374 //-----------------------------------------------------------
376public:
377 // RTTI定義
378 GX_RTTI_CLASS(GxGuiRoute, GxGuiPropertyTable)
379 // GxGuiPropertyTable継承クラス用禁止宣言
381
382
383 //-----------------------------------------------------------
385 //-----------------------------------------------------------
387private:
389 GxGuiRoute(void) : _pOwner(nullptr){}
390public:
392 GxGuiRoute(const GxProperty& property, GxTypedObject* pObject, GxToolPathSet* pOwner);
393
395 //-----------------------------------------------------------
397 //-----------------------------------------------------------
399
401 void onClick(const GxPoint2& position, u32 button) override;
403 void createPopupMenu(const GxPoint2& position);
405 void eventPopupAdd(void);
407 void eventPopupDelete(void* pObject);
408
410 //-----------------------------------------------------------
412 //-----------------------------------------------------------
414private:
415 GxToolPathSet* _pOwner;
416
418};
419
420GX_CHARACTER_NAMESPACE_END()
421#endif //GX_EDITOR
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
void GxTypedObject
その他
Definition GxDefine.h:213
static constexpr u32 LEFT_1
L1 | LB.
Definition GxInputPad.h:58
static constexpr u32 LEFT_2
L2(PS4のみ)| LT.
Definition GxInputPad.h:60
static constexpr u32 RIGHT_2
R2(PS4のみ)| RT.
Definition GxInputPad.h:61
static constexpr u32 RIGHT_1
R1 | RB.
Definition GxInputPad.h:59
プロパティクラス
Definition GxProperty.h:48
プロパティテーブルクラス
Definition GxProperty.h:1641
リソース基底クラス
Definition GxResBase.h:23
@ CHARACTER
CHARACTER.
キャラクター基礎ユニット
Definition GxUnitCharacterBase.h:20
座標
Definition GxStruct.h:867
Definition GxBase.h:24
32bitブーリアン
Definition GxDefine.h:173