Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Rocco on May 31, 2006, 05:48:09 PM

Title: Rotate Button
Post by: Rocco on May 31, 2006, 05:48:09 PM
i tried many different approaches, but dont get this damn button to rotate.
i have the button script which look like this with my nonfunctional rotationcode  :(.

Code: [Select]
var rotation = 5;
self.Rotatable = true;
self.Rotate = rotation;

on "LeftClick"
{


    rotation = rotation + 10;
    self.Rotate = rotation;
    .
    .
    other code which works :-)
    .
    .
    Sleep(10);
}

Title: Re: Rotate Button
Post by: Mnemonic on May 31, 2006, 06:04:46 PM
GUI elements cannot be rotated. You'd have to use an entity instead of button.
Title: Re: Rotate Button
Post by: Rocco on June 01, 2006, 02:39:25 PM
thx, its not so important, but i found this in the help file, under Button object -> Attributes
Title: Re: Rotate Button
Post by: Mnemonic on June 01, 2006, 03:00:31 PM
Yes, well, these are the joys of object oriented programming. All the game objects inherit the Rotate attribute, but only some of them actually do implement it.