mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Basic Utf8 support
This commit is contained in:
parent
f9f53eb97b
commit
8847de545a
2 changed files with 34 additions and 22 deletions
|
@ -405,28 +405,24 @@ namespace IDE.ui
|
|||
|
||||
float offset = GS!(20);
|
||||
|
||||
// TODO(FUZZY): this is not unicode compatible
|
||||
for(int i < mEntryDisplay.Length)
|
||||
int index = 0;
|
||||
for(char32 c in mEntryDisplay.DecodedChars)
|
||||
loop:
|
||||
{
|
||||
char8 c = mEntryDisplay[i];
|
||||
|
||||
if(mMatchIndices.Contains((uint8)i))
|
||||
if(mMatchIndices.Contains((uint8)index))
|
||||
{
|
||||
g.PushColor(.Blue);
|
||||
}
|
||||
else
|
||||
{
|
||||
g.PushColor(.White);
|
||||
g.PushColor(DarkTheme.COLOR_MENU_FOCUSED);
|
||||
defer:loop g.PopColor();
|
||||
}
|
||||
|
||||
g.DrawString(.(&c, 1), offset, 0);
|
||||
let str = StringView(mEntryDisplay, index, @c.NextIndex - index);
|
||||
|
||||
offset += IDEApp.sApp.mCodeFont.GetWidth(.(&c, 1));
|
||||
g.DrawString(str, offset, 0);
|
||||
|
||||
g.PopColor();
|
||||
offset += IDEApp.sApp.mCodeFont.GetWidth(str);
|
||||
|
||||
index = @c.NextIndex;
|
||||
}
|
||||
|
||||
//g.DrawString(mEntryDisplay, GS!(20), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue