Jibble

There is a new version of the forums ready for testing. Please post here if you're willing to help test! We could also use the help of coders!

Author Topic: MODULE: CustomDialogGui 1.9  (Read 41149 times)

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
MODULE: CustomDialogGui 1.9
« on: 14 Dec 2008, 16:03 »
Abstract
Abstract: With this module you can add all sorts of dialog GUIs.
          Think of it as an easy to use interface to AGS' native DialogOptionsRendering

Dependencies 
AGS 3.4 or later

Version
1.9

Github
https://github.com/dkrey/ags_customdialog

Downloads
https://github.com/dkrey/ags_customdialog/releases/

Screenshots
icon based:


text based:


high-res and bottom up sorting:



Revision History
Since this is on github now, you can follow the changes there.

Enjoy :D
« Last Edit: 19 May 2022, 20:02 by abstauber »

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #1 on: 14 Dec 2008, 20:56 »
That sure looks cool.. nice sales pitch!!
No more military army stuff. I'm alive and back.

Shane 'ProgZmax' Stevens

  • Mittens Serf
  • GARBAAAAAGE DAAAAAAY!
    • I can help with animation
    • I can help with characters
    • I can help with making music
    • I can help with proof reading
    • I can help with scripting
    • I can help with story design
    • Lifetime Achievement Award Winner
    • Shane 'ProgZmax' Stevens worked on one or more games that won an AGS Award!
    •  
    • Shane 'ProgZmax' Stevens worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #2 on: 16 Dec 2008, 06:56 »
That's quite nice.  It looks like you have it allow as much vertical space as necessary for the text but the horizontal is locked to the limits of the gui?  Or is there some upper limit to the number of characters as well?

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #3 on: 16 Dec 2008, 07:29 »
I don't know if I get you right, but currently there's no horizontal scrolling as I'm using word wrap. So if you have a really long string, it might get wrapped three times, but is still shown.


Shane 'ProgZmax' Stevens

  • Mittens Serf
  • GARBAAAAAGE DAAAAAAY!
    • I can help with animation
    • I can help with characters
    • I can help with making music
    • I can help with proof reading
    • I can help with scripting
    • I can help with story design
    • Lifetime Achievement Award Winner
    • Shane 'ProgZmax' Stevens worked on one or more games that won an AGS Award!
    •  
    • Shane 'ProgZmax' Stevens worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #4 on: 16 Dec 2008, 09:53 »
Sounds good.

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #5 on: 16 Dec 2008, 16:02 »
Abs? Is this compatible with 640x480 reso?
No more military army stuff. I'm alive and back.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #6 on: 16 Dec 2008, 16:30 »
I haven't used high res coordinates, so if not pixel perfect. But apart from that it works fine.
If you're using it in high res you might want to turn off the outer border line though. Edit: That should work now too.
« Last Edit: 17 Dec 2008, 10:04 by abstauber »

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #7 on: 16 Dec 2008, 16:46 »
I haven't used high res coordinates, so if not pixel perfect. But apart from that it works fine.
If you're using it in high res you might want to turn off the outer border line though.

It works apart from the arrows. The clickable area is weird and doesn't work properly.
No more military army stuff. I'm alive and back.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #8 on: 16 Dec 2008, 16:55 »
You still have the mousewheel ;D
But thanks for the hint, i'll look into that.

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #9 on: 16 Dec 2008, 17:40 »
I 've implemented it into my game and will still use it, but I just made all the dialog non clickable.
No more military army stuff. I'm alive and back.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #10 on: 16 Dec 2008, 18:10 »
Could it be, that you're not using the current version?
I just re-checked 640x480, it works great. The issues you're having sound like v1.1 ;)

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #11 on: 16 Dec 2008, 18:13 »
I'm using 1.1 so I just got unlucky..thanks abs.
No more military army stuff. I'm alive and back.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #12 on: 17 Dec 2008, 10:03 »
very welcome. Thanks to you I could iron out two more bugs. So if you're using line numbering, you should upgrade again ;)

Re: MODULE: CustomDialogGui
« Reply #13 on: 24 Dec 2008, 01:14 »
Absolutely great and useful module Abstauber! ... makes custom dialog options look so easy  :D

However, I'm having trouble when translating the game.
Dialog options that have 'show' and 'say' enabled in the dialog editor only appear once in the translation file - which is the normal behaviour. So I enter the translation for that line, compile the game and this is what happens:
- The dialog box still shows the option in the original English version
- When I click on the option the character says the translated version.

I'm not sure if you can change this behaviour or whether it is a problem with an internal function of AGS.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #14 on: 24 Dec 2008, 12:35 »
We should also thank kaputtnik for demanding that module :)
To be honest, I totally forgot about translations, but now it should work.

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #15 on: 24 Dec 2008, 15:35 »
Great work with this :)

I think that the translation thing is actually a bug in the AGS Dialog.GetOptionText command, which should return the translated text. I'll get that fixed for 3.1.2, but your workaround of using GetTranslation should continue to work fine :)

kaputtnik

  • AGS Baker
  • good moon rising?
    • I can help with making music
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
    • kaputtnik worked on one or more games that won an AGS Award!
    •  
    • kaputtnik worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #16 on: 31 Dec 2008, 13:09 »
We should also thank kaputtnik for demanding that module :)

It has been a pleasure. Demanding things and getting credit for is so top notch, I think I'll make this my professional goal. I will now go and become a film producer, see you soon.
I, object.

Galen

  • Ancient Greek Physician™
Re: MODULE: CustomDialogGui
« Reply #17 on: 19 Jan 2009, 16:40 »
Excellent mate, just what I wanted (since the default dialog window is a bit dull).

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #18 on: 31 Jan 2009, 19:56 »
Thing's were fine with this module, but for a reason I don't know now it's bugging my game. I'm using AGS 3.1.1 and everything was fine, but now I start a dialog I get this error.



