• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

otui problem

poe6man3

Member
Joined
Aug 6, 2020
Messages
94
Solutions
1
Reaction score
13
Can somebody tell me what is wrong about it, i cant figure this out
I have set draggable: true but i cant move it around what am i doing wrong ?


otui code
Lua:
UIWidget
  id: mainwindow
  size: 200 200
  image-source: /images/ui/panel_flat
  draggable: true


Lua


Code:
function init()
    connect(LocalPlayer, {
        onHealthChange = onHealthChange,
        onManaChange = onManaChange })

        ui = g_ui.displayUI('newhealthinfo')
    print("newhealthinfo init")
end

function terminate()
    disconnect(LocalPlayer, {
        onHealthChange = onHealthChange,
        onManaChange = onManaChange })
    print("newhealthinfo terminate")
end

function onHealthChange(localPlayer, health, maxHealth)
    print("Health changed: " .. health .. "/" .. maxHealth)
end

function onManaChange(localPlayer, mana, maxMana)
    print("Mana changed: " .. mana .. "/" .. maxMana)
end
 
Solution
Can somebody tell me what is wrong about it, i cant figure this out
I have set draggable: true but i cant move it around what am i doing wrong ?


otui code
Lua:
UIWidget
  id: mainwindow
  size: 200 200
  image-source: /images/ui/panel_flat
  draggable: true


Lua


Code:
function init()
    connect(LocalPlayer, {
        onHealthChange = onHealthChange,
        onManaChange = onManaChange })

        ui = g_ui.displayUI('newhealthinfo')
    print("newhealthinfo init")
end

function terminate()
    disconnect(LocalPlayer, {
        onHealthChange = onHealthChange,
        onManaChange = onManaChange })
    print("newhealthinfo terminate")
end

function onHealthChange(localPlayer, health, maxHealth)
    print("Health changed: " ...
Can somebody tell me what is wrong about it, i cant figure this out
I have set draggable: true but i cant move it around what am i doing wrong ?


otui code
Lua:
UIWidget
  id: mainwindow
  size: 200 200
  image-source: /images/ui/panel_flat
  draggable: true


Lua


Code:
function init()
    connect(LocalPlayer, {
        onHealthChange = onHealthChange,
        onManaChange = onManaChange })

        ui = g_ui.displayUI('newhealthinfo')
    print("newhealthinfo init")
end

function terminate()
    disconnect(LocalPlayer, {
        onHealthChange = onHealthChange,
        onManaChange = onManaChange })
    print("newhealthinfo terminate")
end

function onHealthChange(localPlayer, health, maxHealth)
    print("Health changed: " .. health .. "/" .. maxHealth)
end

function onManaChange(localPlayer, mana, maxMana)
    print("Mana changed: " .. mana .. "/" .. maxMana)
end
My guess is UIWidget doesn't respond to this, try changing it to MainWindow for example.
 
Solution
Back
Top