Skip to content

Commit 7e7aed8

Browse files
committed
meta WIP
1 parent 363ceb6 commit 7e7aed8

17 files changed

+1449
-806
lines changed

src/animation/animation_module.gen.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
// generated by meta.cpp
1+
// Generated by meta.cpp
22

33
reflection::build_module("animation")
4-
.cmp<&AnimationModule::createAnimable, &AnimationModule::destroyAnimable>("animable", "Animation / Animable")
5-
.prop<&AnimationModule::getAnimableAnimation, &AnimationModule::setAnimableAnimation>("Animation")
6-
.cmp<&AnimationModule::createAnimator, &AnimationModule::destroyAnimator>("animator", "Animation / Animator")
7-
.function<(void (AnimationModule::*)(EntityRef entity, u32 idx))&AnimationModule::applyAnimatorSet>("applySet", "AnimationModule::applyAnimatorSet")
8-
.function<(void (AnimationModule::*)(EntityRef entity, u32 input_idx, bool value))&AnimationModule::setAnimatorInput>("setBoolInput", "AnimationModule::setAnimatorInput")
9-
.function<(void (AnimationModule::*)(EntityRef entity, u32 input_idx, float value))&AnimationModule::setAnimatorInput>("setFloatInput", "AnimationModule::setAnimatorInput")
10-
.function<(void (AnimationModule::*)(EntityRef entity, u32 input_idx, Vec3 value))&AnimationModule::setAnimatorInput>("setVec3Input", "AnimationModule::setAnimatorInput")
11-
.function<(int (AnimationModule::*)(EntityRef entity, const char* name))&AnimationModule::getAnimatorInputIndex>("getInputIndex", "AnimationModule::getAnimatorInputIndex")
12-
.prop<&AnimationModule::getAnimatorSource, &AnimationModule::setAnimatorSource>("Source")
13-
.resourceAttribute(anim::Controller::TYPE)
14-
.prop<&AnimationModule::getAnimatorUseRootMotion, &AnimationModule::setAnimatorUseRootMotion>("Use root motion")
15-
.prop<&AnimationModule::getAnimatorDefaultSet, &AnimationModule::setAnimatorDefaultSet>("Default set")
164
.cmp<&AnimationModule::createPropertyAnimator, &AnimationModule::destroyPropertyAnimator>("property_animator", "Animation / Property animator")
175
.prop<&AnimationModule::isPropertyAnimatorEnabled, &AnimationModule::enablePropertyAnimator>("Enabled")
186
.prop<&AnimationModule::getPropertyAnimatorLooped, &AnimationModule::setPropertyAnimatorLooped>("Looped")
197
.prop<&AnimationModule::getPropertyAnimatorAnimation, &AnimationModule::setPropertyAnimatorAnimation>("Animation")
208
.resourceAttribute(PropertyAnimation::TYPE)
9+
.cmp<&AnimationModule::createAnimator, &AnimationModule::destroyAnimator>("animator", "Animation / Animator")
10+
.function<(void (AnimationModule::*)(EntityRef entity, u32 idx))&AnimationModule::applyAnimatorSet>("applySet")
11+
.function<(void (AnimationModule::*)(EntityRef entity, u32 input_idx, bool value))&AnimationModule::setAnimatorInput>("setBoolInput")
12+
.function<(void (AnimationModule::*)(EntityRef entity, u32 input_idx, float value))&AnimationModule::setAnimatorInput>("setFloatInput")
13+
.function<(void (AnimationModule::*)(EntityRef entity, u32 input_idx, Vec3 value))&AnimationModule::setAnimatorInput>("setVec3Input")
14+
.function<(int (AnimationModule::*)(EntityRef entity, const char* name))&AnimationModule::getAnimatorInputIndex>("getInputIndex")
15+
.prop<&AnimationModule::getAnimatorSource, &AnimationModule::setAnimatorSource>("Source")
16+
.resourceAttribute(anim::Controller::TYPE)
17+
.prop<&AnimationModule::getAnimatorUseRootMotion, &AnimationModule::setAnimatorUseRootMotion>("Use root motion")
18+
.prop<&AnimationModule::getAnimatorDefaultSet, &AnimationModule::setAnimatorDefaultSet>("Default set")
19+
.cmp<&AnimationModule::createAnimable, &AnimationModule::destroyAnimable>("animable", "Animation / Animable")
20+
.prop<&AnimationModule::getAnimableAnimation, &AnimationModule::setAnimableAnimation>("Animation")
2121
;
2222