This was tracked down by Leon, but after playing my game I got it as well.

EDIT: I want to use that module in my game..
« Last Edit: 31 Jan 2009, 20:10 by Dualnames »
No more military army stuff. I'm alive and back.

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #19 on: 01 Feb 2009, 00:44 »
Can you upload the crash dump file for me to check it out?

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #20 on: 02 Feb 2009, 07:54 »
Does your game crash with any dialog or just a certain one? And if so, is there anything special about it, like a special char?
Or does the game still crash, if you replace that dialog?

I'm just wondering because line 103 in my module is empty and line 104 counts the numbers of options... maybe it's the best to wait for CJs analysis.

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #21 on: 05 Feb 2009, 13:47 »
Cj, Leon has kept the dump file, since he reported it. There's this thing abstauber, I managed to reproduce it, If you load the game and or save the game (opening the save and load gui doesn't affect it) and then try to run the dialog, the game crashes. It crashes with two dialogs (that's the total number of them). There's not a special char inside it, when the game's about to start the dialog makes a small pause and crashes.

Edit: The line is 109. ( I updated (in case I haven't) to the newest version, and it still occurs).
        I'm using AGS 3.1.1 (just saying)
« Last Edit: 05 Feb 2009, 14:22 by Dualnames »
No more military army stuff. I'm alive and back.

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #22 on: 05 Feb 2009, 18:18 »
Well, is it only Leon that has this problem, or do you get it too? If so, can you upload the game so that we can investigate?

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #23 on: 06 Feb 2009, 13:22 »
Hey, I can crash the sample game too  :)




Code: [Select]
  // Fill GUI Background
  if (CDG.bg_img==0) info.Surface.Clear(CDG.bg_color);
  else info.Surface.DrawImage(0, 0, CDG.bg_img, CDG.bg_img_transparency);

As you've already mentioned, it crashed after the game is beeing loaded. But it only occurs, if a background image has been used.

So it doesn't crash if CDG.bg_img is set to 0 and stays 0. But as soon as DrawImage is involved, the games crashes after being loaded.


@Dualnames:
In order to get rid of this showstopper, I'd suggest, you go on without a background image until this bug gets ironed out.


@CJ
Here's a crashdump (pls. remove the .doc)
http://www.2dadventure.com/ags/CrashInfo.3.11.1056.dmp.doc


update
It doesn't seem to crash in AGS 3.1.2(R2) anymore... hmm... or a least I can't get it to crash.
« Last Edit: 06 Feb 2009, 13:45 by abstauber »

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #24 on: 06 Feb 2009, 19:04 »
Hmm, how did you make it crash? I tried loading the sample game with 3.1.1 and running it, but it seemed to work fine both before and activating the device.

Did you have to make any changes to the sample game to get it to crash?

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #25 on: 06 Feb 2009, 20:06 »
Hmm.. as I said, unfortunately I can't reproduce it anymore  :-\

What I did to make it crash:
1) Talk to Roger
2) Exit the dialog
3) Activate the device
3) Save the Game
4) Quit the Game
5) Run the .exe again
6) Load the game
7) Talk to Roger and vóila..

I've used the same version that I've uploaded here as well without any changes, but still it just doesn't want to crash again.

btw. I'm on vacation for the next 2 weeks, not that you think I don't care anymore ;)

Re: MODULE: CustomDialogGui
« Reply #26 on: 11 Feb 2009, 22:10 »
is it possible to use an alpha blended GUI for dialogs? it doesn't work for me. there are only pink pixels instead of transparent ones.

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #27 on: 14 Feb 2009, 16:13 »
Has the Bug been fixed for AGS3.1.2+ Versions?

EDIT:Actually no. If you start any custom dialog gui dialog then restore a game and try to run a new one the same error appears.
« Last Edit: 14 Feb 2009, 16:43 by Dualnames »
No more military army stuff. I'm alive and back.

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #28 on: 14 Feb 2009, 18:53 »
is it possible to use an alpha blended GUI for dialogs? it doesn't work for me. there are only pink pixels instead of transparent ones.

Currently this is not supported, however I will consider adding it for a future version of AGS.

Quote
Has the Bug been fixed for AGS3.1.2+ Versions?

EDIT:Actually no. If you start any custom dialog gui dialog then restore a game and try to run a new one the same error appears.

I still can't reproduce this following abstauber's steps, it works fine for me with 3.1.1 and 3.1.2.

Dualnames, could you upload the crash dump file from when it crashes with 3.1.2?

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #29 on: 14 Feb 2009, 18:59 »
Quote
Has the Bug been fixed for AGS3.1.2+ Versions?
I still can't reproduce this following abstauber's steps, it works fine for me with 3.1.1 and 3.1.2.

Dualnames, could you upload the crash dump file from when it crashes with 3.1.2?

Sure, no trouble.
Crash dmp

No more military army stuff. I'm alive and back.

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #30 on: 15 Feb 2009, 14:08 »
Thanks. With the help of that crash dump I think I've narrowed down the problem, though I still can't reproduce it myself. Can you please try this new acwin:

http://www.adventuregamestudio.co.uk/acwin.zip

and see if that solves the problem?

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #31 on: 16 Feb 2009, 07:29 »
Thanks. With the help of that crash dump I think I've narrowed down the problem, though I still can't reproduce it myself. Can you please try this new acwin:

http://www.adventuregamestudio.co.uk/acwin.zip

and see if that solves the problem?

Does it? My god it does. Thanks a million bunch for that Chris.. :D
No more military army stuff. I'm alive and back.

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #32 on: 16 Feb 2009, 19:41 »
Glad to hear it! This fix is now included in 3.1.2 SP1.
« Last Edit: 22 Feb 2009, 17:10 by Pumaman »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #33 on: 14 Apr 2009, 12:11 »
Hey,

