IntoWindow 2 (Now easily customizable)!
Posted: Sun Mar 28, 2010 3:07 pm
Alright everyone, no more need to use images for windows, that's long and gone, because this new CanvasWindow thing is fully customizable.
What I'm working on now for version 3:
Ability to choose the transparency of both the inside, and the border of the window.
The ability to choose between round corners, and sharp corners.
The ability to choose the border color as well,
A more entertaining customization kit, (If you dont have the "data1.dra" file, it'll introduce you and explain how to make one)
Screenshots
Download Customization kit, and "data1.dra" file.
Contents of "Read Me.txt"
What I'm working on now for version 3:
Ability to choose the transparency of both the inside, and the border of the window.
The ability to choose between round corners, and sharp corners.
The ability to choose the border color as well,
A more entertaining customization kit, (If you dont have the "data1.dra" file, it'll introduce you and explain how to make one)
Screenshots
Download Customization kit, and "data1.dra" file.
Contents of "Read Me.txt"
- Code: Select all
+-=-=-=-=-=-=-=-=-=-=-=-=+
|IntoWindow version 2 |
+-=-=-=-=-=-=-=-=-=-=-=-=+
| Thank you for |
| downloading |
| |
| |
+-=-=-=-=-=-=-=-=-=-=-=-=+
+-=-=-=-=-=-=-=-=-=-=-=-=+
| IntoWindow by Craig |
| Ramsey, no credit |
| is needed. |
| |
| |
+-=-=-=-=-=-=-=-=-=-=-=-=+
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
| INSTRUCTIONS |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
| Customizing Window |
| |
| Customizing the window is as easy as |
| opening the Config_Window file and |
| editing the R, G, B coloring. |
| |
| ---------------------------------------- |
| |
| Loading my newly saved "data1.dra" |
| |
| If your loading data1.dra from scratch: |
| |
| After you save your file, you'll want to |
| be able to load it, right? It's as easy |
| as making 3 variables, (Case sensitive) |
| R, G, and B. These variables are Integer |
| and Global, they must have the save |
| group called Data_1. After you've gotten |
| that, go to any actor (I just use view), |
| and type in |
| +-=-=-=-=-=-=-=-Code=-=-=-=-=-=-=-=+ |
| |loadVars("data1.dra", "Data_1"); | |
| +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+ |
| |
| ---------------------------------------- |
| |
| Using this in your game |
| |
| The global code needed for this is in |
| the ged file "Example.ged", but if you |
| dont wan't to use that, you can copy the |
| global code from the bottom of this help |
| file. |
| |
| ---------------------------------------- |
| |
| IntoWindowCustom |
| |
| This command allows you to make a window |
| without using a data1.dra file, you |
| customize the window color right inside |
| of the function. |
| |
| To use this command, simply type this in |
| create actor. (Draw actor will cause |
| lag on some computers) |
| +-=-=-=-=-=-=-=-Code=-=-=-=-=-=-=-=+ |
| |IntoWindowCustom(28, 28, 149); | |
| +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+ |
| |
| Now your window will be drawn with that |
| color. |
| |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
| GLOBAL CODE |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
//Draw the window//
void IntoWindow()
{
int line;
erase(255, 255, 255, .99);
for (line=3;line<height-3;line++)
{
setpen(R+(line/4), G+(line/4), B+(line/4), .30, 1);
moveto(3, line);
lineto(width-3, line);
}
setpen(255, 255, 255, 0, 2);
moveto(3, 2);
lineto(width-3, 2);
setpen(255, 255, 255, 0, 2);
moveto(2, 4);
lineto(2, height-3);
moveto(3, height-2);
lineto(width-3, height-2);
moveto(width-2, height-3);
lineto(width-2, 3);
}
//Draw the window with a custom RGB, not loaded from a file//
void IntoWindowCustom(int RR, int GG, int BB)
{
int line;
erase(255, 255, 255, .99);
for (line=3;line<height-3;line++)
{
setpen(RR+(line/4), GG+(line/4), BB+(line/4), .30, 1);
moveto(3, line);
lineto(width-3, line);
}
setpen(255, 255, 255, 0, 2);
moveto(3, 2);
lineto(width-3, 2);
setpen(255, 255, 255, 0, 2);
moveto(2, 4);
lineto(2, height-3);
moveto(3, height-2);
lineto(width-3, height-2);
moveto(width-2, height-3);
lineto(width-2, 3);
}