Gradient method for bars - Printable Version +- Save-Point (https://www.save-point.org) +-- Forum: Archives (https://www.save-point.org/forum-105.html) +--- Forum: Creation Asylum Archives (https://www.save-point.org/forum-90.html) +---- Forum: Scripts & Code Snippets (https://www.save-point.org/forum-92.html) +----- Forum: RPG Maker XP Code (https://www.save-point.org/forum-93.html) +----- Thread: Gradient method for bars (/thread-6822.html) |
Gradient method for bars - Tsunokiette - 04-05-2006 This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss. No support is given. Using a method I found here to create a gradient, I created a method that allows you to create a gradient bar using 1 or more colors. If using 1 color, it will obviously be a solid color. But if you use 2 or more, it will automaticly calculate the width and gradient for each section creating a gradient using all the colors you supplied in order. Code: class Bitmap I created a simple hp bar using the above script as an example - Code: class Window_Base < Window Get creative! This is the syntax btw (I'm aware of the terrible grammar in this post) Code: self.contents.draw_gradient(x,y,width,height,[color1,color2,color3,color4,etc.]) As for one color, make sure you keep the brackets anyways. |