just uploaded version 1.3 with three new features.

1) the GUI is now able to appear at your mouse cursor's xy-position
2) width and/or height can be auto adjusting. If you use a scaling background image, this might look a little strange ;)
3) auto alignment for the up-down arrows

'hope you'll like it :)

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #34 on: 15 Apr 2009, 16:38 »
Oh..that's great. It was just perfect..but I think it just went better. Great man, I'm so using it. You still don't want money right?
No more military army stuff. I'm alive and back.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui
« Reply #35 on: 16 Apr 2009, 08:49 »
Hehe, thanks :)
And there's still room for improvements - unfortunately the more I add the more confusing it gets with all its variables.

Maybe for new features, I'd use comma seperated strings as variables ;)

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
The dialog GUI strikes again: now it's time for 1.4 !

Featuring icon support, custom border decorations and lot's more.

To use GUI icons, you only have to rename your dialog topics.

For example
(d13,20)Good Bye

In the brackets:
d: tells the gui, that this topic is a dialog topic.
13: the icon to be drawn
20: the highlighted icon

Another example:
(i21,22)Jelly Beans

In the brackets:
i: tells the gui, that this topic is an inventory topic. Inventory topics can be sorted after dialog topics. You can also add a linefeed in front of inventory topics
21: icon
22: highlight icon

Just make sure stick to this syntax and don't forget the brackets.

Things, you should be aware of when using icons:
* You can't mix icon and text style in the same dialog. So if you want icons for a dialog, use have to use this syntax for the whole dialog. You can still have different dialogs of course ;)

* You have make sure to uncheck "say" in the dialog editor. If you want the topic to be said, you have to add the text in the dialog itself.

Trent R

  • "I am the weapon" -Richard Cypher
    • I can help with AGS tutoring
    • I can help with scripting
Wow! This excellent module just got even better! The icon support looks awesome abs.


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.

Current Project: The Wanderer
On Hold: Hero of the Rune

Knox

  • Storm Behind The Badge
This is really great...thanks a lot for your work, its really cool! :)
--All that is necessary for evil to triumph is for good men to do nothing.

When I try and use it I get the following

GlobalScript.asc(64): Error (line 64): Undefined token 'CDG'


abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
I assume, you set up the GUI in your global script. So you need the following line in there as well.
(place it somewhere in the first lines and not in a function)

Code: [Select]
import CustomDialogGui CDG;


Hi, abstauber, your module is great, well I had a question, is it possible to create custom GUI to use for Speech / text in ags ( not for dialog option) in your module ? , Just like speech / text gui in japanese RPG game ?





 thanks.

« Last Edit: 30 Jun 2009, 17:57 by uswin »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Hi, thanks for using :)
But I'm afraid if you "just" want the speech to be displayed in a GUI, you don't need this module. It's just for selecting and showing dialog options, not for the speech itself.

As far as I know you could use the option: "custom text-window GUI" in the general settings tab.

Well, yeah, I already know that custom text gui thing,
but the point is, custom text gui doesn't give me the flexibility to create a text gui such as in the above picture, (with a character picture above the text gui and other decoration that doesn't use tile).
And when I see your module which is quite similiar with what i thought so i'm just curious.
Please let me know if you ever come across the solution for something like this

well thanks for the reply ;D

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
A little off topic, but you could try denming's video tutorials starting from part 34

This could be what you need.

Maybe there's also someone on the beginners forum who has some experience in sierra style portrait dialogs.

Good look :)

thanks abstauber, i'm gonna take a look at that

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Attempting to update from 1.3 to 1.4, a rearrangement of some short happened to all the elelements of my custom dialog guis and they're all 25 pixels to the right..does this have to do with the centering thing?
No more military army stuff. I'm alive and back.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
*cough* I've messed up left and right in the before 1.4.
You should be fine, if you just flip left and right.

If it doesn't help, could you give me some more details?

First of all fabulous job with this module!  It's so thorough and leaves so much to the imagination!  Great work and thank you for sharing!  Just an observation about the right-left switch:

*cough* I've messed up left and right in the before 1.4.
You should be fine, if you just flip left and right.

If it doesn't help, could you give me some more details?

I think what has occurred is the letter display buffering is no longer in sync with the mousover-hotspot buffering.  If you put a "this.border_left" value of 30, the mouse will not highlight any text while hovering within the first 30pxls on the LEFT side of the GUI, which is what it's suppose to do.  However, at the same time, it is also producing a text display boundary 30pxls from the RIGHT of the GUI.  Both the text and the mousover-highlighting borders need to be in sync for left/right, because right now their lefts and rights are opposite, and yet scripted into the same single value.  Hopefully what I said makes sense.  If it doesn't let me know and I'll try to find another way to explain it.

Also, I have a suggestion, although I'm not sure how easy it is to script.  For the vertical autosize function, it appears that the dialog window is always stretched downward to accommodate new text.  Is there a way to make the bottom of the dialog box the anchor point so the box stretches upwards instead?

Thanks again for a great module.  Keep up the good work!

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Hi Tanique,

thanks a lot for you feedback. Here's a new beta which should iron out those problems with the highlighting:
CustomDialogGui_beta.zip

While I've been correcting the highlighting, I've stumbled upon a problem with the alignment of the arrow sprites. So now the arrow position is independent from the gui borders, but on the downside, you have define their offset yourself.

Code: [Select]
    CDG.auto_arrow_up_offset_x      = 5;
    CDG.auto_arrow_down_offset_x = 5;
    CDG.auto_arrow_up_offset_y      = 4;   
    CDG.auto_arrow_down_offset_y = 16; 

I've also added your requested anchor point:
Code: [Select]
    CDG.mouse_anchor  = eAnchorTopLeft;

