add xxxx_nonUDT2 functions returning UDT_Simple

This commit is contained in:
sonoro1234
2018-09-05 13:45:16 +02:00
parent d47cbcb44a
commit 7afdf07cbb
12 changed files with 889 additions and 34 deletions

View File

@@ -32,8 +32,32 @@ typedef unsigned __int64 ImU64;
typedef unsigned long long ImU64;
#endif
//struct GLFWwindow;
//struct SDL_Window;
//UDT stuff
typedef struct ImVec2_Simple { float x; float y; } ImVec2_Simple;
typedef struct ImVec4_Simple { float x; float y; float z; float w;} ImVec4_Simple;
typedef struct ImColor_Simple { ImVec4_Simple Value;} ImColor_Simple;
inline ImVec2_Simple ImVec2ToSimple(ImVec2 vec)
{
ImVec2_Simple result;
result.x = vec.x;
result.y = vec.y;
return result;
}
inline ImVec4_Simple ImVec4ToSimple(ImVec4 vec)
{
ImVec4_Simple result;
result.x = vec.x;
result.y = vec.y;
result.z = vec.z;
result.w = vec.w;
return result;
}
inline ImColor_Simple ImColorToSimple(ImColor col)
{
ImColor_Simple result;
result.Value = ImVec4ToSimple(col.Value);
return result;
}
#ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS
#include "imgui_structs.h"