src/audio/audio_module.gen.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
// generated by meta.cpp
1+
// Generated by meta.cpp
22

33
reflection::build_module("audio")
4-
.function<(SoundHandle (AudioModule::*)(EntityRef entity, const Path& clip, bool is_3d))&AudioModule::play>("play", "AudioModule::play")
5-
.function<(void (AudioModule::*)(float volume))&AudioModule::setMasterVolume>("setMasterVolume", "AudioModule::setMasterVolume")
6-
.function<(void (AudioModule::*)(SoundHandle sound_id))&AudioModule::stop>("stop", "AudioModule::stop")
7-
.function<(bool (AudioModule::*)(SoundHandle sound_id))&AudioModule::isEnd>("isEnd", "AudioModule::isEnd")
8-
.function<(void (AudioModule::*)(SoundHandle sound_id, u32 frequency_hz))&AudioModule::setFrequency>("setFrequency", "AudioModule::setFrequency")
9-
.function<(void (AudioModule::*)(SoundHandle sound_id, float volume))&AudioModule::setVolume>("setVolume", "AudioModule::setVolume")
10-
.function<(void (AudioModule::*)(SoundHandle sound_id, float wet_dry_mix, float feedback, float left_delay, float right_delay))&AudioModule::setEcho>("setEcho", "AudioModule::setEcho")
11-
.cmp<&AudioModule::createAmbientSound, &AudioModule::destroyAmbientSound>("ambient_sound", "Audio / Ambient sound")
12-
.function<(void (AudioModule::*)(EntityRef entity))&AudioModule::pauseAmbientSound>("pause", "AudioModule::pauseAmbientSound")
13-
.function<(void (AudioModule::*)(EntityRef entity))&AudioModule::resumeAmbientSound>("resume", "AudioModule::resumeAmbientSound")
14-
.prop<&AudioModule::getAmbientSoundClip, &AudioModule::setAmbientSoundClip>("Clip")
15-
.resourceAttribute(Clip::TYPE)
16-
.prop<&AudioModule::getAmbientSound3D, &AudioModule::setAmbientSound3D>("3D")
17-
.cmp<&AudioModule::createListener, &AudioModule::destroyListener>("audio_listener", "Audio / Listener")
18-
.cmp<&AudioModule::createChorusZone, &AudioModule::destroyChorusZone>("chorus_zone", "Audio / Chorus zone")
19-
.var_prop<&AudioModule::getChorusZone, &ChorusZone::radius>("Radius")
20-
.minAttribute(0)
21-
.var_prop<&AudioModule::getChorusZone, &ChorusZone::delay>("Delay (ms)")
22-
.minAttribute(0)
4+
.function<(SoundHandle (AudioModule::*)(EntityRef entity, const Path& clip, bool is_3d))&AudioModule::play>("play")
5+
.function<(void (AudioModule::*)(float volume))&AudioModule::setMasterVolume>("setMasterVolume")
6+
.function<(void (AudioModule::*)(SoundHandle sound_id))&AudioModule::stop>("stop")
7+
.function<(bool (AudioModule::*)(SoundHandle sound_id))&AudioModule::isEnd>("isEnd")
8+
.function<(void (AudioModule::*)(SoundHandle sound_id, u32 frequency_hz))&AudioModule::setFrequency>("setFrequency")
9+
.function<(void (AudioModule::*)(SoundHandle sound_id, float volume))&AudioModule::setVolume>("setVolume")
10+
.function<(void (AudioModule::*)(SoundHandle sound_id, float wet_dry_mix, float feedback, float left_delay, float right_delay))&AudioModule::setEcho>("setEcho")
2311
.cmp<&AudioModule::createEchoZone, &AudioModule::destroyEchoZone>("echo_zone", "Audio / Echo zone")
2412
.var_prop<&AudioModule::getEchoZone, &EchoZone::radius>("Radius")
2513
.minAttribute(0)
2614
.var_prop<&AudioModule::getEchoZone, &EchoZone::delay>("Delay (ms)")
2715
.minAttribute(0)
16+
.cmp<&AudioModule::createChorusZone, &AudioModule::destroyChorusZone>("chorus_zone", "Audio / Chorus zone")
17+
.var_prop<&AudioModule::getChorusZone, &ChorusZone::radius>("Radius")
18+
.minAttribute(0)
19+
.var_prop<&AudioModule::getChorusZone, &ChorusZone::delay>("Delay (ms)")
20+
.minAttribute(0)
21+
.cmp<&AudioModule::createListener, &AudioModule::destroyListener>("audio_listener", "Audio / Listener")
22+
.cmp<&AudioModule::createAmbientSound, &AudioModule::destroyAmbientSound>("ambient_sound", "Audio / Ambient sound")
23+
.function<(void (AudioModule::*)(EntityRef entity))&AudioModule::pauseAmbientSound>("pause")
24+
.function<(void (AudioModule::*)(EntityRef entity))&AudioModule::resumeAmbientSound>("resume")
25+
.prop<&AudioModule::getAmbientSoundClip, &AudioModule::setAmbientSoundClip>("Clip")
26+
.resourceAttribute(Clip::TYPE)
27+
.prop<&AudioModule::getAmbientSound3D, &AudioModule::setAmbientSound3D>("3D")
2828
;
2929

