Commit Graph
201 Commits
Author SHA1 Message Date
KAMKEEL a028142dda Fix mouse wheel scrolling in the script editors
Mouse.getDWheel() clears the accumulated delta, so whichever widget polled it
first in a frame took it and every later reader saw zero. The script text areas
polled it themselves, after the parent screen had already drained it for its
scroll lists, so the wheel did nothing in the player, NPC and event script GUIs.
The screen now reads the wheel once per frame into the mouseScroll field it
already declared for this, and each widget zeroes it when it consumes it.
2026-08-11 05:08:15 -04:00
bigguy345 a3c7398628 Whole buncha ergonomic hover info tweaks 2026-03-13 05:52:41 +02:00
bigguy345 f1f3b17402 Correctly calculated new font width throughout script editor endpoints (for italics/bold) 2026-03-13 03:00:54 +02:00
bigguy345 254655cb1d Improved <> formatting and auto insertion 2026-03-13 02:46:16 +02:00
bigguy345 05c27c5d20 Added cursor caret color to editor color scheme 2026-03-12 06:57:38 +02:00
bigguy345 88d496137a SCRIPT EDITOR COLOR SCHEMES (W.I.P 2026-03-12 04:53:27 +02:00
bigguy345 57128a8d8b Fixed various formatting line wrap bugs 2026-03-11 10:53:32 +02:00
bigguy345 4ddb6d32f3 Added lambda brace auto-complete 2026-03-11 05:30:36 +02:00
bigguy345 cddd6cfe57 Fixed:
1) Nested Brace Auto-Completion
2) Backspace on Empty Lines
3) Shift+Tab Mid-Line
2026-03-11 04:09:47 +02:00
bigguy345 69f9d218ca Rewrote all GuiScriptTextArea scissoring logic to handle new panning 2026-03-09 09:57:21 +02:00
bigguy345 36c2326466 Fixed the accursed backspace/enter tab multiplication bug 2026-03-05 02:36:19 +02:00
bigguy345 0b9abf2a57 Made Autocomplete panel pannable and resizable 2026-03-05 01:52:18 +02:00
bigguy345 c537a09ad1 Made Hover Info resizable via handle at bottom right 2026-03-05 01:17:22 +02:00
bigguy345 b9b1b0725a JSDoc hover tooltip improvements: fix scissor clip, remove trailing whitespace, balance code block padding, support multi-resolution wrapping, add tooltip panning
- Trim trailing blank lines from JSDoc descriptions to remove extra bottom space
- Add tooltip panning: drag M1 anywhere on tooltip panel body to reposition it freely
2026-03-05 00:35:25 +02:00
bigguy345 2578ce1cf6 feat(hover): wire tooltip scrollbar drag into GuiScriptTextArea input handling
- drawTextBox: update scrollbar drag each frame via Mouse.isButtonDown(0),
  release drag when button lifted (mirrors existing ScrollState pattern)
- mouseClicked: intercept LMB on tooltip scrollbar thumb before text interaction

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-04 22:56:10 +02:00
bigguy345 58f86058d4 feat(hover): scrollbar drag/hover-highlight, smooth scroll, compact blank-line spacing
- HoverState: add smooth-scroll lerp (updateSmoothScroll, targetScrollOffset),
  scrollbar thumb bounds (setScrollbarThumb), click/drag/release state methods,
  and fix broken scrollTooltip/getTooltipScrollOffset/resetTooltipScroll methods
  that referenced the deleted int field
