2022-02-28 23:04:56 +01:00
|
|
|
#include "gui/components/components.hpp"
|
2022-03-31 00:06:20 +02:00
|
|
|
#include "pointers.hpp"
|
2022-02-28 23:04:56 +01:00
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
bool components::nav_button(const std::string_view text)
|
|
|
|
{
|
|
|
|
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.f, 0.f, 0.f, 0.f));
|
|
|
|
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.f, 0.f, 0.f, 0.f));
|
2022-05-04 19:16:40 +02:00
|
|
|
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0.f, 0.f, 0.f, 0.f));
|
2022-02-28 23:04:56 +01:00
|
|
|
ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, { 0.f, 0.5f });
|
|
|
|
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, { 0, 5 });
|
2022-05-04 19:16:40 +02:00
|
|
|
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, { 0, 2 });
|
|
|
|
ImGui::PushStyleVar(ImGuiStyleVar_ItemInnerSpacing, { 0, 0 });
|
2022-03-31 00:06:20 +02:00
|
|
|
bool result = ImGui::Button(text.data(), {((float)*g_pointers->m_resolution_x * 0.15f) - 30, 0});
|
2022-05-04 19:16:40 +02:00
|
|
|
ImGui::PopStyleVar(4);
|
|
|
|
ImGui::PopStyleColor(3);
|
2022-02-28 23:04:56 +01:00
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|