From ad4308fc5378c262d948d779a46d1fd5ab1a95a0 Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Thu, 5 Nov 2020 02:39:12 +0100 Subject: [PATCH] Add helpful placeholder in command dialog --- src/gui/Src/Gui/CommandLineEdit.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/gui/Src/Gui/CommandLineEdit.cpp b/src/gui/Src/Gui/CommandLineEdit.cpp index 53136689..4dd897fb 100644 --- a/src/gui/Src/Gui/CommandLineEdit.cpp +++ b/src/gui/Src/Gui/CommandLineEdit.cpp @@ -275,6 +275,18 @@ void CommandLineEdit::scriptTypeChanged(int index) { mCurrentScriptIndex = index; + // Custom placeholder for the default commands + duint timeWastedDebugging = 0; + BridgeSettingGetUint("Engine", "TimeWastedDebugging", &timeWastedDebugging); + if(index == 0 && timeWastedDebugging < 60 * 60 * 10) + { + setPlaceholderText(tr("Command are comma separated (like assembly instructions): mov eax, ebx")); + } + else + { + setPlaceholderText(QString()); + } + // Force reset autocompletion (blank string) emit textEdited(""); }