xboxscene.org forums

Author Topic: Color Generator (preview)  (Read 1074 times)

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Color Generator (preview)
« on: April 14, 2004, 07:12:00 PM »

(IMG:http://img51.photobucket.com/albums/v157/flattspott/ColorGen.jpg)

I had this idea for a script a while ago, only then it used 10 preset colors and didn't really work too well so I gave up on it. That non working junk is here

It wasn't until I saw the new Xecuter3 demo that my interest was sparked again. So here we are now.

It's not 100% done yet. Includes click sound for the sliders. And possibly a background image.

CallFile <Path>\ColorGen.xas [Color1 Info] [Color1 Color] [Color2 Info] [Color2 Color]

If no arguments are specified then everything will revert to the defaults. If arguments are specified then the slider positions, values and the box colors will get set accordingly. Useful if you want to slighty tweak an exact color or show the current colors for whatever it is you getting a color for.

Example usage can currently be like so: (when I actually get it finished and release it)
CODE

CallFile \ColorGen.xas "System Menu box (fill)" 00000000 "System Menu box (border)" ffffffff
CallFile \ColorGen.xas "System Menu box (fill)" 0x00000000 "System Menu box (border)" 0xffffffff
CallFile \ColorGen.xas


This post has been edited by flattspott: Apr 15 2004, 10:25 PM <
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Color Generator (preview)
« Reply #1 on: April 14, 2004, 06:33:00 PM »

smile.gif I havent had the chance to try it yet.  might turn out to be something BJ can include for the default skins especially smile.gif
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Color Generator (preview)
« Reply #2 on: April 14, 2004, 08:02:00 PM »

Well this version is way different then the sample I sent you, that one only did one color.

The way it works now is like so.

CallFile <Path>\ColorGen.xas "Info for Color 1" "Info for Color 2"

Or you can use just 1 info for color arg

Outputs to _Color1 and _Color2

This post has been edited by flattspott: Apr 15 2004, 03:04 AM <
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Color Generator (preview)
« Reply #3 on: April 15, 2004, 12:02:00 AM »

Maybe there should be a universal color-select box.  <
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Color Generator (preview)
« Reply #4 on: April 15, 2004, 02:45:00 AM »

What do you mean? Universal for all dashes or for MXM?. Cause it's not just for System Menu Boxes, that was only an example.  <
Logged

chilin_dude

  • Archived User
  • Hero Member
  • *
  • Posts: 3068
Color Generator (preview)
« Reply #5 on: April 15, 2004, 03:02:00 AM »

QUOTE (flattspott @ Apr 15 2004, 10:34 AM)
What do you mean? Universal for all dashes or for MXM?. Cause it's not just for System Menu Boxes, that was only an example.

Allow me to (attempt) to interpret.
Geniusakz means that you should be able to use this script to set the colour of every messagebox  <
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Color Generator (preview)
« Reply #6 on: April 15, 2004, 03:47:00 AM »

If that is the case, then you can.

Or even colors for tetris, although only two at a time or just one.

CallFile <Path>\ColorGen.xas "Tetris piece | " "Tetris Piece Z"

The reason for the args is so you can specify the info for each color. Basically so you DON'T forget what the current color (1 or 2) is for.

If I used the CallFile above the text on screen would be...

Generate color(s) to use for
1: Tetris piece |
2: Tetris Piece Z

This post has been edited by flattspott: Apr 15 2004, 06:39 PM <
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Color Generator (preview)
« Reply #7 on: April 15, 2004, 10:43:00 AM »

I meant that once perfected, it should be added as an internal script.

So all you have to do is:

Colorbox "Enter color 1" "Enter Color 2" color1 color2

Where color1 and color2 are the variables for the return value.  (Still don't know how return values can be done without using global vars).  <
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Color Generator (preview)
« Reply #8 on: April 15, 2004, 11:37:00 AM »

QUOTE (geniusalz @ Apr 15 2004, 06:32 PM)
I meant that once perfected, it should be added as an internal script.

So all you have to do is:

Colorbox "Enter color 1" "Enter Color 2" color1 color2

Where color1 and color2 are the variables for the return value.  (Still don't know how return values can be done without using global vars).

At the moment I am currently sticking the ReturnVars into _Color1 and _Color2 by default

Although I think I could make it  work with ReturnVar arguments. For example if you say C1 and C2. I could spit the ReturnValues out as _C1 and _C2 or if the ResultVars are left out, default to _Color1 and _Color2
 <
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Color Generator (preview)
« Reply #9 on: April 15, 2004, 01:33:00 PM »

Yeah, that's what I was thinking.  BenJeremy: It would be better if there was a system to return without using global var's.  (Like some of the current AS commands that return values)

Something like SETCALLER or RETURN, which is pretty much the same as SET, but SETs for the caller script.  <
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Color Generator (preview)
« Reply #10 on: April 15, 2004, 03:26:00 PM »

Changed the layout a bit. Still need to get the stuff centered though.

Just out of curiousity though geniusalz, what's the problem with using global variables?

This post has been edited by flattspott: Apr 16 2004, 12:23 AM <
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Color Generator (preview)
« Reply #11 on: April 16, 2004, 01:14:00 PM »

Okay people, it almost done. Just have to fix a annoying bug when you change the current color and the pointer goes from 1> to 2> it doesn't keep focus on that slider untill you move to the next slider.

Edit, Fixed it.

Now working on the final feature. Generate random color. The random part's working but i still got to get the sliders to adjust.

Edit, Fixed it also.

One last thing to do. Get everything centered on the screen.

This post has been edited by flattspott: Apr 17 2004, 12:32 AM <
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Color Generator (preview)
« Reply #12 on: April 16, 2004, 05:17:00 PM »

tongue.gif
j/k


Don't know, it might cause problems in recursive situations or something.
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Color Generator (preview)
« Reply #13 on: April 16, 2004, 07:02:00 PM »

QUOTE
Don't know, it might cause problems in recursive situations or something


By that do you mean, if you did something like a call file several times in row that use them?

Cause I think that may be an issue already.


On a side note:
  I finally got Color Generator finished.
  Just need to write a little documentation and what not..


This post has been edited by flattspott: Apr 17 2004, 02:08 AM <
Logged