Scrolling: Made it possible for mouse wheel and navigation-triggered scrolling to override a call to SetScrollX()/SetScrollY(), making it possible to use a simpler stateless pattern for auto-scrolling.
Commands.push_back("CLASSIFY");// "classify" is only here to provide an example of "C"+[tab] completing to "CL" and displaying matches.
Commands.push_back("CLASSIFY");// "classify" is only here to provide an example of "C"+[tab] completing to "CL" and displaying matches.
AutoScroll=true;
AutoScroll=true;
ScrollToBottom=true;
ScrollToBottom=false;
AddLog("Welcome to Dear ImGui!");
AddLog("Welcome to Dear ImGui!");
}
}
~ExampleAppConsole()
~ExampleAppConsole()
@ -3470,7 +3470,6 @@ struct ExampleAppConsole
for(inti=0;i<Items.Size;i++)
for(inti=0;i<Items.Size;i++)
free(Items[i]);
free(Items[i]);
Items.clear();
Items.clear();
ScrollToBottom=true;
}
}
voidAddLog(constchar*fmt,...)IM_FMTARGS(2)
voidAddLog(constchar*fmt,...)IM_FMTARGS(2)
@ -3483,8 +3482,6 @@ struct ExampleAppConsole
buf[IM_ARRAYSIZE(buf)-1]=0;
buf[IM_ARRAYSIZE(buf)-1]=0;
va_end(args);
va_end(args);
Items.push_back(Strdup(buf));
Items.push_back(Strdup(buf));
if(AutoScroll)
ScrollToBottom=true;
}
}
voidDraw(constchar*title,bool*p_open)
voidDraw(constchar*title,bool*p_open)
@ -3513,8 +3510,7 @@ struct ExampleAppConsole
if(ImGui::SmallButton("Add Dummy Text")){AddLog("%d some text",Items.Size);AddLog("some more text");AddLog("display very important message here!");}ImGui::SameLine();
if(ImGui::SmallButton("Add Dummy Text")){AddLog("%d some text",Items.Size);AddLog("some more text");AddLog("display very important message here!");}ImGui::SameLine();
if(ImGui::SmallButton("Add Dummy Error")){AddLog("[error] something went wrong");}ImGui::SameLine();
if(ImGui::SmallButton("Add Dummy Error")){AddLog("[error] something went wrong");}ImGui::SameLine();