Page 1 of 1

IntoWindow 2 (Now easily customizable)!

PostPosted: Sun Mar 28, 2010 3:07 pm
by Hblade
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
Screenshot 1.JPG

Screenshot 2.JPG



Download Customization kit, and "data1.dra" file.
IntoWindow 2.zip
(757.86 KiB) Downloaded 47 times



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);
}

I hope to make this big, and usable for everyone

PostPosted: Sun Mar 28, 2010 3:10 pm
by Hblade
Hey guys, I'm working really hard and using trial and error so that I can make you guys some very nice looking windows, Please, send me requests on what you would like me to upgrade in version 3.

Tell me what you guys would want to see in version 3, and I'll make it happen :D

Is it too hard to use?
What can I do to make it easier?