attach the WindowBase script to a panel or ui element or something. Also make sure theres just a gameobject in your scene with recttransform with tag of “Border”. the script will build sections of border around the ui element, which you can drag with your mouse to resize the element and stretch it around. Play with the inspector values in the WindowBase to change settings.
Let me know what you guys think
dropbox to zipped project: Dropbox - Error - Simplify your life
i also attached the two scripts to this thread.
NOTE: theres a tiny glitch if you set the style enums to relative, and if you drag to fast the element creeps a few pixels. dont know how to fix it yet. i just wrote this now.
next i want to make it able to be locked to within screen limits (cant move the window to where a part of the panel is off-screen). ill save that for another day though
1861806–119459–WindowBase.cs (23.2 KB)
1861806–119460–WindowBorder.cs (1.1 KB)