Dismiss Notice
This Section is READ ONLY - All Posts Are Archived

lua ShroudLoadTexture does not work on MAC

Discussion in 'User Interface (Including Launcher)' started by Feldon Grimshaw, Jan 4, 2020.

Thread Status:
Not open for further replies.
  1. Feldon Grimshaw

    Feldon Grimshaw Avatar

    Messages:
    257
    Likes Received:
    449
    Trophy Points:
    28
    This small shippet of code works fine on windows, but does not work on mac. I couldn't figure out how to attach the image, so just pick any png image and try to use it. (just rename it to black_50.png first).

    Code:
    local _textureIds = {}
    
    function ShroudOnStart()
        print('ShroudOnStart:begin, path: ' .. ShroudLuaPath)
        _textureIds['black_50'] = ShroudLoadTexture(ShroudLuaPath .. '/black_50.png')
        print('ShroudOnStart:end')
    end
    
    function ShroudOnUpdate()
    end
    
    function ShroudOnConsoleInput(type, player, message)
    end
    
    function ShroudOnGUI()
        ShroudGUILabel(150, 100, 100, 25, 'hello world')
        ShroudGUILabel(150, 125, 100, 100, '<size=400><color=#00000088>█</color></size>')
        ShroudDrawTexture(150, 300, 100, 100, _textureIds['black_50'], StretchToFit)
        ShroudGUILabel(150, 450, 100, 25, 'goodbye world')
    end
     
  2. Archer

    Archer Avatar

    Messages:
    285
    Likes Received:
    196
    Trophy Points:
    40
    Location:
    UK, EU, Terra
    This should be in the Lua API forum, could somebody move it please.
     
Thread Status:
Not open for further replies.