small fix

This commit is contained in:
Robert Jelic
2025-04-11 22:37:24 +02:00
parent dae70caa59
commit 8830ab6de6
3 changed files with 8 additions and 8 deletions

View File

@@ -50,11 +50,11 @@ jobs:
rm -rf gh-pages/docs/references rm -rf gh-pages/docs/references
mkdir -p gh-pages/docs/references mkdir -p gh-pages/docs/references
- name: Generate Documentation #- name: Generate Documentation
run: | # run: |
lua tools/generate-docs.lua # lua tools/generate-docs.lua
cp -r build_docs/docs/references/* gh-pages/docs/references/ # cp -r build_docs/docs/references/* gh-pages/docs/references/
# Step 5: Deploy Documentation # Step 5: Deploy Documentation
- name: Deploy Documentation - name: Deploy Documentation

View File

@@ -95,7 +95,7 @@ end
--- @param key number The key that was pressed --- @param key number The key that was pressed
--- @return boolean handled Whether the event was handled --- @return boolean handled Whether the event was handled
--- @protected --- @protected
function Input:key(key) function Input:key(key, held)
if not self.get("focused") then return false end if not self.get("focused") then return false end
local pos = self.get("cursorPos") local pos = self.get("cursorPos")
local text = self.get("text") local text = self.get("text")
@@ -127,7 +127,7 @@ function Input:key(key)
local relativePos = self.get("cursorPos") - self.get("viewOffset") local relativePos = self.get("cursorPos") - self.get("viewOffset")
self:setCursor(relativePos, 1, true, self.get("cursorColor") or self.get("foreground")) self:setCursor(relativePos, 1, true, self.get("cursorColor") or self.get("foreground"))
VisualElement.key(self, key) VisualElement.key(self, key, held)
return true return true
end end

View File

@@ -332,9 +332,9 @@ end
--- @shortDescription Handles a key event --- @shortDescription Handles a key event
--- @param key number The key that was pressed --- @param key number The key that was pressed
--- @protected --- @protected
function VisualElement:key(key) function VisualElement:key(key, held)
if(self.get("focused"))then if(self.get("focused"))then
self:fireEvent("key", key) self:fireEvent("key", key, held)
end end
end end