mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-12 15:59:54 +02:00
InputText: added comments and somehow clarified the optimized code that calculate text position + updated demo
This commit is contained in:
@ -422,7 +422,18 @@ void ImGui::ShowTestWindow(bool* opened)
|
||||
if (ImGui::TreeNode("Multi-line Text Input"))
|
||||
{
|
||||
static bool read_only = false;
|
||||
static char text[1024*16] = "// F00F bug\nlabel:\n\tlock cmpxchg8b eax\n";
|
||||
static char text[1024*16] =
|
||||
"/*\n"
|
||||
" The Pentium F00F bug, shorthand for F0 0F C7 C8,\n"
|
||||
" the hexadecimal encoding of one offending instruction,\n"
|
||||
" more formally, the invalid operand with locked CMPXCHG8B\n"
|
||||
" instruction bug, is a design flaw in the majority of\n"
|
||||
" Intel Pentium, Pentium MMX, and Pentium OverDrive\n"
|
||||
" processors (all in the P5 microarchitecture).\n"
|
||||
"*/\n\n"
|
||||
"label:\n"
|
||||
"\tlock cmpxchg8b eax\n";
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0,0));
|
||||
ImGui::Checkbox("Read-only", &read_only);
|
||||
ImGui::PopStyleVar();
|
||||
|
Reference in New Issue
Block a user