MODULE: CustomDialogGui 1.9

Started by abstauber, Sun 14/12/2008 16:03:36

Previous topic - Next topic

abstauber

Since it works in windowed mode and the script doesn't make a difference between that and fullscreen, I assume (hope) that we can blame AGS for it :D

So my guess is, that the widescreen borders somehow affect the coordinates of the special drawing surface, AGS is providing for custom dialogs.

I'll have to work on the module in the next days anyway, because Monkey_05_06 has sent me some really interesting code, which needs to be included. So if I'll encounter this widescreenborder problem too, I'll let you know.

Knox

--All that is necessary for evil to triumph is for good men to do nothing.

GarageGothic

Seems like it could be related to this widescreen border bug. Hopefully it'll be fixed in the next stable version of AGS.

Knox

Problaby, eh? I agree, hopefully it'll be fixed for the next version :)

PS: When you press on the arrow to go up or down the dialog options, right now it goes up by one, I believe. Is there a way to make it go up or down by more...? For example, say on my page I have 3 questions that are showing, but since there isnt enough room, the other 3 arent displayed...you have to press the arrow to scroll down to see the other 3. Instead of pressing the arrow two more times, can I set the arrow so it just displays the next 3 questions?

(Hope that makes sense? :P )
--All that is necessary for evil to triumph is for good men to do nothing.

abstauber


Knox

--All that is necessary for evil to triumph is for good men to do nothing.

abstauber

Here's a new beta
http://shatten.sonores.de/wp-content/uploads/2009/12/CustomDialogGui_beta1.zip

- added an option to scroll through multiple rows per click.

it's called like this:
Code: ags
 CDG.scroll_rows = 2


- added support for (semi)transparent backgrounds and antialiased ttf fonts. (Thanks Monkey_05_06)

So whenever you have a background image and set it's transparency above 0, this feature is activated.
Since it's just a workaround until the AGS supports this natively, there are a few drawbacks:


* Tinting is not supported (yet)
@Monkey_05_06: you told me, that this should be easy, but I have no idea, how to reproduce a character's tint.

* no walkbehinds

* no area lighting

Of course, these drawbacks appear only, if you have a character or object behind the transparent part of the GUI.

Knox

--All that is necessary for evil to triumph is for good men to do nothing.

monkey0506

The Character/Object-specific tinting I don't know a work around for. You might have misunderstood me. The problem is that there's no way (that I know of) to get a Character/Object's current tint levels.

The walkbehinds cannot be supported as is. A workaround for that is to use objects/characters instead. Otherwise your characters will always appear in front of the walkbehinds in any area where the dialog options are being rendered at. Outside of that area it shouldn't be a problem (as denoted by abstauber above). ;)

Finally as for the area lighting, I think that should be possible using the Tint functions right? It's something I probably need to account for myself in my codes, but I'm not using any of these things myself so it does make it more difficult to understand what exactly needs to be done to emulate them. :=

Knox

Hey abstauber,

Works GREAT! Its exactly what I needed...Thanks :)
--All that is necessary for evil to triumph is for good men to do nothing.

Knox

Hey abstauber,

I was wondering if it would be too much to ask to add another feature to this already-great module?

It would be nice to have highlight image and push-down image for the Up arrow and Down arrow

Something like:

Code: ags


  this.uparrowHighlight_img     = 45;
  this.uparrowPushed_img     = 45;

--All that is necessary for evil to triumph is for good men to do nothing.

abstauber

Hmmm... if you can make into the highscore of my current game, I'll add it ;D ;D


And because of my cheesy attempt of surreptitious advertising, I'll add it anyway ;)


@Monkey
QuoteThe Character/Object-specific tinting I don't know a work around for. You might have misunderstood me.
Yup. I thought that you might have found a way of reading explicit tints. I've already added your updated functions :)

Knox

--All that is necessary for evil to triumph is for good men to do nothing.

Crimson Wizard

I have a question. Can I use this module to make a totally custom dialog, like when dialog options aren't taken from dialog object, but inserted manually from some list?

Also, I think there's a mistake in information, it sais: AGS 3.2.1 SP-1 or later, but AGS 3.2 isn't yet released... did you mean AGS 3.1.2 instead?  ::)

abstauber

Hey Crimson!
You're right, I've meant 3.1.2 :) On the other hand, the latest example has been compiled with 3.2 RC2, since I didn't pay attention, which editor I launched that moment. But the module works fine in 3.1.

Unfortunately the module itself depends on AGS' internal dialog functions. Lists or textfiles aren't currently supported.
I haven't tried these module (AGS 2.7), but it seems like they override the dialog functions or do something of their own.
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=25866.0
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=9528.0



@General Knox
QuoteIt would be nice to have highlight image and push-down image for the Up arrow and Down arrow
Sorry letting you wait - right now, highlighted images are not possible, because there's no way to refresh the dialog surface by hand. But Chris already knows about this, so when he adds this feature, I'll upload the new version

Rulaman

Hi Abstauber,

is it possible to modify your module so, that the up- and down arrows are over and under the text like in this picture?


http://img145.imageshack.us/img145/8706/dialogtemplate.png



The first part is a little modification of the available parameters.
The next three parts are the behaviour that i want.

The second part is in the middle part of an scrollable dialog.
The third part is the module start.
The fourth part is the dialog end.


Greetings
Rulaman
Zak: Komm mit mir Sushi.
Zak: Come with me Sushi.

abstauber

Hi Rocco, Rulman (doh!)

this should be possible. If you're using a fixed gui, this is no big deal since you have these options to control the arrow position:
Code: ags

  CDG.uparrow_xpos    = 189;
  CDG.uparrow_ypos    = 1;
  CDG.downarrow_xpos  = 189;
  CDG.downarrow_ypos  = 90;


If you're using auto aligned arrows, you can define their relative positions like this:
Code: ags

  CDG.auto_arrow_up_offset_x = 1;
  CDG.auto_arrow_up_offset_y = 1;
  CDG.auto_arrow_down_offset_x = 1;
  CDG.auto_arrow_down_offset_y = 1;  


Cheers!

Rulaman

Hi abstauber,
Im' not Rocco  :)

I already modified this variables.

Let me describe my problem a little more precise.

I have a dialog with 7 options and a DialogGUI with five dialog lines (as shown in the picture.)
At first i want see the first four dialog lines and in the fifth line my down arrow.

Now I press my down arrow and get in the first line an up arrow, in the lines two till four my dialog options and in line fifth an down arrow.

At the end of the dialog only the up arrow is shown in the first line and the last four dialog entries.

I hope it is now clear. I though the picture was self explaining.

Rulaman
Zak: Komm mit mir Sushi.
Zak: Come with me Sushi.

abstauber

@Rulaman
Sorry, I've been in hurry when I've answered your post :)
If I get you right, you want the scrolling arrow to appear in the first/last line of the dialog. I think I've seen this on the gameboy before :)

But unfortunately the module doesn't support this. And if I write it in, text wrapping will definitely become a problem  :-\

So what you could do is to adjust the top/bottom borders when scrolling.

@General Knox
Thanks for adding the bug report to the tech forums. Could you try this beta and tell me if its good now?
http://shatten.sonores.de/wp-content/uploads/2010/02/CustomDialogGui_beta3.zip

I've also added the requested scroll arrow images, but it's still kind of experimental.

Code: ags

    CDG.scroll_btn_delay = 0.5;
    CDG.uparrow_img             = 123;
    CDG.uparrow_hi_img          = 122;
    CDG.uparrow_push_img        = 124;
    CDG.downarrow_img           = 126;
    CDG.downarrow_hi_img        = 125;
    CDG.downarrow_push_img      = 127;

Knox

Hey Abstauber,

The custom dialog GUI is now centered, even with side-borders and full screen....yes! Thanks a lot!!

Also, the highlight images/push images for the arrows works great...thanks a lot!

I might be mistaken, but I think that the scroll rows function might be broken though, not sure(?)...could be just me :P...perhaps you can test on your end? Im setting it to 5 like before, but it only scrolls down 1, like before the feature was added (but again, it might be me who did something wrong so Ill go double-check, :P)

Great work as usual...:)
--All that is necessary for evil to triumph is for good men to do nothing.

SMF spam blocked by CleanTalk