Advertisement
Guest User

Quick Move - OpenMW script

a guest
May 10th, 2025
95
0
324 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | Gaming | 0 0
  1. local OMW_UI = require('openmw.interface').UI
  2. local input = require('openmw.input')
  3. local tes3 = require('tes3')
  4.  
  5. local function onFrame(deltaTime)
  6.     tes3.log("Current UI Mode (Local): " .. OMW_UI:getMode()) -- Logging to confirm script is running
  7.  
  8.     local currentMode = OMW_UI:getMode()
  9.  
  10.     if currentMode == "inventory" or currentMode == "container" then
  11.         if input.isMouseButtonPressed(2) then
  12.             local focusedWidget = OMW_UI:getMouseFocus()
  13.             if focusedWidget then
  14.                 tes3.log("Focused Widget Class: " .. focusedWidget:getClass())
  15.                 for key, value in pairs(focusedWidget:getProperties()) do
  16.                     tes3.log("  " .. key .. ": " .. tostring(value))
  17.                 end
  18.             end
  19.         end
  20.     end
  21. end
  22.  
  23. -- Register the onFrame function using the OpenMW way for local scripts
  24. mwscript.register("frame", onFrame)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement