打开文件可视化窗口+CodeStudio代码高亮

This commit is contained in:
2026-03-02 21:42:44 +08:00
parent 5c952e7861
commit 29a68b4ca9
8 changed files with 550 additions and 47 deletions

View File

@@ -19,6 +19,11 @@ namespace CMLeonOS.Gui.UILib
internal Action Submitted;
internal Action Changed;
internal virtual void RenderLine(int lineIndex, string lineText, int lineY, int xOffset)
{
DrawString(lineText, Foreground, xOffset, lineY);
}
internal string Text
{
get
@@ -355,7 +360,8 @@ namespace CMLeonOS.Gui.UILib
if (i < lines.Count)
{
DrawString(Shield ? new string('*', lines[i].Length) : lines[i], Foreground, -scrollX, lineY);
string lineText = Shield ? new string('*', lines[i].Length) : lines[i];
RenderLine(i, lineText, lineY, -scrollX);
if (caretLine == i)
{