src/core/geometry.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace Lumix {
88
struct AABB;
99
struct Matrix;
1010

11+
//@ struct name Ray
1112
struct LUMIX_CORE_API Ray {
1213
DVec3 origin;
1314
Vec3 dir;

src/engine/core.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,13 @@ struct CoreModuleImpl : CoreModule {
174174
void update(float time_delta) override {}
175175
World& getWorld() override { return m_world; }
176176

177-
void createSpline(EntityRef e) {
177+
void createSpline(EntityRef e) override {
178178
Spline spline(m_allocator);
179179
m_splines.insert(e, static_cast<Spline&&>(spline));
180180
m_world.onComponentCreated(e, SPLINE_TYPE, this);
181181
}
182182

183-
void destroySpline(EntityRef e) {
183+
void destroySpline(EntityRef e) override {
184184
m_splines.erase(e);
185185
m_world.onComponentDestroyed(e, SPLINE_TYPE, this);
186186
}
@@ -191,14 +191,14 @@ struct CoreModuleImpl : CoreModule {
191191

192192
const HashMap<EntityRef, Spline>& getSplines() override { return m_splines; }
193193

194-
void createSignal(EntityRef e) {
194+
void createSignal(EntityRef e) override {
195195
UniquePtr<Signal>& s = m_signals.insert(e);
196196
s = UniquePtr<Signal>::create(m_allocator);
197197
s->entity = e;
198198
m_world.onComponentCreated(e, SIGNAL_TYPE, this);
199199
}
200200

201-
void destroySignal(EntityRef e) {
201+
void destroySignal(EntityRef e) override {
202202
for (UniquePtr<SignalDispatcher>& dispatcher : m_signal_dispatchers) {
203203
auto iter = dispatcher->map.find(e);
204204
if (iter.isValid()) {
@@ -246,12 +246,7 @@ struct CoreModuleImpl : CoreModule {
246246
}
247247

248248
static void reflect() {
249-
LUMIX_MODULE(CoreModuleImpl, "core")
250-
.LUMIX_CMP(Spline, "spline", "Core / Spline")
251-
.blob_property<&CoreModuleImpl::getSplineBlob, &CoreModuleImpl::setSplineBlob>("Blob")
252-
.LUMIX_CMP(Signal, "signal", "Core / Signal")
253-
.blob_property<&CoreModuleImpl::getSignalBlob, &CoreModuleImpl::setSignalBlob>("Blob")
254-
;
249+
#include "core.gen.h"
255250
}
256251

257252
IAllocator& m_allocator;

src/engine/core.gen.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Generated by meta.cpp
2+
3+
reflection::build_module("core")
4+
.cmp<&CoreModule::createSpline, &CoreModule::destroySpline>("spline", "Core / Spline")
5+
.blob_property<&CoreModule::getSplineBlob, &CoreModule::setSplineBlob>("Blob")
6+
.cmp<&CoreModule::createSignal, &CoreModule::destroySignal>("signal", "Core / Signal")
7+
.blob_property<&CoreModule::getSignalBlob, &CoreModule::setSignalBlob>("Blob")
8+
;
9+

src/engine/core.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,25 @@ struct Signal {
2929
reflection::FunctionBase* function = nullptr;
3030
};
3131

32+
//@ module CoreModule core "Core"
3233
struct CoreModule : IModule {
3334
virtual Spline& getSpline(EntityRef e) = 0;
3435
virtual Signal& getSignal(EntityRef e) = 0;
3536
virtual const HashMap<EntityRef, Spline>& getSplines() = 0;
37+
38+
//@ component Spline spline "Spline"
39+
virtual void getSplineBlob(EntityRef entity, OutputMemoryStream& value) = 0; //@ blob
40+
virtual void setSplineBlob(EntityRef entity, InputMemoryStream& value) = 0;
41+
//@ end
42+
virtual void createSpline(EntityRef entity) = 0;
43+
virtual void destroySpline(EntityRef entity) = 0;
44+
45+
//@ component Signal signal "Signal"
46+
virtual void getSignalBlob(EntityRef entity, OutputMemoryStream& value) = 0; //@ blob
47+
virtual void setSignalBlob(EntityRef entity, InputMemoryStream& value) = 0;
48+
//@ end
49+
virtual void createSignal(EntityRef entity) = 0;
50+
virtual void destroySignal(EntityRef entity) = 0;
3651
};
3752

3853
ISystem* createCorePlugin(Engine& engine);

src/engine/reflection.h

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,7 @@
1414
#include "engine/component_uid.h"
1515
#include "engine/resource.h"
1616

17-
18-
#define LUMIX_MODULE(Class, Label) using ReflModule = Class; reflection::build_module(Label)
19-
#define LUMIX_FUNC_EX(F, Name) function<&ReflModule::F>(Name, #F)
20-
#define LUMIX_FUNC(F) function<&ReflModule::F>(#F, #F)
21-
#define LUMIX_EVENT(F) event<&F>(#F)
22-
#define LUMIX_CMP(Cmp, Name, Label) cmp<&ReflModule::create##Cmp, &ReflModule::destroy##Cmp>(Name, Label)
23-
#define LUMIX_PROP(Property, Label) prop<&ReflModule::get##Property, &ReflModule::set##Property>(Label)
24-
#define LUMIX_ENUM_PROP(Property, Label) enum_prop<&ReflModule::get##Property, &ReflModule::set##Property>(Label)
25-
#define LUMIX_GLOBAL_FUNC(Func) reflection::function<&Func>(#Func, nullptr)
17+
#define LUMIX_GLOBAL_FUNC(Func) reflection::function<&Func>(#Func)
2618

2719
// see member function for explanation
2820
#define LUMIX_MEMBER(V, Name) member<&V, __LINE__>(Name)
@@ -74,7 +66,6 @@ LUMIX_ENGINE_API StableHash getPropertyHash(ComponentType cmp, const char* prope
7466
LUMIX_ENGINE_API bool componentTypeExists(const char* id);
7567
LUMIX_ENGINE_API ComponentType getComponentType(StringView id);
7668
LUMIX_ENGINE_API ComponentType getComponentTypeFromHash(RuntimeHash hash);
77-
LUMIX_ENGINE_API const char* declCodeToName(const char* decl_code);
7869

7970
struct ResourceAttribute : IAttribute
8071
{
@@ -402,7 +393,6 @@ struct FunctionBase {
402393
// we can use this in Delegate::bindRaw, so there's less overhead
403394
virtual DummyFnType getDelegateStub() = 0;
404395

405-
const char* decl_code;
406396
const char* name;
407397
};
408398

@@ -670,12 +660,11 @@ LUMIX_ENGINE_API Array<FunctionBase*>& allFunctions();
670660
LUMIX_ENGINE_API Array<StructBase*>& allStructs();
671661

672662
template <auto func>
673-
auto& function(const char* decl_code, const char* name)
663+
auto& function(const char* name)
674664
{
675665
static Function<func> ret;
676666
allFunctions().push(&ret);
677-
ret.decl_code = decl_code;
678-
ret.name = name && name[0] ? name : declCodeToName(decl_code);
667+
ret.name = name;
679668
return ret;
680669
}
681670

@@ -944,10 +933,9 @@ struct LUMIX_ENGINE_API builder {
944933
}
945934

946935
template <auto F>
947-
builder& function(const char* name, const char* decl_code) {
936+
builder& function(const char* name) {
948937
auto* f = LUMIX_NEW(allocator, Function<F>);
949-
f->name = name && name[0] ? name : declCodeToName(decl_code);
950-
f->decl_code = decl_code;
938+
f->name = name;
951939
if (module->cmps.empty()) {
952940
module->functions.push(f);
953941
}

src/gui/gui_module.gen.h

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// generated by meta.cpp
1+
// Generated by meta.cpp
22

33
struct TextHAlignEnum : reflection::EnumAttribute {
44
u32 count(ComponentUID cmp) const override { return 3; }
55
const char* name(ComponentUID cmp, u32 idx) const override {
66
switch((TextHAlign)idx) {
7-
case TextHAlign::LEFT: return "LEFT";
8-
case TextHAlign::CENTER: return "CENTER";
9-
case TextHAlign::RIGHT: return "RIGHT";
7+
case TextHAlign::LEFT: return "Left";
8+
case TextHAlign::CENTER: return "Center";
9+
case TextHAlign::RIGHT: return "Right";
1010
}
1111
ASSERT(false);
1212
return "N/A";
@@ -17,9 +17,9 @@ struct TextVAlignEnum : reflection::EnumAttribute {
1717
u32 count(ComponentUID cmp) const override { return 3; }
1818
const char* name(ComponentUID cmp, u32 idx) const override {
1919
switch((TextVAlign)idx) {
20-
case TextVAlign::TOP: return "TOP";
21-
case TextVAlign::MIDDLE: return "MIDDLE";
22-
case TextVAlign::BOTTOM: return "BOTTOM";
20+
case TextVAlign::TOP: return "Top";
21+
case TextVAlign::MIDDLE: return "Middle";
22+
case TextVAlign::BOTTOM: return "Bottom";
2323
}
2424
ASSERT(false);
2525
return "N/A";
@@ -32,9 +32,39 @@ reflection::build_module("gui")
3232
.event<&GUIModule::rectHoveredOut>("rectHoveredOut")
3333
.event<&GUIModule::rectMouseDown>("rectMouseDown")
3434
.event<&GUIModule::mousedButtonUnhandled>("mousedButtonUnhandled")
35-
.function<(EntityPtr (GUIModule::*)(const Vec2& pos))&GUIModule::getRectAt>("getRectAt", "GUIModule::getRectAt")
36-
.function<(bool (GUIModule::*)(const Vec2& pos, EntityRef e))&GUIModule::isOver>("isOver", "GUIModule::isOver")
37-
.function<(GUISystem* (GUIModule::*)())&GUIModule::getSystemPtr>("getSystem", "GUIModule::getSystemPtr")
35+
.function<(EntityPtr (GUIModule::*)(const Vec2& pos))&GUIModule::getRectAt>("getRectAt")
36+
.function<(bool (GUIModule::*)(const Vec2& pos, EntityRef e))&GUIModule::isOver>("isOver")
37+
.function<(GUISystem* (GUIModule::*)())&GUIModule::getSystemPtr>("getSystem")
38+
.cmp<&GUIModule::createCanvas, &GUIModule::destroyCanvas>("gui_canvas", "GUI / Canvas")
39+
.var_prop<&GUIModule::getCanvas, &Canvas::is_3d>("Is 3d")
40+
.var_prop<&GUIModule::getCanvas, &Canvas::orient_to_camera>("Orient to camera")
41+
.var_prop<&GUIModule::getCanvas, &Canvas::virtual_size>("Virtual size")
42+
.cmp<&GUIModule::createRenderTarget, &GUIModule::destroyRenderTarget>("gui_render_target", "GUI / Render target")
43+
.cmp<&GUIModule::createInputField, &GUIModule::destroyInputField>("gui_input_field", "GUI / Input field")
44+
.icon(ICON_FA_KEYBOARD)
45+
.cmp<&GUIModule::createRect, &GUIModule::destroyRect>("gui_rect", "GUI / Rect")
46+
.prop<&GUIModule::isRectEnabled, &GUIModule::enableRect>("Enabled")
47+
.prop<&GUIModule::getRectClip, &GUIModule::setRectClip>("Clip content")
48+
.prop<&GUIModule::getRectLeftPoints, &GUIModule::setRectLeftPoints>("Left points")
49+
.prop<&GUIModule::getRectLeftRelative, &GUIModule::setRectLeftRelative>("Left relative")
50+
.prop<&GUIModule::getRectRightPoints, &GUIModule::setRectRightPoints>("Right points")
51+
.prop<&GUIModule::getRectRightRelative, &GUIModule::setRectRightRelative>("Right relative")
52+
.prop<&GUIModule::getRectTopPoints, &GUIModule::setRectTopPoints>("Top points")
53+
.prop<&GUIModule::getRectTopRelative, &GUIModule::setRectTopRelative>("Top relative")
54+
.prop<&GUIModule::getRectBottomPoints, &GUIModule::setRectBottomPoints>("Bottom points")
55+
.prop<&GUIModule::getRectBottomRelative, &GUIModule::setRectBottomRelative>("Bottom relative")
56+
.cmp<&GUIModule::createButton, &GUIModule::destroyButton>("gui_button", "GUI / Button")
57+
.prop<&GUIModule::getButtonHoveredColorRGBA, &GUIModule::setButtonHoveredColorRGBA>("Hovered color")
58+
.colorAttribute()
59+
.enum_prop<&GUIModule::getButtonHoveredCursor, &GUIModule::setButtonHoveredCursor>("Hovered cursor")
60+
.attribute<CursorTypeEnum>()
61+
.cmp<&GUIModule::createImage, &GUIModule::destroyImage>("gui_image", "GUI / Image")
62+
.icon(ICON_FA_IMAGE)
63+
.prop<&GUIModule::isImageEnabled, &GUIModule::enableImage>("Enabled")
64+
.prop<&GUIModule::getImageColorRGBA, &GUIModule::setImageColorRGBA>("Color")
65+
.colorAttribute()
66+
.prop<&GUIModule::getImageSprite, &GUIModule::setImageSprite>("Sprite")
67+
.resourceAttribute(Sprite::TYPE)
3868
.cmp<&GUIModule::createText, &GUIModule::destroyText>("gui_text", "GUI / Text")
3969
.icon(ICON_FA_FONT)
4070
.prop<&GUIModule::getTextFontSize, &GUIModule::setTextFontSize>("Font size")
@@ -49,35 +79,5 @@ reflection::build_module("gui")
4979
.attribute<TextVAlignEnum>()
5080
.prop<&GUIModule::getText, &GUIModule::setText>("Text")
5181
.multilineAttribute()
52-
.cmp<&GUIModule::createImage, &GUIModule::destroyImage>("gui_image", "GUI / Image")
53-
.icon(ICON_FA_IMAGE)
54-
.prop<&GUIModule::isImageEnabled, &GUIModule::enableImage>("Enabled")
55-
.prop<&GUIModule::getImageColorRGBA, &GUIModule::setImageColorRGBA>("Color")
56-
.colorAttribute()
57-
.prop<&GUIModule::getImageSprite, &GUIModule::setImageSprite>("Sprite")
58-
.resourceAttribute(Sprite::TYPE)
59-
.cmp<&GUIModule::createButton, &GUIModule::destroyButton>("gui_button", "GUI / Button")
60-
.prop<&GUIModule::getButtonHoveredColorRGBA, &GUIModule::setButtonHoveredColorRGBA>("Hovered color")
61-
.colorAttribute()
62-
.enum_prop<&GUIModule::getButtonHoveredCursor, &GUIModule::setButtonHoveredCursor>("Hovered cursor")
63-
.attribute<CursorTypeEnum>()
64-
.cmp<&GUIModule::createRect, &GUIModule::destroyRect>("gui_rect", "GUI / Rect")
65-
.prop<&GUIModule::isRectEnabled, &GUIModule::enableRect>("Enabled")
66-
.prop<&GUIModule::getRectClip, &GUIModule::setRectClip>("Clip content")
67-
.prop<&GUIModule::getRectLeftPoints, &GUIModule::setRectLeftPoints>("Left points")
68-
.prop<&GUIModule::getRectLeftRelative, &GUIModule::setRectLeftRelative>("Left relative")
69-
.prop<&GUIModule::getRectRightPoints, &GUIModule::setRectRightPoints>("Right points")
70-
.prop<&GUIModule::getRectRightRelative, &GUIModule::setRectRightRelative>("Right relative")
71-
.prop<&GUIModule::getRectTopPoints, &GUIModule::setRectTopPoints>("Top points")
72-
.prop<&GUIModule::getRectTopRelative, &GUIModule::setRectTopRelative>("Top relative")
73-
.prop<&GUIModule::getRectBottomPoints, &GUIModule::setRectBottomPoints>("Bottom points")
74-
.prop<&GUIModule::getRectBottomRelative, &GUIModule::setRectBottomRelative>("Bottom relative")
75-
.cmp<&GUIModule::createInputField, &GUIModule::destroyInputField>("gui_input_field", "GUI / Input field")
76-
.icon(ICON_FA_KEYBOARD)
77-
.cmp<&GUIModule::createRenderTarget, &GUIModule::destroyRenderTarget>("gui_render_target", "GUI / Render target")
78-
.cmp<&GUIModule::createCanvas, &GUIModule::destroyCanvas>("gui_canvas", "GUI / Canvas")
79-
.var_prop<&GUIModule::getCanvas, &Canvas::is_3d>("Is 3d")
80-
.var_prop<&GUIModule::getCanvas, &Canvas::orient_to_camera>("Orient to camera")
81-
.var_prop<&GUIModule::getCanvas, &Canvas::virtual_size>("Virtual size")
8282
;
8383

src/gui/gui_system.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ struct GUISystemImpl final : GUISystem
6969
, m_render_plugin(*this)
7070
{
7171
GUIModule::reflect();
72-
LUMIX_GLOBAL_FUNC(GUISystem::enableCursor);
72+
reflection::function<&GUISystem::enableCursor>("enableCursor");
7373
m_sprite_manager.create(Sprite::TYPE, m_engine.getResourceManager());
7474
}
7575

0 commit comments

Comments
 (0)