2
3
4
5
9#include "Systems/SlateSystem.h"
10#include "Slate/Imgui/ImguiInfoBar.h"
15
16
22
23
33
34
35
36
37
46
47
51
52
53
54
55
56
58 static void Create(
const std::string& info, std::function<std::any()> rateFunc, std::function<
bool(
SlateInfoBar*)> destroyFunc =
nullptr);
61
62
63
67
68
69
77
78
79
84 return m_DestroyFunc(
this);
93
94
95
101
102
106
107
111
112
116
117
123 inline void SlateInfoBar::Create(
const std::string& info, std::function<std::any()> rateFunc, std::function<
bool(
SlateInfoBar*)> destroyFunc)
127 auto ptr =
dynamic_cast<ImguiInfoBar*>(SlateSystem::GetRegister()->GetSlate(
"InfoBar").get());
129 if constexpr (std::is_same_v<R,
float>)
131 ptr->Push(std::make_shared<SlateInfoBar>(info, rateFunc, destroyFunc, Type::progress));
133 else if constexpr (std::is_same_v<R,
int>)
135 ptr->Push(std::make_shared<SlateInfoBar>(info, rateFunc, destroyFunc, Type::count));
#define SPICES_PROFILE_ZONE
EntityComponent Class. This class defines the specific behaves of EntityComponent.
Entity Class. This class defines the specific behaves of Entity.
Wrapper of Gltf Json Accessors.
Wrapper of Gltf Json BufferViews.
Wrapper of Gltf Json Buffers.
Entity CreateEntityRecursive(World *world, const std::string &tag, uint32_t node, const glm::mat4 &model, std::shared_ptr< LoadingState > loadingState)
Create Entity recursive from gltf file nodes.
GltfCollection(const std::string &path)
Constructor Function.
void CreateEntity(World *world, const std::string &tag, Transform transform={})
Create Entity instance from gltf file.
Wrapper of Gltf file data.
Wrapper of Gltf Json Images.
static bool Load(const std::string &fileName, GltfCollection *collection)
Load a gltf file to GltfCollection.
static bool LoadPack(GltfPack *pack, const GltfMeshes::Primitive &primitive, GltfAccessors *accessors, GltfBuffers *buffers, GltfBufferViews *bufferViews)
Load a gltf mesh to GltfPack.
static std::shared_ptr< Material > LoadMaterial(const GltfMaterials::Item &material, GltfImages *images)
Load a Material from Gltf file material component.
Loader of load gltf file or items.
Wrapper of Gltf Json Materials.
Wrapper of Gltf Json Meshes.
Wrapper of Gltf Json Nodes.
std::function< void(GltfPack *) m_Func)
function pointer of createPack.
GltfPack(const std::string &name, const std::function< void(GltfPack *)> &f, bool instanced=true)
Constructor Function.
virtual ~GltfPack() override=default
Destructor Function.
virtual bool OnCreatePack(bool isCreateBuffer=true) override
This interface is used for build specific meshPack data.
GltfPack Class. This class defines gltf type meshPack.
Material Class. This class contains a branch of parameter and shader, also descriptor.
MeshComponent Class. This class defines the specific behaves of MeshComponent.
MeshPack(const std::string &name, bool instanced)
Constructor Function.
std::string m_PackType
specific mesh pack type.
MeshPack Class. This class defines some basic behaves and variables. This class need to be inherited ...
Builder Class. This class helps to create a mesh.
MeshRenderer Class. This class is a wrapper of mashpack.
virtual ~SlateInfoBar()=default
Destructor Function.
std::function< std::any()> m_RateFunc
InfoBar progress rate function.
Type GetType() const
Get this type.
SlateInfoBar(const std::string &info, std::function< std::any()> &rateFunc, std::function< bool(SlateInfoBar *)> &destroyFunc, Type type)
Constructor Function.
static void Create(const std::string &info, std::function< std::any()> rateFunc, std::function< bool(SlateInfoBar *)> destroyFunc=nullptr)
Create InfoBar Instance, and registy to Slate.
std::any GetRate()
Get this InfoBar info progress rate.
const std::string & GetInfo()
Get this InfoBar info content.
bool IsDestroy()
Determine if this slate info bar needs to be destroy.
std::string m_Info
this InfoBar info content.
std::function< bool(SlateInfoBar *) m_DestroyFunc)
InfoBar progress destroy function.
This Class defines InfoBar instance.
void Mark(WorldMarkFlags flags)
Mark WorldMarkFlags with flags.
Entity CreateEntity(const std::string &name="None")
Create a new empty entity in this world.
World Class. This class defines the basic behaves of World. When we create an new world,...