Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local OMW_UI = require('openmw.interface').UI
- local input = require('openmw.input')
- local tes3 = require('tes3')
- local function onFrame(deltaTime)
- tes3.log("Current UI Mode (Local): " .. OMW_UI:getMode()) -- Logging to confirm script is running
- local currentMode = OMW_UI:getMode()
- if currentMode == "inventory" or currentMode == "container" then
- if input.isMouseButtonPressed(2) then
- local focusedWidget = OMW_UI:getMouseFocus()
- if focusedWidget then
- tes3.log("Focused Widget Class: " .. focusedWidget:getClass())
- for key, value in pairs(focusedWidget:getProperties()) do
- tes3.log(" " .. key .. ": " .. tostring(value))
- end
- end
- end
- end
- end
- -- Register the onFrame function using the OpenMW way for local scripts
- mwscript.register("frame", onFrame)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement