mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-29 08:17:59 +03:00
Add comments
This commit is contained in:
parent
b47fdd851e
commit
1cde8d5001
1 changed files with 11 additions and 2 deletions
|
@ -29,6 +29,7 @@ private:
|
||||||
friend class StringsHandler;
|
friend class StringsHandler;
|
||||||
friend class DisplayString;
|
friend class DisplayString;
|
||||||
|
|
||||||
|
// Members
|
||||||
std::string _key = {};
|
std::string _key = {};
|
||||||
Vec2 _position = Vec2(0, 0);
|
Vec2 _position = Vec2(0, 0);
|
||||||
float _scale = 1.0f;
|
float _scale = 1.0f;
|
||||||
|
@ -41,6 +42,7 @@ private:
|
||||||
bool _isTranslated = false;
|
bool _isTranslated = false;
|
||||||
bool _deleteWhenZero = false;
|
bool _deleteWhenZero = false;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
UserDisplayString() = default;
|
UserDisplayString() = default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -55,27 +57,34 @@ using GetItemCallback = std::function<std::optional<std::reference_wrapper<User
|
||||||
class DisplayString
|
class DisplayString
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
// Members
|
||||||
DisplayStringID _id = 0;
|
DisplayStringID _id = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static void Register(sol::table& parent);
|
static void Register(sol::table& parent);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
DisplayString();
|
DisplayString();
|
||||||
|
|
||||||
|
// Destructors
|
||||||
~DisplayString();
|
~DisplayString();
|
||||||
|
|
||||||
|
// Getters
|
||||||
DisplayStringID GetID() const;
|
DisplayStringID GetID() const;
|
||||||
std::string GetKey() const;
|
std::string GetKey() const;
|
||||||
Vec2 GetPos() const;
|
Vec2 GetPos() const;
|
||||||
float GetScale() const;
|
float GetScale() const;
|
||||||
ScriptColor GetColor() const;
|
ScriptColor GetColor() const;
|
||||||
|
|
||||||
void SetKey(const std::string&);
|
// Setters
|
||||||
|
void SetKey(const std::string& key);
|
||||||
void SetPosition(const Vec2& pos);
|
void SetPosition(const Vec2& pos);
|
||||||
void SetScale(float scale);
|
void SetScale(float scale);
|
||||||
void SetColor(const ScriptColor&);
|
void SetColor(const ScriptColor&);
|
||||||
void SetTranslated(bool isTranslated);
|
void SetTranslated(bool isTranslated);
|
||||||
void SetFlags(const sol::table&);
|
void SetFlags(const sol::table& flags);
|
||||||
|
|
||||||
|
// Routines
|
||||||
static SetItemCallback SetItemCallbackRoutine;
|
static SetItemCallback SetItemCallbackRoutine;
|
||||||
static RemoveItemCallback RemoveItemCallbackRoutine;
|
static RemoveItemCallback RemoveItemCallbackRoutine;
|
||||||
static GetItemCallback GetItemCallbackRoutine;
|
static GetItemCallback GetItemCallbackRoutine;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue