Added overload for Image to ImGui extension

This commit is contained in:
Simon Lübeß
2021-09-17 13:00:17 +02:00
parent 266d7a4651
commit 45d298b755
2 changed files with 18 additions and 0 deletions
@@ -1,4 +1,6 @@
using GlitchyEngine.Math;
using GlitchyEngine.Renderer;
namespace ImGui
{
extension ImGui
@@ -14,5 +16,7 @@ namespace ImGui
public static bool ColorPicker3(char* label, ref ColorRGBA col, ColorEditFlags flags = (ColorEditFlags) 0) => ColorPicker3Impl(label, *(float[3]*)&col, flags);
public static bool ColorPicker4(char* label, ref ColorRGBA col, ColorEditFlags flags = (ColorEditFlags) 0, float* ref_col = null) => ColorPicker4Impl(label, *(float[4]*)&col, flags, ref_col);
public static extern void Image(Texture2D texture, Vec2 size, Vec2 uv0 = Vec2.Zero, Vec2 uv1 = Vec2.Ones, Vec4 tint_col = Vec4.Ones, Vec4 border_col = Vec4.Zero);
}
}