Gumps

Gump include and examples.

Including Code

include ":gumps:gumps";

Basics

GFCreateGump()

GFCreateGump( x:=0, y:=0, width:=0, height:=0 );

GFGumpPic()

Adds a graphic to the gump, where [id] is the graphic id of an item. For example use InsideUO to get them. Optionaly there is a color parameter. The class parameter is also optional, triggers special behavior.

GFGumpPic( gump, x, y, gump_id, hue := 0 );

GFTilePic()

Adds a Tilepicture to the gump. [id] defines the tile graphic-id. For example use InsideUO to get them.

GFTilePic( gump, x, y, tile_id, hue := 0 );

GFResizePic()

Similar to GumpPic but the pic is automatically resized to the given [width] and [height].

GFResizePic( gump, x, y, gump_id, width:=0, height:=0 );

GFSendGump()

Send gump to display.

GFSendGump( mobile, gump );

GFExtractData()

GFExtractData( input, data_id );

Permissions

GFMovable()

Locks the gump in his position. Movement is not allowed.

GFMovable( gump, bool );

GFDisposable()

Prevents that the gump can be closed by hitting Esc.

GFDisposable( gump, bool );

GFClosable()

GFClosable( gump, bool );

Text Output

GFTextLine()

Defines the position and color of a text (data) entry.

GFTextLine( gump, x, y, hue:=0, text:="" );

GFTextCrop()

Adds a text field to the gump. This is similar to the text command, but the text is cropped to the defined area.

GFTextCrop( gump, x, y, width, height, hue:=0, text:="" ); 

GFHTMLArea()

Defines a text-area where Html-commands are allowed. [background] and [scrollbar] can be 0 or 1 and define whether the background is transparent and a scrollbar s displayed.

GFHTMLArea( gump, x, y, width, height, text, background:=0, scrollbar:=0);

GFDrawWrappedText()

GFDrawWrappedText( gump, x, y, text_lines, txt_color);

Buttons

GFAddButton()

Adds a button to the gump with the specified coordinates and button graphics. [released-id] and [pressed-id] specify the buttongraphic. If pressed check for [return-value]. Use [page-id] to switch between pages and [quit]=1/0 to close the gump.

GFAddButton( gump, x, y, off_id, on_id, btn_type );

Parameters

Description

btn_type

CONSTants for the GFAddButton() function:

  • GF_PAGE_BTN

  • GF_CLOSE_BTN

  • GF_DUMMY_BTN

GFRadioButton()

Same as Checkbox, but only one Radiobutton can be pressed at the same time, except they are per linked via the 'Group' command.

GFRadioButton( gump, x, y, unp_id, pres_id, status:=0, btn_value:=0) 

GFSetRadioGroup()

GFSetRadioGroup( gump, group_id);

GFCheckBox()

Adds a CheckBox to the gump. Multiple CheckBoxes can be pressed at the same time. Check the [return-value] if you want to know which CheckBoxes were selected.

GFCheckBox( gump, x, y, unc_id, che_id, status:=0, btn_value:=0);

Input

GFTextEntry()

Defines an area where the is displayed. The player can modify this data. To get this data check the [return-value].

GFTextEntry( gump, x, y, width, height, txt_color, ini_text:="");

GFPage()

Specifies which page to define. Page 0 is the background thus always visible.

GFPage( gump, page_num);

Last updated

Was this helpful?