OROCHI
 
Loading...
Searching...
No Matches
GxToolFlagManager.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13#if GX_EDITOR
14
15GX_CORE_NAMESPACE_BEGIN()
16
17//===========================================================================
19//===========================================================================
20class GxToolFlagManager : public GxToolResourceEditBase
21{
22 //-----------------------------------------------------------
24 //-----------------------------------------------------------
26public:
27 // RTTI定義
28 GX_RTTI_ABSTRACT_CLASS_NAME_ICON(GxToolFlagManager, GxToolResourceEditBase, "フラグ編集", GxRtti::ICON_TYPE::CORE)
29 // ClassBaseReference継承クラス用禁止宣言
30 GX_PROHIBIT_CLASS_BASE(GxToolFlagManager)
31
32
33 static const u32 FORM_POSITION_X;
35 static const u32 FORM_POSITION_Y;
37 static const u32 FORM_WIDTH;
39 static const u32 FORM_HEIGHT;
40
42 static constexpr u32 FLAG_INFORMATION_WORK_NUM = GxMath::VALUE_512;
44 static constexpr u32 FLAG_CATEGORY_MAX = GxMath::VALUE_8;
45
46 struct GxFlagControlParam;
47 class GxFlagInformation;
48 class GxFlagCategoryInformation;
49
51 struct GxFlagControlParameter : public GxStructBase
52 {
53 //-----------------------------------------------------------
55 //-----------------------------------------------------------
57 public:
58 GX_RTTI_STRUCT(GxFlagControlParameter)
59
60
61 enum class REQUEST
62 {
63 ON_OFF = 0,
64 CHECK
65 };
66
68 //-----------------------------------------------------------
70 //-----------------------------------------------------------
72 public:
73 REQUEST _request;
74 u32 _index;
75 b32 _param;
76
78 };
79
81 class GxFlagInformation : public GxClassBase
82 {
83 //-----------------------------------------------------------
85 //-----------------------------------------------------------
87 public:
88 GX_RTTI_CLASS(GxFlagInformation, GxClassBase)
89
90
91 //-----------------------------------------------------------
93 //-----------------------------------------------------------
95
97 GxFlagInformation( void ) : _id(-1), _flagName(nullptr), _flagDefineName(nullptr), _pCategory(nullptr){}
98
100 //-----------------------------------------------------------
102 //-----------------------------------------------------------
104 public:
106 void getPropertyFlag( void* const pValue );
108 void setPropertyFlag( const void* const pValue );
109
111 //-----------------------------------------------------------
113 //-----------------------------------------------------------
115
116 s32 _id;
117 GX_CSTR _flagName;
118 GX_CSTR _flagDefineName;
119 GxFlagCategoryInformation* _pCategory;
120
122 };
123
125 class GxFlagCategoryInformation : public GxClassBase
126 {
127 //-----------------------------------------------------------
129 //-----------------------------------------------------------
131 public:
132 GX_RTTI_CLASS(GxFlagCategoryInformation, GxClassBase)
133
134
135 //-----------------------------------------------------------
137 //-----------------------------------------------------------
139
141 void getPropertyFlagList( void* const pValue, u32 index);
143 void setPropertyFlagList(const void* const pValue, u32 index);
145 u32 getPropertyFlagListCount(void) const;
147 GX_FORCE_INLINE void setPropertyFlagListCount(u32 /*count*/) {}
148
150 //-----------------------------------------------------------
152 //-----------------------------------------------------------
154
155 GxCallback::GxHandlerBase _handleFlagControl;
156 GxString _categoryName;
157 u32 _categoryHash;
158 u32 _flagStartIndex;
159 u32 _flagEndIndex;
160 GxFlagInformation _flagList[ FLAG_INFORMATION_WORK_NUM ];
161
163 };
164
166 //-----------------------------------------------------------
168 //-----------------------------------------------------------
170public:
172 GxToolFlagManager( void );
173
175 //-----------------------------------------------------------
177 //-----------------------------------------------------------
179
181 b32 initialize(void) override;
182
184 void update(void) override;
185
187 void setResource( GxResBase* pResource ) override;
188
190 //-----------------------------------------------------------
192 //-----------------------------------------------------------
194public:
196 static void loadAndSetting( GX_CSTR path, const GxRtti& rtti );
197
199 void addCategory( const GxResCellSheet* pResCellSheet, const GxCallback::GxHandlerBase& handleFlagControl, GX_CSTR pCategoryName, u32 categoryId, u32 flagStartIndex, u32 flagEndIndex );
200
201private:
203 void save( void ) override;
204
206 void saveAs( u32 attribute ) override;
207
209 void createCategory( void );
210
212 //-----------------------------------------------------------
214 //-----------------------------------------------------------
216private:
217 GxFlagCategoryInformation _flagCategoryInfo[ FLAG_CATEGORY_MAX ];
218 u32 _categoryInformationCount;
219 GxGuiTab* _pGuiTab;
220
221 b32 _isRequestUpdate;
222
224};
225
226GX_CORE_NAMESPACE_END()
227#endif // GX_EDITOR
228
#define GX_PROHIBIT_CLASS_BASE(__CLASS__)
GxClassBase継承の禁止宣言
Definition GxBase.h:240
ハンドラ基本クラス
Definition GxCallback.h:27
オブジェクト基底クラス
Definition GxBase.h:88
static constexpr u32 VALUE_512
512
Definition GxMath.h:128
static constexpr u32 VALUE_8
8
Definition GxMath.h:122
リソース基底クラス
Definition GxResBase.h:23
セルシートリソースクラス
Definition GxResCellSheet.h:19
実行時型情報クラス
Definition GxRtti.h:154
文字列型クラス
Definition GxString.h:18
Definition GxBase.h:24
32bitブーリアン
Definition GxDefine.h:173