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 41640 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!
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.