void ShaderEditor::SetAStyle(int style, Scintilla::ColourDesired fore, Scintilla::ColourDesired back, int size, const char *face) { WndProc(SCI_STYLESETFORE, style, (sptr_t)fore.AsLong()); WndProc(SCI_STYLESETBACK, style, (sptr_t)back.AsLong()); if (size >= 1) WndProc(SCI_STYLESETSIZE, style, size); if (face) WndProc(SCI_STYLESETFONT, style, reinterpret_cast<sptr_t>(face)); }
static void fillRectangle(Scintilla::PRectangle _rc, Scintilla::ColourDesired _color) { const uint32_t abgr = (uint32_t)_color.AsLong(); ImVec2 pos = ImGui::GetCursorScreenPos(); ImDrawList* drawList = ImGui::GetWindowDrawList(); drawList->AddDrawCmd(); drawList->AddRectFilled( ImVec2(_rc.left + pos.x, _rc.top + pos.y) , ImVec2(_rc.right + pos.x, _rc.bottom + pos.y) , abgr ); }