Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: Daniel on April 13, 2004, 04:51:43 PM
-
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?
-
Um, ahem, oops. No, there's not one. I added it, it will be present in the next release.
-
Fair enough ;)
Thanks!
-
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.
-
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.
Ok, I'll add something like that.
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.
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.
-
I can be patient, no problem with that :)
How come no one ever used the iconic responses? Are they so unpopular?
The reason I'm using them is quite arbitrary, as a matter of fact. I just wanted to test my abilities and the abilities of the engine by reconstructing the game mechanisms of some recent commercial game. Since I had just finished "Black Mirror" at the time and still had it installed on my hard drive, I decided to use it as a test case. So I re-made it with WME along with one small scene, the inventory, the dialog system the save/load screens, etc.
I just want to feel absolutely sure that I'm not limited in any unreasonable way by the engine before I actually start using it for real. I did the same thing with AGS as well before I started using WME.
-
Ok, first step: the text passed as a second parameter to AddResponse is now used for "Caption" of the response buttons. It should have been so from the beginning...
-
Great! Seems like a very good step in the right direction! I like it. ;)
-
Tell me please. Is it possible to play sound when the cursor is over the response.