So now, all you need is to set the mouse_anchor to eAnchorBottomLeft.

If everything's fine with the beta, I'll update the first post and make it "public".
« Last Edit: 23 Oct 2009, 08:36 by abstauber »

Thanks Abstauber!

I played around with the beta and everything seems to be working fine.  Buffers and border edges seem to be happy again! Just one comment:

the new "this.mouse_anchor" is fabulous and I'm sure will be useful for a number of users.  However, is there a way to apply anchorpoint options for dialog boxes with fixed positions, not just for the mousecursor-position option?  As an example, I want to have my dialog box always in the bottom-left corner of the screen, so the dialog options will stretch the box upwards with the bottom edge always on the same position.  Basically, exactly what you did for this.mouse_anchor only for a fixed xy position.  I don't know enough about scripting to go about doing it myself.

Thanks again!

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
I'm glad to see, that this bug is finally gone :)
Actually it's a good thing that you're yet learning to script. I bet, most users silently fix those bugs themselves rather than reporting it.

If I got you right, you like to have autosize with a fixed position featuring the mouse anchor.

Well, this should do it:
CustomDialogGui_beta2.zip

Could you please take a look and tell me if it works for you?
« Last Edit: 23 Oct 2009, 08:35 by abstauber »

lol I think I'm confusing you!   ??? My bad...

Ok I've fiddled around with the General Settings and what I'm looking for is "Print Dialog Options Upwards" to be "true"

With your module imported that option seems to do nothing. I think it's being overridden.  So if there's a way to change that setting in your module instead that would be super awesome  ;D

By the way, you rock.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Hehe, maybe my subconscious didn't want to understand it, since the mouse anchor has been much easier to script ;D

Anyway, "print dialog option upwards" does the following, according to the Editor:
The first dialog option will be at the bottom, and the last at the top

Here's a new flag, that mimics this behaviour (I hope)
Code: [Select]
CDG.dialog_options_upwards=true;

It does work in text mode as well as in vertical icon mode (without icon_sort_inv).
CustomDialogGui_beta3.zip

Btw. I'm getting kind of curious, how your GUI might look like ;)
« Last Edit: 23 Oct 2009, 08:35 by abstauber »

Hmm, so just to confuse us even more, it turns out that the "Print dialog options upwards" description, and what it actually does, are different lol.

If you have no special custom settings for a GUI set, and turn "Print dialog options upwards" to TRUE, all options are still listed downwards as usual.  BUT as the number of active options decreases and the list gets shorter, the top options shift DOWN instead of the bottom options shifting UP.

I'm a quick learner and after reading through your scripting I think I'm able to script what I want myself.  Give me a day or two and if I figure it out I'll post a demo of what I end up with and what the code looks like.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Hehe, I'm looking forward to this :)

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Thanks for you PM. Now I finally understand, what you've needed. :)

Here's the new beta:
CustomDialogGui_beta4.zip

I've renamed the var mouse_anchor to anchor_point, since it doesn't have much to do with the mouse anyway.

Here's a sample GUI which you can paste in the demo, after you've updated it with the beta:

Code: [Select]
    dialog_id = 0;
    showGuiType.Text = "GUI: Text GUI bottom to top";
    CDG.setAutosizeCorners(49, 107, 43, 44);
    CDG.setAutosizeBorders(47, 108, 42, 109);
    CDG.seperator_visible       = false;
    CDG.autosize_maxheight      = 180;
    CDG.bg_color                = 50744;
    CDG.text_color            = 0;
    CDG.text_color_active     = 1;     
    CDG.gui_xpos                = 0;
    CDG.gui_ypos                = 200;
    CDG.border_left             = 17;
    CDG.border_right            = 16;
    CDG.border_top              = 5;
    CDG.border_bottom           = 5;   
    CDG.auto_arrow_align        = 3;
    CDG.auto_arrow_up_offset_x   = 5;
    CDG.auto_arrow_down_offset_x = 5;
    CDG.auto_arrow_up_offset_y   = 4;   
    CDG.auto_arrow_down_offset_y = 16;
    CDG.yscreenborder            = 0;
    CDG.xscreenborder            = 0;
    CDG.anchor_point             = eAnchorBottomLeft;
    CDG.dialog_options_upwards   = true;
    CDG.gui_pos_at_cursor        = false;
    CDG.autosize_height          = true;     


Edit: The beta is now final. These are the new options:

CDG.anchor_point
CDG.dialog_options_upwards
CDG.auto_arrow_up_offset_x
CDG.auto_arrow_down_offset_x
CDG.auto_arrow_up_offset_y
CDG.auto_arrow_down_offset_y
« Last Edit: 23 Oct 2009, 08:39 by abstauber »

I´ve tried to use your example and your template but it says It can´t be run with the beta version and I need AGS 3.2.0. But there isn´t a AGS 3.2.0 :(

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
*cough* yes, I admit, it's a little awkward.
The module of course works with 3.1 - but I've compiled the demo with a release candidate of AGS 3.2.
So if you want to try out the demo, get the latest release candidate of AGS 3.2 here:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=37668.0

(you have to scroll down)

Sorry about this - as soon as the 3.2 goes final, I'll update the demo

Knox

  • Storm Behind The Badge
Hey Abstauber,

I love this module! I was about to post a bug but then noticed it was fixed in your new release :)

However I ran into a little problem but im not sure if its your module though, causing the prob... Here is the prob:

Im using Custom Dialog1.5, 1024x768 and 32 bits. My customdialog GUI is a png with the pink color as transparent. Everything works great in window mode, but when I go full screen and have the borders on left or right for widescreen (in the release candidate), the customdialog GUI is off-center (part of it gets eaten from the borders, and its way way right off-center).

