Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: 2.0 on November 23, 2009, 04:55:18 PM

Title: Problems with static controls
Post by: 2.0 on November 23, 2009, 04:55:18 PM
Hi!

The problem described is in this example in comments:
Code: [Select]
mSym = mBox.CreateStatic();
mSym.SetFont("fonts\sylfaen.font");
mSym.SetImage("gamegraphics\sparkle.png");
mSym.X = SomeX; // Yeah, it works :)
        mSym.Text = "Some text"; // Such as described above
mSym.SizeToFit(); // It works too
mSym.Visible = true; // I think it works
mSym.Movable = true; // I think it works
mSym.Colorable = true; // I think it works
mSym.Scalable = true; // I think it works
mSym.BlendMode = 1; // Have not any effect, text and image shows as usual
        mSym.AlphaColor = MakeRGBA(255, 255, 255, 128); // Have not any effect, text and image shows as usual
mSym.Scale = 150; // Have not any effect, text and image shows as usual

Where is the my mistake?
Title: Re: Problems with static controls
Post by: Mnemonic on November 23, 2009, 06:13:31 PM
There's no mistake, those properties simply have no effect on GUI controls.
Title: Re: Problems with static controls
Post by: 2.0 on November 23, 2009, 06:42:36 PM
It's a pity. GUI would be such striking :)
Title: Re: Problems with static controls
Post by: 2.0 on November 25, 2009, 02:53:20 AM
There's no mistake, those properties simply have no effect on GUI controls.

Mnemonic, is it hard to put this effects on in one of the future build? Those properties not working in the inventory too, and many of good-looking effects (smooth scale on objects appearing in the inventory, for example) is impossible to realize. It's a sad...
Title: Re: Problems with static controls
Post by: metamorphium on November 27, 2009, 09:03:15 AM
Wouldn't using entity container instead of static solve your problem?
Title: Re: Problems with static controls
Post by: 2.0 on November 27, 2009, 08:10:32 PM
Wouldn't using entity container instead of static solve your problem?

Unfortunately no at the current realization of the game. Entity container has no SizeToFit method. I'm use the array of Static controls to display game's messages - with asynchronous letters moving etc (but some beautiful effects I cant rezlize because of subject). SizeToFit allows me to put letters (each of letter - stactic control) next to other letters.
Hope, my explanation was clear (because of my English isnt good :)).