I made a plugin that makes working with NineSlices easy enough to actually be worth while: NineSlice Toolset
Some example usage:
Me no know what NineSlice is
I’m trying to understand what a Nine slice is.
Smooth cornered GUIs?
Allows you to stretch boxes to any scale without distorting the corners. Normally, the corners would stretch along with the image. For example:
Box, unchanged:
This is because the image is divided into 9 parts; 1 for each corner, 1 for each side, and a center. The corners do not scale, while each side only scales in one direction.
A bit more detailed explanation
:
So basically what ROBLOX does for the chat and dialogue? o.o
Nice – I’ll have to check this out. I assume this only works with preset types of frames though.
I had made my own module for this
Crazyman32 beat you to this (pretty much 99% sure), but nice plugin nonetheless.
Really nice… I wonder how long this took and how hard it was. If it were any other scripter I’m sure (s)he would be crying, pulling his/her hair out, praying to lord it would work, and once all finished it is 1,000 lines of code. But, since it’s Stravant probably took him five minutes and 10 lines of code, XD.
You’re a wizard, Stravant!
Cool, I might find a use for this. Your Resize Align and Gap Fill plugins have been far more useful than I had originally anticipated.
Is it called nine-slice or nine-patch? When I was working on Trouble in Christmas Town, Clonetrooper kept saying it was a nine-patch API he was working on.
B-b-b-b-but I did this before you…
EDIT: Stravant, do you know how to scale the stuff once it gets below a certain size? It seems fairly irregular once the scale9frame’s size is less than the image which it uses
For all of you who want some images to play with:
http://www.roblox.com/shadow-outset-item?id=170664288 – this is made to go OVER your frames; there’s some padding to it, I think 4 pixels each side
I’m pretty sure ROBLOX calls these Scale9Frames. Also, I’m pretty sure every game does this, if they want to make easily scalable interfaces.
[quote] Really nice… I wonder how long this took and how hard it was. If it were any other scripter I’m sure (s)he would be crying, pulling his/her hair out, praying to lord it would work, and once all finished it is 1,000 lines of code. But, since it’s Stravant probably took him five minutes and 10 lines of code, XD.
You’re a wizard, Stravant! [/quote]
To be honest, this isn’t actually very hard to do. All you need to do is subtract the width of the borders from the width/height of the frame and position/resize the borders and corners accordingly. It doesn’t take a wizard, or even a professional to do this.
If you know the right method of doing something, then usually, it’s quite simple to do.
But I do want to give credit where credit is due: This is a very nice plugin, and I’ll probably be using it when I want to create pretty edges and corners for my GUIs.