fix hex to u32
This commit is contained in:
@@ -21,6 +21,6 @@
|
|||||||
#define VE_NO_NAME(n) VE::func::name(n).data()
|
#define VE_NO_NAME(n) VE::func::name(n).data()
|
||||||
#define VE_NAME(n) VE::func::name(n, "").data()
|
#define VE_NAME(n) VE::func::name(n, "").data()
|
||||||
|
|
||||||
#define VE_COLOR(c, t) VE::func::color(c, t)
|
#define VE_COLOR(c, t) VE::func::colorU32(c, t)
|
||||||
|
|
||||||
#define VE_GLGETSTRING(n) reinterpret_cast<const char*>(glGetString(n))
|
#define VE_GLGETSTRING(n) reinterpret_cast<const char*>(glGetString(n))
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace VE::func
|
|||||||
return key_no_name + n;
|
return key_no_name + n;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline ImU32 color(std::string hex, unsigned char alpha = 255)
|
inline ImU32 colorU32(std::string hex, unsigned char alpha = 255)
|
||||||
{
|
{
|
||||||
if (hex[0] == '#') hex.erase(0, 1);
|
if (hex[0] == '#') hex.erase(0, 1);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user