daemon_n
Posts: 4356
|
Valery, that is just intext game resources' displaying support
IF:M^{~>myDef.def:0:5}^; 0 is cadre group, 5 - is cadre number (starts from 0)
IF:M^{~>myPcx.pcx}^; just pcx not sure, it was made for pcx
Quote:[+] Added support for displaying inline def-images right in texts as a part of Era Markup Language (EML).
To embed image in text use the following tags: {~>def_name.def} Will display the first frame from the first group of def_name.def image in place of text cursor. {~>def_name.def:frame_index} Will display specified frame from the first group of def_name.def image or nothing if index is invalid. {~>def_name.def:group_index:frame_index} Will display specified frame from specified group of def_name.def image or nothing if index is invalid.
Frames and frame groups are counted from 0. Frames are automatically trimmed. By default images are rendered "inline". It means, that they are treated as non-wrapping sequence of white space characters. Images do not allocate vertical space except the height of current font. But they automatically allocate necessary width.
Images can be aligned vertically using the following attribute: valign=top|middle|bottom. Examples: {~>ava0037.def valign=bottom} {~>smalres.def:5}
Vertical alignment modes: - 'top'. Image is drawn from the top left pixel of current character box. - 'middle'. Image is vertically centered relative to current text line height. This is the default mode for inline images. - 'bottom'. Image is drawn so, that it's bottom edge matches current text line bottom edge.
Quote:[+] Implemented high level API for WoG radio dialogs (IF:G). Configure dialog before showing. Optionally assign value and tag to each item. Optionally add special "cancel" item. The result is item index, value and tag. No need to convert bits anymore.
Example 1:
!?FU(OnAfterErmInstructions); !!FU(RadioDlg_Reset):P; !!FU(RadioDlg_SetTitle):P^What primary skill would you like to increase?^; !!FU(RadioDlg_AddCancelButton):P;
!!FU(RadioDlg_AddItem):P^Attack^/(SKILL_ATTACK)/^attack^; !!FU(RadioDlg_AddItem):P^Defense^/(SKILL_DEFENSE)/^defense^; !!FU(RadioDlg_AddItem):P^Knowledge^/(SKILL_KNOWLEDGE)/^knowledge^; !!FU(RadioDlg_AddItem):P^Power^/(SKILL_POWER)/^power^;
!!FU(RadioDlg_SelectItemByTag):P^knowledge^; !!FU(RadioDlg_Show):P?(item:y)/?(value:y)/?(tag:z); !!IF:M^Item: %(item). Value: %(value). Tag: %(tag)^;
Example 2:
!?FU(OnAfterErmInstructions); !!FU(RadioDlg_Reset):P; !!FU(RadioDlg_SetTitle):P^Select your starting hero:^; !!FU(RadioDlg_AddCancelButton):P;
!!FU(RadioDlg_AddItem):P^Orrin^/(HERO_ORRIN); !!FU(RadioDlg_AddItem):P^Xeron^/(HERO_XERON); !!FU(RadioDlg_AddItem):P^Gird^/(HERO_GIRD); !!FU(RadioDlg_AddItem):P^Valeska^/(HERO_VALESKA);
!!FU(RadioDlg_SelectItemByValue):P(HERO_GIRD); Preselect Gird from start !!FU(RadioDlg_Show):P?(item:y)/?(hero:y);
!!if&(hero)>=(HERO_FIRST); !!IF:M^Selected hero: %(hero)^; !!en;
API:
!?FU(RadioDlg_Reset); ; Resets all radio dialog settings to empty values.
!?FU(RadioDlg_SetTitle); ; Changes radio dialog title.
!?FU(RadioDlg_AddCancelButton); ; Adds cancel button to dialog. Decreases maximum number of items in dialog by one.
!?FU(RadioDlg_SelectItem); ; Sets new selected item by its index. !#VA(itemInd:x);
!?FU(RadioDlg_SelectItemByValue); ; Finds the first item with specified value and selects it. !#VA(itemValue:x);
!?FU(RadioDlg_SelectItemByTag); ; Finds the first item with specified tag and selects it. !#VA(itemTagPtr:x); Tag string
!?FU(RadioDlg_AddItem); ; Adds new item to radio dialog. !#VA(itemCaptionPtr:x); Optional. New item caption. Empty/spacy captions are valid. Default: ^^. !#VA(itemValue:x); Optional. Numeric value, associated with item. Default: 0. !#VA(itemTagPtr:x); Optional. String tag, associated with item. Default: ^^. !#VA(selectItem:x); Optional. Boolean. If TRUE, item will be selected. Default: FALSE.
!?FU(RadioDlg_AddItems); ; Adds up to 5 items to radio dialog. For detailed arguments description see (RadioDlg_AddItem). !#VA(firstItemCaptionPtr:x); !#VA(firstItemValue:x); !#VA(firstItemTagPtr:x);
!?FU(RadioDlg_Show); ; Display previously configured radio dialog with single possible choice. ; Currently maximum RADIO_DLG_MAX_ITEMS (-1 for cancel button) items can be added to the dialog. ; Returns selected item index, value and tag. Item index is (NO_RADIO_DLG_ITEM) if no items are present for selection ; or Cancel button was pressed. !#VA(resultItem:x); Default: (NO_RADIO_DLG_ITEM). !#VA(resultValue:x); Default: -1. !#VA(resultTagPtr:x); Default: ^^.

Новейший Heroes Launcher
|
|