Would this have something to do with your module, or (more likely) the fullscreen with borders in the release candidate (2)?

If it has nothing to do with your module, Ill post this then in the bugs section.
--All that is necessary for evil to triumph is for good men to do nothing.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
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

  • Storm Behind The Badge
Ahh ok, well that sounds perfect! Keep me posted :)
--All that is necessary for evil to triumph is for good men to do nothing.

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

Knox

  • Storm Behind The Badge
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

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
I'll see if I can add this feature in the next release.

Knox

  • Storm Behind The Badge
Good news! Thanks :)
--All that is necessary for evil to triumph is for good men to do nothing.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
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: [Select]
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

  • Storm Behind The Badge
Great!

Cant wait to try it out tonight :)

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

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
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

  • Storm Behind The Badge
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

  • Storm Behind The Badge
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: [Select]

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

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

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
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
Quote
The 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

  • Storm Behind The Badge
Holy Crapoly!

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

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

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
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
Quote
It 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

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

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
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: [Select]
  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: [Select]
  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!
« Last Edit: 29 Jan 2010, 13:50 by abstauber »

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

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
@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: [Select]
    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

  • Storm Behind The Badge
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.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Hey thanks :)

I just checked the scrolling option in low and highres. It scrolls fine here - can you give more some more details on your GUI (like fixed or autoposition, icons or text) ?

Just as a side note: the highlighting is very experimental. In order to refresh the GUI surface so the highlight gets visible, I have to set the active dialog option to 1.

This means if you click really fast on the arrows or quickly hover it and then click, it's possible that the first dialog option gets accidently chosen.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Okay, time to get out of the beta state: here's 1.6.

The most important change is a bugfix, to correctly draw non-square icons. There's also experimental support for highlighted scroll arrows, but I don't recommend using them until AGS fully supports it.

Enjoy :)

Knox

  • Storm Behind The Badge
The link for 1.6 is in the first post, right (or am I a huge retard)?  :P
--All that is necessary for evil to triumph is for good men to do nothing.

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Hey abstauber..just wanted to let you know I have a grievance with your module. Normally I'd just script this type of thing myself but I am working with general_knox and considering I'm on the clock here there's no need to reinvent the wheel when between the two of you the groundwork, foundation, and a fair amount of the structure of the building have already been set in place.

In the header file you have the following lines:

Code: [Select]
int CDG_active_options[];
int CDG_active_options_height[];
int CDG_active_options_width[];
int CDG_active_options_sprite[];
int CDG_active_options_hisprite[];
int CDG_active_options_per_row[];
String CDG_active_options_text[];

This unnecessarily duplicates the arrays in every single subsequent script, which if you have a lot of scripts (especially if there are a lot of rooms) this can create a very significant consumption of memory. Can you define the arrays in the script file and put an import in the header instead?

Also, a lesser issue here..why is there no import of the CDG instance?

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
@General_Knox: Yep :)

@monkeh'
I'll drop you a pm in order to get some c-tutoring

Edit: Done! Thanks to you, v1.6.1 is now online :)
« Last Edit: 11 Mar 2010, 19:10 by abstauber »

After installing the module I got an error saying 'eFontNormal' was undefined. I only have fonts with enums like eFontFont0 and eFontFont1.

Is eFontNormal a default name, and if so, is the reason I don't have it because I started working on my game way back in AGS 2.7?

EDIT: It must not be that, the 'Custom dialog options rendering' article in the help files states it was written for AGS 3.1, and it mentions 'eFontFont0' in its example script.
« Last Edit: 10 Jun 2010, 16:42 by AdamM »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
No worries :D

You can safely rename eFontNormal to eFontFont0. It's just the name of the default font being used to draw text.


Simple use search and replace in CustomDialogGui.asc and get rid of the 'wrong' name.

No, I meant, why is it eFontNormal in the first place? All the other default variables compile with no error messages, so where did eFontNormal come from?

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Oh I see, you've got a point here.

For the demo game I thought it's a good idea to give  fonts names like eFontSpace and also eFontNormal.

But I see that is  a bit awkward if you import the module in one of your own projects.
Yeah, maybe I should change that.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
*Bump* New version with 32-bit alpha channel support.

Just set bg_img_transparency to "-1" in order to preserve the background sprite's alpha channel.

Code: [Select]
CDG.bg_img_transparency = -1;
« Last Edit: 11 Jun 2011, 17:50 by abstaubE3 »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Thanks to Secret Fawful, here's a bugfix release. Semi-transparent GUI backgrounds now appear correctly in scrolling rooms.

Hi sorry for up old topic
It seems there is some problem with new version of AGS 3.4.0.8 .Is any update for this module?
My official site: http://www.pershaland.ir/

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Believe it or not, I finally added 3.4.x support. Many thanks to Ben and Dave for waking me up :)
http://shatten.sonores.de/wp-content/uploads/2017/01/CustomDialogGui_17.zip

Sorry Mehrdad for keep you waiting for such a long time. If this proves to be stable, I'll update the first post and call it an official release.
« Last Edit: 26 Jan 2017, 15:00 by abstauber »

Re: MODULE: CustomDialogGui 1.7 - AGS 3.4 Support
« Reply #93 on: 27 Jan 2017, 15:26 »
Thanks so much abstauber . It works Fine  ;-D
My official site: http://www.pershaland.ir/

deadsuperhero

  • Card-Carrying Satanist
    • I can help with backgrounds
    • I can help with characters
    • I can help with making music
    • I can help with scripting
Re: MODULE: CustomDialogGui 1.7 - AGS 3.4 Support
« Reply #94 on: 16 Jan 2021, 20:39 »
This is a really great module, and I've managed to get pretty far with it in a very short amount of time. I was trying to write my own custom dialog rendering for the past week, and it was much more difficult than I imagined.

Two minor questions:
1. is it possible to set a sprite background for dialog options on eIconMode? I'd kind of like to have icons for dialog options, but also wrap the corresponding image and text with some kind of background to make it look like a button. I guess it might be possible to hack the existing script to draw sprites around each dialog option, similar to how the entire dialog UI allows for a sprite border to be drawn around itself...

After a bit of hacking, it is technically possible, though I'm still debugging how best to do this. Right now, I'm using a static sprite image, but would love to eventually shift over to drawing borders to account for longer dialog options. I added this in the section for Icon GUI Vertical Mode, just before rendering the wrapped string:

Code: Adventure Game Studio
  1. info.Surface.DrawImage(CDG.text_bg_xpos, ypos, CDG.text_bg, CDG.text_bg_transparency,
  2.      CDG.gui_width - CDG.text_bg_xpos - CDG.border_left +10, CDG_active_options_height[i]);
  3.  

It's absolutely a hack, and I still need to come up with ways to properly address spacing between the buttons...but, it's a start.



2. Is there a value I can set to define the width of dialog options? Currently it's slightly short on the UI, resulting in a bunch of text squished together.


Here's a quick screenshot of what I mean:



Sort of, I just ended up hard-coding a little bit of extra space in the drawing function for each option. Very hacky on my part, but it mostly works now:
« Last Edit: 16 Jan 2021, 23:33 by DeadSuperHero »
The fediverse needs great indie game developers! Find me there!

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.7 - AGS 3.4 Support
« Reply #95 on: 18 Jan 2022, 17:29 »
Hello! Apologies for the necro-posting. Abstauber doesn't seem to post much here anymore and the link to this module no longer works. Is the latest version archived anywhere?

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.7 - AGS 3.4 Support
« Reply #96 on: 18 Jan 2022, 19:39 »
Hey, sorry for being gone. Apparently I've missed a few posts, at least I didn't get the notification from last year and I even got some PMs  8-0
But at least I got a notification now - so yes the link from post #92 works for me. I'm keeping my fingers crossed that this module still works with recent versions of AGS. As you might tell, I haven't looked at the code for quite some time.

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.7 - AGS 3.4 Support
« Reply #97 on: 18 Jan 2022, 19:41 »
The version I have doesn't work with AGS 3.6.0.13, but the commands are easily updated. Just a quick search and replace fixes it. If you want to know what I did, lemme know.

Edit: What I did was do a search and replace for the following:

Replace System.ViewportWidth with Screen.Width
Replace System.ViewportHeight with Screen.Height
Replace GetViewportX() with Game.Camera.X
Replace GetViewportY() with Game.Camera.Y

There was also a compilation error because the command "ignoreScaling" no longer works with objects. My custom dialog window won't need to scale, so I didn't bother trying to fix it and instead just commented that bit out. :D It works fine.

edit2: Also, hi Abstauber!
« Last Edit: 18 Jan 2022, 19:45 by Dave Gilbert »

eri0o

Re: MODULE: CustomDialogGui 1.7 - AGS 3.4 Support
« Reply #98 on: 19 Jan 2022, 09:06 »
Google Chrome blocks http downloads from https pages I think. I think right click, "save link as..." still works. I recently had the same problem downloading some old games from the AGS Games DB.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.7 - AGS 3.4 Support
« Reply #99 on: 30 Apr 2022, 22:35 »
Well since some of you still find this module useful, here's v1.8 along with a refreshed demo.

// 1.8    Added: AGS 3.5 support
//        Removed workaround for pushed down arrows
//        Bumped min. version to 3.4

https://github.com/dkrey/ags_customdialog
https://github.com/dkrey/ags_customdialog/releases/download/1.8/CustomDialogGui_1.8.zip
https://github.com/dkrey/ags_customdialog/releases/download/1.8/customdialoggui_demo.1.8.zip

eri0o

Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #100 on: 03 May 2022, 13:47 »
Thanks for the update! It's a really useful module!

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #101 on: 03 May 2022, 21:04 »
Very cool! I've been having a few niggly issues with this module so hopefully someone can help.

I have border images and a background image. Both the border and the background have a transparent color. The border displays just fine, but it looks like the background and the borders are overlapping (the spots where the transparent color gets darker). Normally I'd expect the borders to be drawn right on the outside of the background, but the bottom and right borders are being drawn *on* the background (or vice versa), and the background is extending further to the right and down than it should. Any ideas what is happening here?



I am using an autosized width and height with an anchor point of "top left."

My goal is for the background to be one continuous transparent color, with no overlapping (which creates those weird black spots).

Thanks!

-Dave
« Last Edit: 03 May 2022, 21:42 by Dave Gilbert »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #102 on: 04 May 2022, 10:27 »
Actually I've never tested the module with semi transparent borders yet :-[

I'll try to recreate the issue and hopefully this problem also arises in 320x200 .

@eri0o: Thanks :)
« Last Edit: 04 May 2022, 10:38 by abstauber »

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #103 on: 04 May 2022, 12:41 »
I could probably remove the transparent bits of the borders so the background fills up the whole thing, but any ideas why the background is extending *beyond* the borders? I feel like that shouldn’t happen.

I have a deadline of mid-June to get this done so if you don’t think you’ll have time before then I will try to find a workaround.

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #104 on: 04 May 2022, 12:47 »
Actually, while I’ve got you, there is a second issue I’m having that’s been giving me some confusion.

I’m using the auto height and width, so the size of the dialog box is supposed to change depending on the number of options within the box. Sometimes the size is correct, and other times it is not.

Here's a video of what I am encountering (ignore the placeholder walk cycles and audio watermark!):


In this example, I perform these steps to reproduce the problem each time:
1 - talk to the old lady. Dialog box is displayed correctly.
2 - exit the dialog without selecting anything
3 - talk to the other character
4 - exit the dialog without selecting anything
5 - talk to the old lady again
6 - Dialog box is displayed INCORRECTLY.
7 - exit the dialog without selecting anything
8 - Talk to the old lady again.
9 - Dialog box is displayed correctly.

In this instance, there is only a small amount of blank space at the bottom on the window, but in other instances the blank area is much larger. There doesn't seem to be a rhyme or reason to it that I can see.

Any ideas on why this might be happening?

Thanks and hope all is well!

-Dave
« Last Edit: 04 May 2022, 13:04 by Dave Gilbert »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #105 on: 05 May 2022, 12:30 »
This looks like a variable isn't properly reset.
My daughter's birthday party will be tomorrow, so after I that I'll look into these issues.

Don't worry, I won't vanish without noticing ;)

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #106 on: 05 May 2022, 20:15 »
Partial success!
I was able to fix the transparency issue. But I'm having trouble replicating the issue with the bottom border.



Could you give me some details on the dialog itself?

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #107 on: 05 May 2022, 21:27 »
Thanks so much! Regarding replicating the issue, I can see the issue with the bottom border in the animated image your post! You can see the background color extends beyond the border to the right and down. Is that by design?

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #108 on: 05 May 2022, 21:53 »
No that was on purpose and represents a fake drop shadow. With the bug present you would see differences in the lighting of borders.

That's the source for my transparency test


Here's a closeup - this should be accurate now.



What I meant was the "white space" below the last dialog option in your video. I'm having two dialogs with three visible options and I don't get any blank options or wrong heights.
« Last Edit: 05 May 2022, 22:01 by abstauber »

eri0o

Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #109 on: 05 May 2022, 22:18 »
The dialog height of the last line, notice the space below, in the closeup, is different from the gif shown, if both are the same dialog, maybe this is the issue?

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #110 on: 06 May 2022, 00:22 »
Oh I see! So that "dropshadow" is part of the border graphic and unrelated to the problem I'm having?

As for the blank space underneath the dialog, as I said sometimes it's just one extra space, other times several. I can't think of anything special or specific to my dialogs, although I do use some custom functions to remove and add dialog options. That could be related.

Here are the functions I created. Perhaps one of these is not playing nice with your module? Probably threeDialog() or setupDialog() if I had to guess. If you want a sample of one of my dialog scripts, let me know.

Quote
function setupDialog(this Dialog*)  // This tells the game what dialog is currently being run, called at the Dialog startup entry point
{
  game.show_single_dialog_option=1;
  currentDialog=this.ID;
}

function myOptionOn(int option) // turns a dialog option on
{

  dialog[currentDialog].SetOptionState(option, eOptionOn);
 
}

function myOptionOff(int option,  bool forever) //turns dialog option off
{

  if (forever==false)
    dialog[currentDialog].SetOptionState(option, eOptionOff);
  else
    dialog[currentDialog].SetOptionState(option, eOptionOffForever);
}

function oneDialog(int option) //remove all dialogs, then add a single one which plays right away.
{
    game.show_single_dialog_option=0;

  int x=1;
 dialog[currentDialog].SetOptionState(option, eOptionOn);
  while (x<=dialog[currentDialog].OptionCount)
  {
    if (x != option) dialog[currentDialog].SetOptionState(x, eOptionOff);
    x++;
  }
}

function threeDialog(int option1, int option2, int option3) //remove all dialogs, then add three to be displayed
{

    game.show_single_dialog_option=1;

  int x=1;
  while (x<=dialog[currentDialog].OptionCount)
  {
    dialog[currentDialog].SetOptionState(x, eOptionOff);
    x++;
  }
 
  dialog[currentDialog].SetOptionState(option1, eOptionOn);
  dialog[currentDialog].SetOptionState(option2, eOptionOn);
  dialog[currentDialog].SetOptionState(option3, eOptionOn);
}

« Last Edit: 06 May 2022, 00:31 by Dave Gilbert »

eri0o

Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #111 on: 06 May 2022, 00:49 »
@abstauber

I noticed the width used is different in the functions  in the code here:
https://github.com/dkrey/ags_customdialog/blob/main/CustomDialogGui.asc#L237-L239


My guess is since the GetHeight uses a different width, it predicts a line break, but since the actual width used has 2 more pixels, they are enough for the line break to not happen and thus you keep the height assuming that line break.

I may have misunderstood, but this is the first guess I would use to explore this.

@Dave, can you remove the +2 in these lines and see if it solves?

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #112 on: 06 May 2022, 16:59 »
I saw only one +2 in those lines. I removed it and the bug still happens.

edit: I also downloaded the updated version of the script to test the transparency issue, and that also still remains. The problem of the background sticking out one pixel beyond the border to the right and bottom is also still there.

Here is a link to the image files I'm using, if that helps. I am also using the autosize for height and width, using these parameters:

Code: [Select]
  this.border_top      = 15;
  this.border_bottom   = 5;
  this.border_left     = 30;
  this.border_right    = 30;
  this.border_visible  = true;
  this.border_color    = -1;

  // Background
  // set bg_img_transparency to -1 if you're using 32-bit graphics and
  // want to preserve the alpha channel 
  this.bg_img                = 6503;
  this.bg_img_scaling        = 0;
  this.bg_img_transparency   = -1;
  this.bg_color              = -1;

 
  // optional autosize, overrides your width and height setting
  // also overrides the position of your scrolling - arrows
  this.autosize_height       = true;
  this.autosize_width        = true;
  this.autosize_minheight    = 10;
  this.autosize_maxheight    = 1500;
  this.autosize_minwidth     = 300;
  this.autosize_maxwidth     = 900;
« Last Edit: 06 May 2022, 18:56 by Dave Gilbert »

