Hello.
I am having a little trouble conceiving a simple screen using the Falagard System.
The idea is quite simple: a bunch of "icons" representing game characters, and a big image which represents a conceptual "zoom" of the "selected" character.
What would be a good way to do it with Falagard? Would I have to create a different "falagard button" derivation for each "icon", even if all buttons are similar, functionally speaking?
And how about the "zoom" component? I thought it could be a "static image", but how do I change the picture if I use the 0.5 version of the library? Do I have again to create separate "static image" derivations for each possible version?
Thanks,
Leonardo Mesquita
Character Selection Screen
Moderators: CEGUI MVP, CEGUI Team
Have a look at Widget Galore to convert the static image.
One approach would be to present a bunch of Pushbutton, each representing a character slot. Within these buttons you can place a StaticImage (small character image) to the left and a StaticText (character name, server, location) to the right; these would be children of the Pushbutton. (I know that StaticImage and StaticText are dead but the concept lives on.) In code you specify that they should pass mouse clicks to their parent: it's a function with a name like mouseClickPassthrough().
Trap the Pushbutton click event. In that function/trigger specify a different image for the "big zoom image":
Or if the character slot was empty start the code to create a new character.
You could augment this by first specifying a StaticText with a border, then a child Pushbutton, then the children StaticImage and StaticText. When the Pushbutton is clicked you can show the border in a different (as in a highlight) color.
Edit: on second though you probably do not need Pushbutton; it should be possible to trap mouse clicks on a StaticImage and StaticText (the character icon and description).
One approach would be to present a bunch of Pushbutton, each representing a character slot. Within these buttons you can place a StaticImage (small character image) to the left and a StaticText (character name, server, location) to the right; these would be children of the Pushbutton. (I know that StaticImage and StaticText are dead but the concept lives on.) In code you specify that they should pass mouse clicks to their parent: it's a function with a name like mouseClickPassthrough().
Trap the Pushbutton click event. In that function/trigger specify a different image for the "big zoom image":
Code: Select all
ImagesetManager::getSingleton().createImagesetFromImageFile("ImageForStaticImage", "GPN-2000-001437.tga");
DefaultWindow* staticImage = static_cast<DefaultWindow*>(winMgr.getWindow("StaticImage"));
staticImage->setProperty("Image", "set:ImageForStaticImage image:full_image"); Or if the character slot was empty start the code to create a new character.
You could augment this by first specifying a StaticText with a border, then a child Pushbutton, then the children StaticImage and StaticText. When the Pushbutton is clicked you can show the border in a different (as in a highlight) color.
Edit: on second though you probably do not need Pushbutton; it should be possible to trap mouse clicks on a StaticImage and StaticText (the character icon and description).
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
This would'nt really be using falagard.
In Falagard you can create a new property for the widget which will hold the icon imageset and image name.
You then use a ImageryComponent to draw the icon via the ImageProperty tag.
Take a look at WindowsLook/IconButton or TaharezLook/Button (0.5) for pointers.
Or you can look at the first "falagard beginner tutorial" in the wiki. It goes through making a looknfeel for a button that just shows an image.
HTH
In Falagard you can create a new property for the widget which will hold the icon imageset and image name.
You then use a ImageryComponent to draw the icon via the ImageProperty tag.
Take a look at WindowsLook/IconButton or TaharezLook/Button (0.5) for pointers.
Or you can look at the first "falagard beginner tutorial" in the wiki. It goes through making a looknfeel for a button that just shows an image.
HTH
Who is online
Users browsing this forum: No registered users and 26 guests
