mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 20:07:32 +00:00
Undo/Redo keys can now be held down.
Implemented throttling intervals for KeyPresets for both first press & all subsequent presses
This commit is contained in:
1 parent
39c768e965
commit
05bb9c0081
2 files changed
+37
-3
No files matched your search
@@ -731,7 +731,7 @@ public class GuiScriptTextArea extends GuiNpcTextField {
|
||||
// UNDO: Restore last edit from undo list
|
||||
// Works in search bar.
|
||||
KEYS.UNDO.setTask(e -> {
|
||||
if (!e.isPress() || !isActive.get() && !searchBar.isVisible())
|
||||
if ((!e.isPress() && !e.isHold()) || !isActive.get() && !searchBar.isVisible())
|
||||
return;
|
||||
|
||||
if (searchBar.hasFocus()) {
|
||||
@@ -753,7 +753,7 @@ public class GuiScriptTextArea extends GuiNpcTextField {
|
||||
// REDO: Restore last undone edit from redo list
|
||||
// Works in search bar.
|
||||
KEYS.REDO.setTask(e -> {
|
||||
if (!e.isPress() || !isActive.get() && !searchBar.isVisible())
|
||||
if ((!e.isPress() && !e.isHold()) || !isActive.get() && !searchBar.isVisible())
|
||||
return;
|
||||
|
||||
if (searchBar.hasFocus()) {
|
||||
|
||||
Reference in new issue
Block a user