Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: eborr on February 16, 2016, 03:26:05 PM

Title: AddResponse
Post by: eborr on February 16, 2016, 03:26:05 PM
Don't know if anyone has come across this, but what I want to do is to add a background for each line in a response box, and what seemed like a neat solution was to add an icon as well as some text - the third parameter that AddResponse() accepts is an icon file name. What happens though is that the icon overwrites the text - eg it's drawn after the text - any idea out there ?
Title: Re: AddResponse
Post by: valter.home on February 16, 2016, 09:09:42 PM
I have worked a lot these days about the dialogues but my target was to create an icon-based interface. For what I can tell you I see hard to put a different background for each row without putting hand to the source of wme or create your own dialogue interface.
Of course that's just my first impression but it happened to me several times to think that a similar thing was impossible and finally find a good solution.
In my case for example, I use a dialog box of only icons representing the object of the discourse and after the click I visualize the dialogues in the ballons over the characters. If instead of the images 90 x 90 I wished a text with a different background I would prepare the texts as png and then I'd show them right through the third parameter of AddResponse () (as I do now with icons).
This is a possible workaround but it will probably not be the only one ...
Title: Re: AddResponse
Post by: eborr on February 17, 2016, 12:50:29 PM
Thanks for the replay, I am aware of  that option, but the thought of having to prepare a whole load of pngs, is not desirable, especially as the goal for this game is to have it available in at least 3 languages one of which will use  cyrillic script - So it;s essential I can pass the text through.

The solution to the problem is to have a variable background image which is triggered by the number of responses. Getting the graphic  the correct size is fiddly as with elements in the response box you don't have the same level of dynamic control - but we will get there