summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/imgui/imgui.h
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2016-02-21 11:35:58 +0100
committer ImJezze <jezze@gmx.net>2016-02-21 11:35:58 +0100
commitb5daabda5495dea5c50e17961ecfed2ea8619d76 (patch)
treef192bedcd7939c68d40a75a1901239be7f52de07 /3rdparty/bgfx/examples/common/imgui/imgui.h
parente57c90084c5d1dd9f6cdb0bbbf8782dc4f369cda (diff)
parentc24b31a077c2103b27e4df67d3be825c0c7d379d (diff)
Merge remote-tracking branch 'refs/remotes/mamedev/master'
Resolved Conflicts: - src/osd/modules/render/d3d/d3dhlsl.cpp
Diffstat (limited to '3rdparty/bgfx/examples/common/imgui/imgui.h')
-rw-r--r--3rdparty/bgfx/examples/common/imgui/imgui.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/3rdparty/bgfx/examples/common/imgui/imgui.h b/3rdparty/bgfx/examples/common/imgui/imgui.h
index 75269500c85..0ab18cb9f8a 100644
--- a/3rdparty/bgfx/examples/common/imgui/imgui.h
+++ b/3rdparty/bgfx/examples/common/imgui/imgui.h
@@ -208,12 +208,13 @@ bool imguiMouseOverArea();
namespace ImGui
{
-#define IMGUI_FLAGS_NONE UINT16_C(0x0000)
-#define IMGUI_FLAGS_ALPHA_BLEND UINT16_C(0x0001)
+#define IMGUI_FLAGS_NONE UINT8_C(0x00)
+#define IMGUI_FLAGS_ALPHA_BLEND UINT8_C(0x01)
// Helper function for passing bgfx::TextureHandle to ImGui::Image.
inline void Image(bgfx::TextureHandle _handle
- , uint16_t _flags
+ , uint8_t _flags
+ , uint8_t _mip
, const ImVec2& _size
, const ImVec2& _uv0 = ImVec2(0.0f, 0.0f)
, const ImVec2& _uv1 = ImVec2(1.0f, 1.0f)
@@ -221,9 +222,10 @@ namespace ImGui
, const ImVec4& _borderCol = ImVec4(0.0f, 0.0f, 0.0f, 0.0f)
)
{
- union { struct { uint16_t flags; bgfx::TextureHandle handle; } s; ImTextureID ptr; } texture;
- texture.s.flags = _flags;
+ union { struct { bgfx::TextureHandle handle; uint8_t flags; uint8_t mip; } s; ImTextureID ptr; } texture;
texture.s.handle = _handle;
+ texture.s.flags = _flags;
+ texture.s.mip = _mip;
Image(texture.ptr, _size, _uv0, _uv1, _tintCol, _borderCol);
}
@@ -236,12 +238,13 @@ namespace ImGui
, const ImVec4& _borderCol = ImVec4(0.0f, 0.0f, 0.0f, 0.0f)
)
{
- Image(_handle, IMGUI_FLAGS_ALPHA_BLEND, _size, _uv0, _uv1, _tintCol, _borderCol);
+ Image(_handle, IMGUI_FLAGS_ALPHA_BLEND, 0, _size, _uv0, _uv1, _tintCol, _borderCol);
}
// Helper function for passing bgfx::TextureHandle to ImGui::ImageButton.
inline bool ImageButton(bgfx::TextureHandle _handle
- , uint16_t _flags
+ , uint8_t _flags
+ , uint8_t _mip
, const ImVec2& _size
, const ImVec2& _uv0 = ImVec2(0.0f, 0.0f)
, const ImVec2& _uv1 = ImVec2(1.0f, 1.0f)
@@ -250,9 +253,10 @@ namespace ImGui
, const ImVec4& _tintCol = ImVec4(1.0f, 1.0f, 1.0f, 1.0f)
)
{
- union { struct { uint16_t flags; bgfx::TextureHandle handle; } s; ImTextureID ptr; } texture;
- texture.s.flags = _flags;
+ union { struct { bgfx::TextureHandle handle; uint8_t flags; uint8_t mip; } s; ImTextureID ptr; } texture;
texture.s.handle = _handle;
+ texture.s.flags = _flags;
+ texture.s.mip = _mip;
return ImageButton(texture.ptr, _size, _uv0, _uv1, _framePadding, _bgCol, _tintCol);
}
@@ -266,7 +270,7 @@ namespace ImGui
, const ImVec4& _tintCol = ImVec4(1.0f, 1.0f, 1.0f, 1.0f)
)
{
- return ImageButton(_handle, IMGUI_FLAGS_ALPHA_BLEND, _size, _uv0, _uv1, _framePadding, _bgCol, _tintCol);
+ return ImageButton(_handle, IMGUI_FLAGS_ALPHA_BLEND, 0, _size, _uv0, _uv1, _framePadding, _bgCol, _tintCol);
}
} // namespace ImGui