Author Topic: MODULE: CustomDialogGui 1.7 - AGS 3.4 Support  (Read 35306 times)

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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

  • There's no sense crying over spilled tears.
    • 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 »
Check out my game: Life is a Party!

The fediverse needs great indie game developers! Find me there!