Open HuaChenDu opened 2 months ago
I attempt to solve using the mindset of C++ code, or to display???
You need to do something like what is described here: https://github.com/ImGuiNET/ImGui.NET/issues/67
You need to do something like what is described here: #67 I still don't understand. Could you teach me how to modify my code? my code: namespace ImGuiNET { public class Program : Overlay { bool checkBoxValue = false; int loveMeter = 0; string input = ""; string input2 = ""; bool showWindow = true;
protected override void Render()
{
ImGui.Begin("XuanYuFuZhu", ref checkBoxValue);
string chineseText = "这里显示中文";
ImGui.Text(chineseText);
if (!showWindow)
{
System.Environment.Exit(0);
}
}
public void CloseWindowAndExit()
{
showWindow = false;
}
public static void Main(string[] args)
{
Program program = new Program();
program.Start().Wait();
}
}
}
You need to do something like what is described here: #67
![Uploading 屏幕截图 2024-04-24 164844.png…]() Thank you very much for your help. After 2 days of trial and error, I added this line 'ImGui.CreateContext();' on top of the method you provided, and now it can display Chinese characters.
Can you provide the code? Thanks!
Resolving the issue of UTF-8 strings displaying as '??????'