2023-04-21 11:55:36 +02:00
|
|
|
# define IMGUI_DEFINE_MATH_OPERATORS
|
2024-03-03 20:22:06 +01:00
|
|
|
# include "widgets.h"
|
2023-04-21 11:55:36 +02:00
|
|
|
# include <imgui_internal.h>
|
|
|
|
|
|
|
|
void ax::Widgets::Icon(const ImVec2& size, IconType type, bool filled, const ImVec4& color/* = ImVec4(1, 1, 1, 1)*/, const ImVec4& innerColor/* = ImVec4(0, 0, 0, 0)*/)
|
|
|
|
{
|
|
|
|
if (ImGui::IsRectVisible(size))
|
|
|
|
{
|
|
|
|
auto cursorPos = ImGui::GetCursorScreenPos();
|
|
|
|
auto drawList = ImGui::GetWindowDrawList();
|
|
|
|
ax::Drawing::DrawIcon(drawList, cursorPos, cursorPos + size, type, filled, ImColor(color), ImColor(innerColor));
|
|
|
|
}
|
|
|
|
|
|
|
|
ImGui::Dummy(size);
|
|
|
|
}
|
|
|
|
|