Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] - [2D][MatrixUtils] RPG Menu Rounded Rectangles

Author
Message
Mr909
11
Years of Service
User Offline
Joined: 2nd Jun 2012
Location:
Posted: 20th Oct 2012 23:49 Edited at: 20th Oct 2012 23:51
A rather simplistic code, this allows you to create the rounded rectangles often used in such RPG Menus as Final Fantasy and Chrono Trigger, back in the early days.

It doesn't actually draw a rounded rectangle from scratch, rather it generates four circles, the overlapping rectangles, and adds lines on the outside.

"crc" is the "roundness" of the edge. Depending on your project, you may want to set this parameter to a default of some kind.

At the moment it always draws them in blue with a white outline, feel free to change as you will.

If you ever use it, please credit me. Also link to your project because I'd be THRILLED to see it.

For the adventurous semi-newbie, you might want to try to blend this will my RPG Progress Bars to create expanding boxes.

EDIT: One last little thing- due to the way the boxes are drawn, some smaller boxes won't work for certain values of crc. There is no real way to rectify this except by lowering your crc value. Sorry.

Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 4th Nov 2012 23:23
I tried your snippet, but I don't have matrixUtils installed apparently. (not all of them anyway)


This won't fill a rounded box, but it'll make an outline of one with alpha AA.
http://forum.thegamecreators.com/?m=forum_view&t=171529&b=6

"You're not going crazy. You're going sane in a crazy world!" ~Tick
Mr909
11
Years of Service
User Offline
Joined: 2nd Jun 2012
Location:
Posted: 4th Nov 2012 23:52
Thanks for the tip. Mine's quick-n-dirty, good for things that don't do much, but yours is definitely better.

Login to post a reply

Server time is: 2024-02-26 01:42:02
Your offset time is: 2024-02-26 01:42:02