mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-04 04:00:07 +00:00
Fixed Y scroll aiming when Horizontal Scrollbar is enabled (#665). Tweak log demo.
This commit is contained in:
parent
7096fd8500
commit
e36b41cbd0
2 changed files with 3 additions and 3 deletions
|
|
@ -2464,10 +2464,10 @@ static void ShowExampleAppLog(bool* p_open)
|
|||
{
|
||||
static ExampleAppLog log;
|
||||
|
||||
// Demo fill
|
||||
// Demo: add random items (unless Ctrl is held)
|
||||
static float last_time = -1.0f;
|
||||
float time = ImGui::GetTime();
|
||||
if (time - last_time >= 0.3f)
|
||||
if (time - last_time >= 0.20f && !ImGui::GetIO().KeyCtrl)
|
||||
{
|
||||
const char* random_words[] = { "system", "info", "warning", "error", "fatal", "notice", "log" };
|
||||
log.AddLog("[%s] Hello, time is %.1f, rand() %d\n", random_words[rand() % IM_ARRAYSIZE(random_words)], time, (int)rand());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue