Wintermute Engine > Technical forum
Responses Window
Daniel:
Hi All,
I made a sliding inventory bar at the bottom of the screen and I wanted to do the same thing for the dialog bar. The problem is that I searched the documentation and couldn't find any way of obtaining a reference to the responses window like there is for the inventory window (the GetInventoryWindow() method). I need this window in order to play with it's on-screen position.
My final goal is that each time the GetResponse() method is called, the responses (icon-based) will slide up from the bottom of the screen.
Did I miss something? Isn't there a GetResponsesWindow() anywhere?
Mnemonic:
Um, ahem, oops. No, there's not one. I added it, it will be present in the next release.
Daniel:
Fair enough ;)
Thanks!
Daniel:
I just noticed I have another problem and since it's connected to the responses window I'll continue in this thread.
What I'm trying to do is the following:
1. Set a mouse cursor for the responses.
I noticed the responses are buttons so it should be possible but if these buttons are accessible, I don't know in what way. Can the RESPONSE_BOX definition file contain definitions for the responses themselves? I don't mean definitions for each and every possible response but more like a general definition for all responses. e.g. what cursor to use when the user points any of the responses.
2. Set a label on the top of the screen saying something about the response currently under the cursor.
Since I'm using icon-based responses, a label saying something descriptive about the responses would be necessary (similar to a tooltip for a toolbar button). My problem is, how do I determine which response is under the cursor? Do they have some index? I noticed the names of all response buttons is "response" so it doesn't help me in distinguishing between them. When I call AddResponse(), I supply text as well as an image. The text is not displayed but is there a way to retrieve it at runtime and use it for the label?
I hope I'm explaining myself well enough... I guess what I really want is for the responses to behave like inventory items or hotspots and my already existing lines of code in the main game loop:
var ActiveObject = Game.ActiveObject;
if (ActiveObject != null)
{
Label.Text = ActiveObject.Caption;
}
else
{
Label.Text = "";
}
will work with the responses as well.
Mnemonic:
--- Quote from: Daniel on April 13, 2004, 09:47:28 PM ---1. Set a mouse cursor for the responses.
I noticed the responses are buttons so it should be possible but if these buttons are accessible, I don't know in what way. Can the RESPONSE_BOX definition file contain definitions for the responses themselves? I don't mean definitions for each and every possible response but more like a general definition for all responses. e.g. what cursor to use when the user points any of the responses.
--- End quote ---
Ok, I'll add something like that.
--- Quote from: Daniel on April 13, 2004, 09:47:28 PM ---2. Set a label on the top of the screen saying something about the response currently under the cursor.
Since I'm using icon-based responses, a label saying something descriptive about the responses would be necessary (similar to a tooltip for a toolbar button). My problem is, how do I determine which response is under the cursor? Do they have some index? I noticed the names of all response buttons is "response" so it doesn't help me in distinguishing between them. When I call AddResponse(), I supply text as well as an image. The text is not displayed but is there a way to retrieve it at runtime and use it for the label?
I hope I'm explaining myself well enough... I guess what I really want is for the responses to behave like inventory items or hotspots and my already existing lines of code in the main game loop:
var ActiveObject = Game.ActiveObject;
if (ActiveObject != null)
{
Label.Text = ActiveObject.Caption;
}
else
{
Label.Text = "";
}
will work with the responses as well.
--- End quote ---
I'll have to look into how the response window works because I don't remeber. I'm sure we'll find a way eventually. The problem is that the response window is displayed in an exclusive mode. I can't say any details at the moment, I'll be smarter in the evening (GMT+1 :)).
The iconic responses are currently kinda underestimated, because AFAIK no one ever used them so far, so you'll have to be a little patient.
Navigation
[0] Message Index
[#] Next page
Go to full version