mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 14:44:19 -06:00
Added code for deactivating of search toolbar item
+ invalidated its unused callbacks. + ImGui::Selectable function is copied to InGuiWrapper.cpp and a little beat modified to change a label text, when item is hovered
This commit is contained in:
parent
042880ba2d
commit
67c55c7490
5 changed files with 173 additions and 12 deletions
|
@ -100,6 +100,9 @@
|
|||
|
||||
namespace ImGui
|
||||
{
|
||||
// Special ASCII character is used here as markup symbols for tokens to be highlighted as a for hovered item
|
||||
const char ColorMarkerHovered = 0x1; // STX
|
||||
|
||||
// Special ASCII characters STX and ETX are used here as markup symbols for tokens to be highlighted.
|
||||
const char ColorMarkerStart = 0x2; // STX
|
||||
const char ColorMarkerEnd = 0x3; // ETX
|
||||
|
|
|
@ -2993,6 +2993,13 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col
|
|||
unsigned int vtx_current_idx = draw_list->_VtxCurrentIdx;
|
||||
|
||||
ImU32 defaultCol = col;
|
||||
ImU32 highlighCol = ImGui::GetColorU32(ImGuiCol_ButtonHovered);
|
||||
|
||||
// if text is started with ColorMarkerHovered symbol, we should use another color for a highlighting
|
||||
if (*s == ImGui::ColorMarkerHovered) {
|
||||
highlighCol = ImGui::GetColorU32(ImGuiCol_FrameBg);
|
||||
s += 1;
|
||||
}
|
||||
|
||||
while (s < text_end)
|
||||
{
|
||||
|
@ -3023,7 +3030,7 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col
|
|||
}
|
||||
|
||||
if (*s == ImGui::ColorMarkerStart) {
|
||||
col = ImGui::GetColorU32(ImGuiCol_ButtonHovered);
|
||||
col = highlighCol;
|
||||
s += 1;
|
||||
}
|
||||
else if (*s == ImGui::ColorMarkerEnd) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue