diff options
| author | Nic Gaffney <gaffney_nic@protonmail.com> | 2024-09-09 15:20:36 -0500 |
|---|---|---|
| committer | Nic Gaffney <gaffney_nic@protonmail.com> | 2024-09-09 15:20:36 -0500 |
| commit | 9aa0015747962429c9f42bc8d75b2447116747a7 (patch) | |
| tree | d8d579cb671b4f2f0d2c3f2e389a5f6043fb4031 /vendor/rlImGui-main/examples/asset_browser/item_views.cpp | |
| parent | ca3fd842c3edd17a922b041e05471875adc64c44 (diff) | |
| download | particle-sim-9aa0015747962429c9f42bc8d75b2447116747a7.tar.gz | |
Changed rlimgui to be a git submodule
Diffstat (limited to 'vendor/rlImGui-main/examples/asset_browser/item_views.cpp')
| -rw-r--r-- | vendor/rlImGui-main/examples/asset_browser/item_views.cpp | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/vendor/rlImGui-main/examples/asset_browser/item_views.cpp b/vendor/rlImGui-main/examples/asset_browser/item_views.cpp deleted file mode 100644 index 0c66a57..0000000 --- a/vendor/rlImGui-main/examples/asset_browser/item_views.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************************* -* -* raylib-extras [ImGui] example - asset browser -* -* This is a more complex ImGui Integration -* It shows how to build windows on top of 2d and 3d views using a render texture -* -* Copyright (c) 2024 Jeffery Myers -* -********************************************************************************************/ - -#include "item_view.h" - -#include "imgui.h" -#include "imgui_utils.h" -#include "rlImGuiColors.h" -#include "raylib.h" - -extern ImFont* IconFont; - -ViewableItem* ListItemView::Show(ViewableItemContainer& container) -{ - ViewableItem* item = container.Reset(); - - ViewableItem* selected = nullptr; - while (item) - { - float x = ImGui::GetCursorPosX(); - - const char* name = TextFormat("###%s", item->Name.c_str()); - if (item->Tint.a > 0) - ImGui::TextColored(rlImGuiColors::Convert(item->Tint), " %s", item->Icon.c_str()); - else - ImGui::Text(" %s", item->Icon.c_str()); - - ImGui::SameLine(0, 0); - ImGui::Text(" %s", item->Name.c_str()); - ImGui::SameLine(0, 0); - - ImGui::SetCursorPosX(x); - //ImGui::SetItemAllowOverlap(); - - ImGui::Selectable(name); - if (ImGui::IsItemHovered() && ImGui::IsMouseDoubleClicked(0)) - { - selected = item; - } - - item = container.Next(); - } - - return selected; -}
\ No newline at end of file |
