mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Added overload for Image to ImGui extension
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
using GlitchyEngine.Renderer;
|
||||
|
||||
namespace ImGui
|
||||
{
|
||||
using internal GlitchyEngine.Renderer;
|
||||
|
||||
extension ImGui
|
||||
{
|
||||
public static override void Image(Texture2D texture, Vec2 size, Vec2 uv0 = Vec2.Zero, Vec2 uv1 = Vec2.Ones, Vec4 tint_col = Vec4.Ones, Vec4 border_col = Vec4.Zero)
|
||||
{
|
||||
ImGui.Image(texture.nativeResourceView, size, uv0, uv1, tint_col, border_col);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user