Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: scaling windows ??  (Read 6853 times)

0 Members and 1 Guest are viewing this topic.

Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
scaling windows ??
« on: February 01, 2005, 12:12:59 AM »

i created a window for displaying some textinfos .... and i declared this.Scalable = true;
but if i change this.Scale or this.ScaleX to any value nothing happens.
this.Alphacolour is reacting like it should. . ...


Any Idea ??


greets
Stucki
 

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: scaling windows ??
« Reply #1 on: February 01, 2005, 08:01:26 AM »

Windows (and all the other GUI controls) use Width and Height attributes instead. But remember you have to use a "tiled image" as a background if you want to resize them (see the docs for more details on tiled images).
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
Re: scaling windows ??
« Reply #2 on: February 02, 2005, 12:21:57 AM »

thanks for another quick answer.

as usual another question ...

i have a scene with about 100 entities all with a script.
most of them are inactive for most of the time but the scripts still keep running.
is there a way to stop the scripts of the inactive entities ??

greets stucki

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: scaling windows ??
« Reply #3 on: February 02, 2005, 12:58:36 AM »

The scripts are not running. The debug information can be a little disiorented. The ACTUAL running scripts are the "r:x" inside the (). The first number you are seeing is how many scripts are attached to various objects in the scene or the scene itself.
Logged
fl*p

Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
Re: scaling windows ??
« Reply #4 on: February 02, 2005, 01:05:42 PM »

thanks for explaning. but the scripts are actual running even the entities are inactive.
they are not activated in the scene.editor - that means they are inactive ?!??
how can i stop  them from running ....

 i want them to start when another script sets  entitiy.active = true;

Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
Re: scaling windows ??
« Reply #5 on: February 03, 2005, 04:04:25 PM »

nobody any ideas ?!?

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: scaling windows ??
« Reply #6 on: February 03, 2005, 04:15:12 PM »

You would have to handle it yourself. For example only attaching the scripts to these entites when you activate them, or having something like this in the begining of the script:

// let the script sleep until its owner object becomes active
while(!this.Active) Sleep(500);
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
Re: scaling windows ??
« Reply #7 on: February 03, 2005, 06:26:59 PM »

yes, now i see ...... this should help me....

thanks again,
sorry bothering you with all these stupid questions. I hope the result proofs its worth ...

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: scaling windows ??
« Reply #8 on: February 03, 2005, 06:31:23 PM »

No problem with asking, that's what this forum is here for :)
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
Re: scaling windows ??
« Reply #9 on: February 10, 2005, 10:56:22 AM »

back to my first problem.

there is a window i created for displaying information text.
the background of this window is a rendered checkboard.
i want the checkboard to appear tile by tile. (scale in and fade in).
is it possible to have sprites in a window. how can i adress them. Scene.GetNode will not work because its no scene....

any hints ....

greets
stucki

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: scaling windows ??
« Reply #10 on: February 10, 2005, 11:09:04 AM »

You can have either static controls or buttons on a window. Both of them can be made out of sprites. You reference a contol using this.GetControl("control_name");
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
Re: scaling windows ??
« Reply #11 on: February 10, 2005, 01:54:22 PM »

i am trying but no sucsess ...

heres my window file:

WINDOW
{
  NAME = "info"
  SCRIPT = "interface\menu\willkommen.script"
  MENU = TRUE

  BUTTON
  {
    NAME = "blatt"
    X = -625      
    Y = -475
    IMAGE ="interface\menu\blatt_willkommen.png"
    PARENT_NOTIFY = TRUE
  } 
BUTTON
  {
    NAME = "t1"
    X = -625      
    Y = -475
    IMAGE ="interface\menu\tile_1.png"
    PARENT_NOTIFY = TRUE
  } 

}
and here is the script;

#include "scripts\base.inc"
#include "scripts\keys.inc"

self.xResult = false;

var Button = this.GetControl("t1");
Button.Scalable = true;
Button.AlphaColor = RGB(255,255,255,0);
Button.Scale =0;
for ( var z = 1; z<=255; z=z+5)
{
   Button.AlphaColor = RGB(255,255,255,z);
   Button.Scale =z/2.55;
   Sleep (50);
}

i want the button "t1" to zoom and fade in , but it is always there at 100% nothings changing ...

any ideas ??

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: scaling windows ??
« Reply #12 on: February 11, 2005, 09:00:45 AM »

The problem is buttons do not support the AlphaColor attribute. Only entire windows do. You could probably prepare a fade-in animation in SpriteEdit, by setting different opacity to frames.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
Re: scaling windows ??
« Reply #13 on: February 11, 2005, 11:16:45 AM »

are there any objects inside a window that can be scaled and faded ....

greets stucki

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: scaling windows ??
« Reply #14 on: February 11, 2005, 11:26:42 AM »

Well, you could use entity containers... It's an overkill, but it should work.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.077 seconds with 22 queries.