Refactor syntax highlighting infrastructure and related classes.
- Moved all language highlighter implementations (`CppHighlighter`, `GoHighlighter`, `JsonHighlighter`, etc.), the engine, and registry to `syntax/`.
This commit is contained in:
17
themes/ThemeHelpers.h
Normal file
17
themes/ThemeHelpers.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef KTE_THEMEHELPERS_H
|
||||
#define KTE_THEMEHELPERS_H
|
||||
|
||||
#include "imgui.h"
|
||||
|
||||
// Small helper to convert packed RGB (0xRRGGBB) + optional alpha to ImVec4
|
||||
static ImVec4
|
||||
RGBA(const unsigned int rgb, float a = 1.0f)
|
||||
{
|
||||
const float r = static_cast<float>(rgb >> 16 & 0xFF) / 255.0f;
|
||||
const float g = static_cast<float>(rgb >> 8 & 0xFF) / 255.0f;
|
||||
const float b = static_cast<float>(rgb & 0xFF) / 255.0f;
|
||||
return {r, g, b, a};
|
||||
}
|
||||
|
||||
|
||||
#endif //KTE_THEMEHELPERS_H
|
||||
Reference in New Issue
Block a user