Need help with ui and windows

  • nuuu_
    21st September Member 0 Permalink

    I have an idea to create a mod to help with layering, and I want it to have it in a litttle window that can be dragged around similar to photo editing software.

     

    The multiplayer mod seems to do exactly what I need. But I can't figure how to achieve that.

     

    Currently I have a simple script that opens a window adds a close button to the top right and a title.

    This uses the interface api and can't be dragged, and closes when the outside of it is clicked.

     

    Any suggestions?

  • jacob1
    22nd September Developer 1 Permalink
    The interface api can only do what TPT's interface is capable of. And TPT has no draggable windows.

    TPTMP (and script manager btw) each have their own custom UI library written for them. It does everything by hand, using the graphics api to draw text and lines on screen, and the event api to listen for mousedown/mousemove events. Plenty of other things too. They each had their own custom requirements for why the interface api didn't work, so that's why they made their own UI libraries. Neither of them uses the interface api for anything.

    It's your first script, I really don't recommend going the same route as them. It's a lot of work. If you're really bold I guess you could try though.