| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #include "Base.h"
- #include "lua_FontStyle.h"
- namespace gameplay
- {
- static const char* enumStringEmpty = "";
- static const char* luaEnumString_FontStyle_PLAIN = "PLAIN";
- static const char* luaEnumString_FontStyle_BOLD = "BOLD";
- static const char* luaEnumString_FontStyle_ITALIC = "ITALIC";
- static const char* luaEnumString_FontStyle_BOLD_ITALIC = "BOLD_ITALIC";
- Font::Style lua_enumFromString_FontStyle(const char* s)
- {
- if (strcmp(s, luaEnumString_FontStyle_PLAIN) == 0)
- return Font::PLAIN;
- if (strcmp(s, luaEnumString_FontStyle_BOLD) == 0)
- return Font::BOLD;
- if (strcmp(s, luaEnumString_FontStyle_ITALIC) == 0)
- return Font::ITALIC;
- if (strcmp(s, luaEnumString_FontStyle_BOLD_ITALIC) == 0)
- return Font::BOLD_ITALIC;
- GP_ERROR("Invalid enumeration value '%s' for enumeration Font::Style.", s);
- return Font::PLAIN;
- }
- const char* lua_stringFromEnum_FontStyle(Font::Style e)
- {
- if (e == Font::PLAIN)
- return luaEnumString_FontStyle_PLAIN;
- if (e == Font::BOLD)
- return luaEnumString_FontStyle_BOLD;
- if (e == Font::ITALIC)
- return luaEnumString_FontStyle_ITALIC;
- if (e == Font::BOLD_ITALIC)
- return luaEnumString_FontStyle_BOLD_ITALIC;
- GP_ERROR("Invalid enumeration value '%d' for enumeration Font::Style.", e);
- return enumStringEmpty;
- }
- }
|