summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author mahlemiut <bsr@xnet.co.nz>2016-06-11 19:07:09 +1200
committer mahlemiut <bsr@xnet.co.nz>2016-06-11 19:07:57 +1200
commit76629ee6bfd0ed03de92ab95567e6bd1179c7dea (patch)
tree7f2cef2c9c79a2142d3b30daae7f00d8f93824e2
parent0b45a560cde9716050dfbdfee4a709dd80768a37 (diff)
debugimgui: draw a light rectangle around a view if it has focus, gives a visual cue as which view accepts input.
-rw-r--r--src/osd/modules/debugger/debugimgui.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/osd/modules/debugger/debugimgui.cpp b/src/osd/modules/debugger/debugimgui.cpp
index 504899f560a..b935525f8f9 100644
--- a/src/osd/modules/debugger/debugimgui.cpp
+++ b/src/osd/modules/debugger/debugimgui.cpp
@@ -560,6 +560,15 @@ void debug_imgui::draw_view(debug_area* view_ptr, bool exp_change)
xy1.y += fsize.y;
xy2.y += fsize.y;
}
+
+ // draw a rect around a view if it has focus
+ if(view_ptr->has_focus)
+ {
+ ImU32 col = ImGui::ColorConvertFloat4ToU32(ImVec4(0.5f,0.5f,0.5f,0.3f));
+ drawlist->AddRect(ImVec2(view_ptr->ofs_x,view_ptr->ofs_y + ImGui::GetScrollY()),
+ ImVec2(view_ptr->ofs_x + view_ptr->view_width,view_ptr->ofs_y + ImGui::GetScrollY() + view_ptr->view_height),col);
+ }
+
ImGui::PopStyleVar(2);
}
@@ -938,6 +947,7 @@ void debug_imgui::draw_console()
draw_view(view_main_console,false);
ImGui::EndChild();
ImGui::Separator();
+
ImGuiInputTextFlags flags = ImGuiInputTextFlags_EnterReturnsTrue;
if(m_running)
flags |= ImGuiInputTextFlags_ReadOnly;