- TokenHoverRenderer: call updateSmoothScroll each frame; store thumb bounds
  for drag+hover detection; highlight thumb on hover/drag; reduce empty
  DocumentationLine height from lineHeight+LINE_SPACING to lineHeight/2

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-04 22:54:38 +02:00
bigguy345 f1d902849e Smart auto-pair insertion/skip-over for (), [], "" and '' in GuiScriptTextArea 2026-02-25 13:52:47 +02:00
bigguy345 2ca145b264 Fixed auto {} brace insertion not respecting existing } that has different indent/whitespaces 2026-02-25 13:04:07 +02:00
bigguy345 a107e045eb Suppress redundant bracket pair generation in script editor and adjusted JSDoc Enter behavior 2026-02-24 21:19:30 +02:00
bigguy345 53f06ab388 Properly sanitized pasted text from trailing spaces at end of line, fixes forced soft-wrap when too many consecutive trailing spaces 2026-02-24 20:18:45 +02:00
bigguy345 98351bbc3c dev merge 2026-02-03 04:25:16 +02:00
Kam 1b8ad4dd90 Player Abilities 2026-01-30 05:01:54 -05:00
bigguy345 235fd3b3f3 Improved comment/string excluded range detection for auto-pair insertion 2026-01-26 21:52:04 +02:00
bigguy345 ea8cc51eef Prevented auto pair insertion of '', "", [], () blocks in excluded ranges (comments,strings) 2026-01-26 19:19:58 +02:00
bigguy345 ce7566e498 CTRL + Click on fields/methods/type to go to definition 2026-01-26 19:09:40 +02:00
bigguy345 1863038019 Atomic UNDO/REDO for all typed text (operates on entire words at once, not just characters) 2026-01-26 19:09:00 +02:00
bigguy345 8b5d3a2077 Copy with no selection now copies whole line, and pastes to a new line 2026-01-26 19:08:06 +02:00
bigguy345 940dc01a7c DELETE_LINE, MOVE_LINE_UP and MOVE_LINE_DOWN KeyPresets 2026-01-26 19:05:32 +02:00
bigguy345 720d0dc1b9 On Autocomplete insertion, set cursor carat inside () if method has parameters 2026-01-26 19:01:54 +02:00
bigguy345 8fa22e1e60 Moved fullscreen button mouseClicked into GuiScriptTextArea 2026-01-26 04:56:42 +02:00
bigguy345 aae2fdb23a Added DataScript global definitions i.e. npc, world, event to syntax highlighter as global vars 2026-01-26 03:49:38 +02:00
bigguy345 d3f06f8866 Reverted hook list scroll fix (cause it works fine without it) 2026-01-23 20:11:59 +02:00
bigguy345 96239118e7 OMG janino-scripts-final merge 2026-01-23 19:01:56 +02:00
Kam a9b602713c Large Cleanup to Code Imports and Formatting 2026-01-22 23:07:38 -05:00
Kam 31aac0d6b3 GUI fixes and small bug fixes to Script GUIs, Overlay GUI, etc 2026-01-22 22:52:04 -05:00
bigguy345 26a9c99000 All Imports used in JaninoScript implementations (param types/return types) are now passed implicitly to ScriptDocument to store for when hook stubs are generated/hooks are manually added 2026-01-14 03:02:15 +02:00
bigguy345 21e05575ad merge conflicts 2026-01-14 00:30:25 +02:00
bigguy345 0a33f7dd12 Merge branch 'janino-scripts' into syntax-highlighter-unified
# Conflicts:
#	src/main/java/noppes/npcs/blocks/tiles/TileScripted.java
#	src/main/java/noppes/npcs/client/gui/GuiScript.java
#	src/main/java/noppes/npcs/client/gui/script/GuiJaninoScript.java
#	src/main/java/noppes/npcs/client/gui/script/GuiScriptEffect.java
#	src/main/java/noppes/npcs/client/gui/script/GuiScriptInterface.java
#	src/main/java/noppes/npcs/client/gui/script/GuiScriptLinkedItem.java
#	src/main/java/noppes/npcs/client/gui/script/GuiScriptPlayers.java
#	src/main/java/noppes/npcs/client/gui/script/GuiScriptRecipe.java
#	src/main/java/noppes/npcs/controllers/data/DataScript.java
#	src/main/java/noppes/npcs/controllers/data/EffectScript.java
#	src/main/java/noppes/npcs/controllers/data/ForgeDataScript.java
#	src/main/java/noppes/npcs/controllers/data/GlobalNPCDataScript.java
#	src/main/java/noppes/npcs/controllers/data/IScriptHandler.java
#	src/main/java/noppes/npcs/controllers/data/IScriptUnit.java
#	src/main/java/noppes/npcs/controllers/data/LinkedItemScript.java
#	src/main/java/noppes/npcs/controllers/data/PlayerDataScript.java
#	src/main/java/noppes/npcs/controllers/data/RecipeScript.java
#	src/main/java/noppes/npcs/janino/JaninoScript.java
#	src/main/java/noppes/npcs/scripted/item/ScriptCustomItem.java
2026-01-14 00:28:11 +02:00
bigguy345 1df05406c8 Imported temp place holders from syntax-highlighter-unified 2026-01-13 19:08:29 +02:00
Kam 71dba15270 Add Script Context and better parsing for d.ts handling 2026-01-13 19:02:52 +02:00
Kam 78f7fa65f1 Add Script Context and better parsing for d.ts handling 2026-01-09 22:59:13 -05:00
bigguy345 4726c23ba1 Got refactoring func param name working for JSDoc param name 2026-01-06 02:26:27 +02:00
bigguy345 5720b3a081 Added @type JSDOC stub auto generation for fields 2026-01-05 05:42:12 +02:00
bigguy345 35ca7ca479 Completely functional JSDoc parsing/stub auto generation for functions and field types, parameters and their return types, and function return types 2026-01-05 05:07:50 +02:00
bigguy345 f8802114b5 Fixed indexOutOfbounds crash 2026-01-04 23:33:56 +02:00
bigguy345 ac92210771 Implemented AUTO IMPORT SUGGESTION COMPLETIONS 2026-01-04 03:59:51 +02:00
bigguy345 ff7fbd411d Smart tab completion: replace till next separator 2026-01-04 02:39:27 +02:00
bigguy345 9886dae519 Moved fullScreenButton rendering into GuiScriptTextArea 2026-01-04 02:13:33 +02:00
bigguy345 ef51f4acd8 Fixed buttons drawn under AutoComplete drop down being clickable through it 2026-01-04 01:56:13 +02:00
bigguy345 b42cd4d1a3 Dismissed AutoCompleteManager on gui init/window resize 2026-01-04 01:02:47 +02:00