Snarky

  • Global Moderator
  • Global Moderator
  • Mittens Lord
  • Private Insultant
    • Best Innovation Award Winner 2018, for his numerous additions to the AGS open source ecosystem including the new Awards Ceremony client and modules
    • Snarky worked on one or more games that won an AGS Award!
    •  
    • Snarky worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #113 on: 06 May 2022, 19:24 »
Is it possible you imported the sprites for the bottom and right borders without preserving the alpha channel? Seems like that might cause it to appear like that in-game.

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #114 on: 06 May 2022, 19:28 »
I imported them all at the same time and the top ones work fine, so that's doubtful. I imported them again just as a sanity check, and the bug remains. It definitely looks like the background is being painted underneath the border, and it extends one pixel beyond it to the right and bottom.


Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #115 on: 06 May 2022, 19:58 »
Wait! I set the background image scaling to 0 instead of 1. Now it works!



The extra line problem still remains, but at least the border looks correct now!

Snarky

  • Global Moderator
  • Global Moderator
  • Mittens Lord
  • Private Insultant
    • Best Innovation Award Winner 2018, for his numerous additions to the AGS open source ecosystem including the new Awards Ceremony client and modules
    • Snarky worked on one or more games that won an AGS Award!
    •  
    • Snarky worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #116 on: 07 May 2022, 07:22 »
It still doesn't look quite right to me. The green border has a gap on the lower left side and a near-gap on the upper right side (right above/below the cut-off corner), and a "bright dot" where it looks like it's being drawn double for a couple of pixels on the lower right side. But maybe that's intentional, or at least baked into the sprite assets? But there's also a transparent horizontal line across the top, between the border and the text.
« Last Edit: 07 May 2022, 07:23 by Snarky »

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #117 on: 07 May 2022, 14:03 »
It still doesn't look quite right to me. The green border has a gap on the lower left side and a near-gap on the upper right side (right above/below the cut-off corner), and a "bright dot" where it looks like it's being drawn double for a couple of pixels on the lower right side. But maybe that's intentional, or at least baked into the sprite assets? But there's also a transparent horizontal line across the top, between the border and the text.

The transparent horizontal line was due to an extra transparent pixel at the bottom of the top border graphics. Since the background image extended one pixel beyond where it was supposed to, I hadn't noticed. :D

The holes in the border corners are part of the images, but the stray dark/bright bits at the bottom right are definitely not.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #118 on: 08 May 2022, 19:01 »
I still dare to say, that the rendering of the gui itself is now fixed.

But I am now finally able to replicate the issue - although only with line wrapping dialog options.
Maybe if I fix this, it also fixes your issue.

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #119 on: 10 May 2022, 16:46 »
Yay! Thanks, Dirk. Ready to test when ready. :D

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #120 on: 10 May 2022, 22:44 »
I've just pushed a new commit to the repo.
https://github.com/dkrey/ags_customdialog/blob/main/CustomDialogGui.asc

This fixes the issue at least for me. The problem was that the module needs parse all dialog options in advance to calculate the max gui width, before calculating the height of the individual dialog options.

*keeping fingers crossed*

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8 - AGS 3.5 Support
« Reply #121 on: 11 May 2022, 21:46 »
This seems to (thus far) work! Thank you so much!

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8.1 - AGS 3.5+ Support
« Reply #122 on: 13 May 2022, 21:04 »
yay, this was a tough nut to crack - I'm glad that it works now.

@eri0o:
About the +2 which I added to the borders. For some strange reasons, this extra space is needed or else I get some unwanted line wraps. For example the text  "option 1" fits in the row, but "option 2" will be wrapped -  maybe because I don't use a fixed width font? Adding two extra pixels gets rid of the problem - in a somewhat dirty way.

Anyway - I could spot any other bugs for the moment, so I've just published a new minor release.  And I still can't believe that the initial release is from 2008 :=
For a certain Ben304 game which never got released.

Snarky

  • Global Moderator
  • Global Moderator
  • Mittens Lord
  • Private Insultant
    • Best Innovation Award Winner 2018, for his numerous additions to the AGS open source ecosystem including the new Awards Ceremony client and modules
    • Snarky worked on one or more games that won an AGS Award!
    •  
    • Snarky worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8.1 - AGS 3.5+ Support
« Reply #123 on: 13 May 2022, 22:18 »
There is a longstanding bug in AGS (it was pointed out as least as early as 2005) where the value returned by GetTextWidth is not the same as that used for line wrapping. Adding 1 is usually enough of a workaround, but if you're working with Text Overlays, TextWindow Controls, or certain functions, you may need to take additional padding values into account as well. If you read that thread, CW explains the ins and outs of it.
« Last Edit: 13 May 2022, 22:21 by Snarky »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.8.1 - AGS 3.5+ Support
« Reply #124 on: 15 May 2022, 21:29 »
Ah okay - thanks for pointing me in that direction. At least now I know the reason behind adding 2 px :)

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.9
« Reply #125 on: 19 May 2022, 20:04 »
I had to publish a new version, because I forgot to remove a debugging fragment. So if you use 1.8.1 please upgrade to 1.9.
I also added the option to set a color for chosen dialog options.

Background on the debugging part:
I tried to see if resetting the scollstate works so I change the player's lightling level

Code: [Select]
  if (CDG.reset_scrollstate) {
    player.SetLightLevel(50);
//and so on...
So of course this has to be removed
« Last Edit: 19 May 2022, 20:05 by abstauber »

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.9
« Reply #126 on: 19 May 2022, 20:42 »
So I should just remove all instances of player.SetLightLevel?

(I ask because I added some extra code to set the position of the box based on the player position so it's not easy for me to just copy/paste the existing code)

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: MODULE: CustomDialogGui 1.9
« Reply #127 on: 19 May 2022, 20:51 »
So I should just remove all instances of player.SetLightLevel?
yup, that should do the trick.