Minor Update - Fix Warning + Add texture in the object inspector
Feat : + Show the texture of the object in the Object Window Fix : - No warning for now...
This commit is contained in:
@@ -106,6 +106,7 @@ void imguiManager::WidgetObjectWindow(ApplicationClass* app)
|
||||
{
|
||||
ImGui::Begin("Objects", &showObjectWindow);
|
||||
int index = 0;
|
||||
int count = 0;
|
||||
for (auto& object : app->GetKobjects())
|
||||
{
|
||||
std::string headerName = object->GetName() + " " + std::to_string(index);
|
||||
@@ -139,6 +140,21 @@ void imguiManager::WidgetObjectWindow(ApplicationClass* app)
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
// Texture
|
||||
std::string textureLabel = "Texture##" + std::to_string(index);
|
||||
ID3D11ShaderResourceView* texture = object->GetTexture(0);
|
||||
if (texture != nullptr)
|
||||
{
|
||||
if (ImGui::ImageButton((ImTextureID)texture, ImVec2(64, 64)))
|
||||
{
|
||||
count++;
|
||||
|
||||
}
|
||||
}
|
||||
ImGui::Text("Texture count: %d", count);
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
// Delete button
|
||||
std::string deleteLabel = "Delete##" + std::to_string(index);
|
||||
if (ImGui::Button(deleteLabel.c_str()))
|
||||
|
||||
Reference in New Issue
Block a user