A downloadable asset pack

Download NowName your own price

Update: Since GameMaker's latest version allows you to now natively build nine-slices, this code is somewhat obsolete! I have made this asset free to purchase for anyone using older versions such as 1.x, or anyone simply interested in the code.

Create boxes of arbitrary size based on any sprite partitioned into 9 even segments.

Sprites with minimum edge & center detail can use the "stretch" version to achieve precise / animated results.

Just two basic scripts, check out my free tutorial video and learn how to put this together yourself, avoiding any need to buy! (But if you liked it and the work I do, maybe consider buying it or supporting my work on Patreon!)

Rated 4.7 out of 5 stars
(3 total ratings)
Made withGameMaker
Tags9slice, boxes, GameMaker, Graphical User Interface (GUI), nineslice, script, User Interface (UI)


Download NowName your own price

Click download now to get access to the following files:

GMS2 Project 31 kB
NineSliceBox.gml 1 kB
NineSliceBox_stretch.gml 1 kB
ExampleSprite.png 277 bytes


Log in with itch.io to leave a comment.

Is it possible to use this in the GUI layer somehow?

sure just call it in the draw gui event.