MODULE: CustomDialogGui 1.9

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

Previous topic - Next topic

jeanini

Hi, I'm just starting on AGS, what should I do with my project to use horizontal icons?

abstauber

Hi,
the module is briefly explained in the header file. Even though I would not recommend this module for a first game, it's of course possible.
This is the interesting part from the header file
Code: ags
Syntax of dialog options in icon mode:
  ([d/i][icon],[highlighted icon])Text
 
  Example: 
(d12,13)Want a cup of tea?
 
  This means, the topic uses sprite slot 12 as a normal icon,
  slot 13 for the highlighted icon and it's a dialog item.

  Example: 
(i14,15)Jelly Beans

  This adds an "inventory-topic" which is sorted after the dialog topics.
It's also used in the dialog topic dDialog2 and setup in the room1.asc room script.

Code: ags
    lblGuiType.Text = "GUI: Horizont.Icons";
    
    // look at dDialog1 to see, how icons work
    // this var is just a global var and is not needed
    // when you're using your own gui
    dialog_id = 1; 
    
    CDG.gui_type = eIconMode;
    CDG.gui_xpos = 50;
    CDG.gui_ypos = 20;
    CDG.reset_scrollstate = true;
    
    CDG.gui_stays_centered_x = true;
    CDG.gui_stays_centered_y = true;
    
    CDG.icon_align_horizontal   = true;
    CDG.icon_horizontal_center  = true;
    CDG.icon_inv_linefeed       = 6;
    CDG.icon_sort_inv           = true;
    
    CDG.setAutosizeCorners(51, 52, 53, 54);
    CDG.setAutosizeBorders(55, 56, 57, 58);
    CDG.border_left             = 10;
    CDG.border_right            = 10;
    CDG.border_top              = 7;
    CDG.border_bottom           = 16;
    CDG.seperator_visible       = false;
    CDG.border_visible          = false;
    
    CDG.bg_color                = COLOR_TRANSPARENT;
    CDG.bg_img                  = 0;
    CDG.bg_img_scaling          = 1;
    CDG.bg_img_transparency     = 0;  
    
    CDG.autosize_height       = true; 
    CDG.autosize_width        = true;
    CDG.autosize_minheight    = 20; 
    CDG.autosize_maxheight    = 150; 
    CDG.autosize_minwidth     = 60;
    CDG.autosize_maxwidth     = 200;       
    CDG.auto_arrow_align      = 3;

blaholtzen

It was a little tricky to wrap my head around how to use it at first but I'm really liking what I can do with this module! I'm using it for some thought bubble styled options.



I was wondering if there is any easy way to add some kind of animation to the options/UI?
I'm thinking either having the whole UI bob up and down by 1 pixel could be enough, or if there's a way to make the options use a view instead of a sprite number and animate those?

I tried making it bob myself but didn't get it moving.

SMF spam blocked by CleanTalk