====== Client interface's configuration ====== The client interface of the game (commonly called GUI : [[https://fr.wikipedia.org/wiki/Interface_graphique|Graphical User Interface]]) is managed by //.xml// files which are in the "code/ryzom/client/data/gamedev/interfaces_v3" source's repertory. \\ There is also the documentation about the file's content, in two documents : interface.txt and interface_notes.txt. To make it easier and to eventually give more details on the explication, the reorganize content can be find below. Important to note that since the Google Summer of Code 2012, a [[gitlab>khaganat/khanat-code/tree/develop/code/studio/src/plugins/gui_editor|Ryzom Core Studio plugin]] allow a partial edition of the interface with graphics tools. Even it's partially corrected and reformated, this page still need work to be clear. Part of codes can be more understandebale in table. Don't hesitate to participe at the clarification, edit! \\ Done until [[#CONTROLS]] --- //[[user:yannk|YannK]] 2016/12/21 23:24// {{INLINETOC}} ===== Interface's command ===== Command's and interface's parameter definition : **Note:** in the parameter's syntax and description, the indicate value is the value by default. **Note:** the X go on the right, the Y on the high. It's pixels value. **Note:** //**DÉRIVÉ DE**// ((derive from)) means that it's possible to put the same parameters from the one which come the derive. **Note:** //**MODIFIABLE**// means that it's possible to change dynamicly a parameter in the script (with a link for exemple). **Note:** //**OBLIGATOIRE**// ((necessary)) means that the option must be present otherwise there is crash or a malfunction. **Note:** Local localisation's identifier of string type (reference to an //id// from [[gitlab>khaganat/khanat-ressources/blob/lirria/translation/work/wk.uxt|wk.uxt]] for exemple). The grid type of the localisation identifier is //integrate//. ===== Basics ===== Each //VIEW//, //CONTROL//, or //GROUP// can have the following parameters. DÉRIVÉ DE //interface_element//. ^ Element ^ Default value ^ Use / Description ^ |id| |element id. **OBLIGATOIRE**| |active|true|notice or not **MODIFIABLE**| |x|0|X position relative to the referent's position and the parent's position **MODIFIABLE**| |y|0|Y position relative to the referent's position and the parent's position **MODIFIABLE**| |w|0|Element size. If the element have a parent, take the W's parent by default **MODIFIABLE**| |h|0|Element size. If the element have a parent, take the H's parent by default **MODIFIABLE**| |posreference|BL BL|Referent position (Bottom Left, MiddleMiddle...). Read it like "ParentPosition MyPosition". Ex: "BL TR" means "my Top Right is on the Bottom Left of the parent"| |posparent|parent|Define the element's parent for the position| |sizereference| |possible value: "w", "h", "wh", "w?h?" where ''?'' is a determining factor between 1 and 9. In this case the parent's size is multiply by this factor then divide by 10. At the display moment, add the parent's size of W or/and H to the one define by w="" et h="". Example: "w2h" involved that Wnotice = W + 2*parentW/10 and that Hnotice = H + parentH| |sizerelative| |State the relative takes for the size's calculation of Wnotice and Hnotice, if this value is'nt specified, thus we take the posrelative to calculate the size| |global_color|true|if it's true, it modulate the color by the global color| |render_layer|0|value from -16t to +14, shift the order of the element preview| |avoid_resize_parent|false|If this value is turn to true, a group with a child_resize_x will not take this element into account for resize it| ===== VIEWS ===== A //VIEW// have a type which is define by the ''type=""'' parameter. All the //VIEWS// share this parameters : ^ Element ^ Default value ^ Use / Description ^ |alpha| |integrate **MODIFIABLE**| ==== ==== GOAL : display a bitmap Parameters : ^ Element ^ Default value ^ Use / Description ^ |color|255 255 255 255|color (modulate) of the bitmap (string) **MODIFIABLE**| |color_as_int| |color (modulate) of the bitmap (int) **OPTIONNEL** **MODIFIABLE**| |color_as_rgba| |color (modulate) of the bitmap (rgba) **OPTIONNEL** **MODIFIABLE**| |texture| |texture file (string) **MODIFIABLE**| |scale|false|if false, the W and the H are forced to be at the size as the texture| |rot|0|define rotation value of the bitmap| |flip|false| | |tile|false| | |align|0| | === === DÉRIVÉ DE [[#view_type_bitmap| GOAL : Display a bitmap in non compress texture (several texture in on piece) Parameters ^ Element ^ Default value ^ Use / Description ^ |txtoffsetx|0|offset in the texture (at hight-left and positive to low-right)| |txtoffsety|24|offset in the texture| |txtwidth|800|size of the texture| |txtheight|488| | === === DÉRIVÉ DE : [[#view_type_bitmap|]] GOAL: Display a value to bar form. For the moment 4 versions are available : normal, mini, ultra_mini and mini_thick, the bitmaps uses are hardcoded in C++. Parameters : ^ Element ^ Default value ^ Use / Description ^ |value| |common value (Value or DB link)(int) **MODIFIABLE**| |range| |range (Value ou DB link)(int) **MODIFIABLE**| |reference| |subtracted value of value and range (example: time management).(Value or DB link)(int) **MODIFIABLE**| |color_negative| |color when the values are negative| |mini|true|Display the mini version| |ultra_mini|true|Display the ultra mini version| |mini_thick|true|Display the mini thick version| We can also change the //value_dblink//(string), the //range_dblink//(string) or the //reference_dblink//(string) if we used them. === === DÉRIVÉ DE : [[#view_type_bitmap|]] GOAL : In the same idea of //[[#view_type_bar|]]// but display directly 3 bar. Parameters : ^ Element ^ Default value ^ Use / Description ^ |value1| |**MODIFIABLE**| |value2| |**MODIFIABLE**| |value3| |**MODIFIABLE**| |range1| |**MODIFIABLE**| |range2| |**MODIFIABLE**| |range3| |**MODIFIABLE**| |color1| | | |color2| | | |color3| | | |color1_negative| | | |color2_negative| | | |color3_negative| | | |mini|true | | ==== ==== GOAL : Display a text. Parameters : ^ Element ^ Default value ^ Use / Description ^ |color|255 255 255 255|color (modulate) of the text (string) **MODIFIABLE**| |color_rgba|255 255 255 255|color (modulate) of the text (rgba) **OPTIONNEL** **MODIFIABLE**| |fontsize|12| | |shadow|false| | |shadow_color|0 0 0 255|shadow's colors of the text| |hardtext| |If present define the display text. (Local localisation identifier)(string) **MODIFIABLE**| |uc_hardtext| |If present define the display text. (Local localisation identifier)(ucstring) **OPTIONNEL** **MODIFIABLE**| |multi_line|false| | |multi_line_space|8| | |justification|dont_clip_word|//clip_word// : no justification| |:::|:::|//dont_clip_word// : not cut and not justified words| |:::|:::|//justified// : not cut and justified words| |underlined|false|underlined the sentence| |case_mode|0|Capital letter rule| |:::|:::|0 : CaseNormal : no modification of the capital and small letter| |:::|:::|1 : CaseLower : All letters forced in small letters| |:::|:::|2 : CaseUpper : All letters forced in capital letters| |:::|:::|3 : CaseFirstStringLetterUp : The first letter of the string is in capital letter| |:::|:::|4 : CaseFirstSentenceLetterUp : The first letter of the string is in capital letter as the following sentences (séparate by the ''.'')| |:::|:::|5 : CaseFirstWordLetterUp : The first letter of all the words are in capital letters| |line_maxw|16384|maximum size of the line (multiline: minimized with the current Wreal of the parent)| |multi_line_maxw_only|false|multiline: don't minimize linemaxX with parent Wreal. Use only linemaxW| |over_extend_view_text|false|usefull only if some line_maxw specified. If true and if the text is clipped cause of line_maxw, and if the mouse over the view text, then a special tooltip will be displayed over, to show all the text| |over_extend_parent_rect|false|true to use in conjunction of over_extend_view_text: the over area is the parent, not the view| |auto_clamp|true|when set to true, dots '...' will be added to the end of the line if the text is clipped by its parent (single line only) |continuous_update|true|multiline text justification is recomputed continuously as the window parent is resized (not when the left button is released only) default is "false"| **Note:** **No //sizeref// on a text //VIEW// **. **Note:** The text view can take the shape of //TextFormatTagged//. But **only the multilingual text view intepret correclty the tags **. \\ Possible tags are: * @{F3DF} : Color tag (in hexadecimal, define with 0 to F (0 to 15 maximum so) for each RGBA component) * @{T10} : Tabulation tag. The number indicate the minimum separation (in character nulber ''_'') \\ **Note:** It's not possible to specify a //TextFormatTagged// in an other way than by C++ code, or via the LUA function : ''setTextFormatTagged()'' === === DÉRIVÉ DE [[#vue_type_text|]] GOAL : Display a data input of the database (integer) under the text form. Parameters : ^ Element ^ Default value ^ Use / Description ^ |value| |Link to the database to read the value **OBLIGATOIRE**.| |positive|true| | |suffix| | | |prefix| | | |format|false|make the number thousands formatted| === === DÉRIVÉ DE : [[#view_type_text|]] GOAL : Display a text. If the text contain one of the following specifics characters, there is a particular treatment : * $p -> replace by the player name * $P -> replace by the player name in capital letters * $b -> replace by the NPC name about what the players is speaking. * $s -> replace by the NPC name about what the players is speaking (without tittle) * ui... -> replace by the i18n translation (then do the previous replacment) Parameters : ^ Element ^ Default value ^ Use / Description ^ |format| |channel to replace (empty channel by default)| === === GOAL : Display the databse number under the "8/10" form (with a max value of the database). If the number is 0, it display the string ''emptytext''. By default emptytext="", and in this case, "0/80" is display (80 is finally the true max value). Parameters : ^ Element ^ Default value ^ Use / Description ^ |value| |Link to the database to read the value **OBLIGATOIRE**.| |valuemax| |Link to the database to read the MAX value **OBLIGATOIRE**.| |emptytext| |when value==0, string display. "" means display 0/valeurMax| **Note :** emptytext contain a locale localisation identifier. === === DÉRIVÉ DE : [[#view_type_text|]] GOAL : Display a text according to a network identifier ( it's a charcaters line equivalent to //set_server_string(ah))// ^ Element ^ Default value ^ Use / Description ^ |textid| |the identifier itself ("654123") **MODIFIABLE**| |textid_dblink | |database link to the idientifier ("UI:TEMP:VAR1") (string) **OPTIONNEL** **MODIFIABLE**| |dynamic_string|true|if true the sentence is composed (CStringManagerClient::getDynString), if not it's a server identifier (CStringManagerClient::getString)| == == DÉRIVÉ DE : [[#view_type_text_id|]] GOAL : In the same idea of the //[[#view_type_text_formatted|VIEW text_formated]]//. It contain the same particular traitments that //text_formated// where you need to add : * $t -> replace by the id text value Parameters : ^ Element ^ Default value ^ Use / Description ^ |format|$t|Bye default| |textid| |For exemple :"SERVER:BOTCHAT:DM_CHOICE2:TITLE"| ==== ==== GOAL: Special view wich display un number with special digits (bitmap). Parameterss : ^ Element ^ Default value ^ Use / Description ^ |value|SERVER:....|link on the database. **OBLIGATOIRE**| |numdigit|2|digit's number display (eg 00 if void value). Default:2. Min:1 et Max: 10| |wspace|-1|pixel spacing between each digit. Default: -1| |color|255 255 255 255|like button, whithe is by défault| The total size is automaticly calculate in function of the 0 digit and of the digit number. ===== CONTROLS ===== DERIVE DE A control has a type define by the type="" paramater. MODIFIABLE: alpha (int) ==== ==== GOAL : Derivating control from ctrl_base, and wich manage no evenement and display nothing. Its only aim is to have a place to display a tooltip when the mouse pass on it. SYNTAX: ==== ==== GOAL : button, push, radio or toggle. SYNTAX: MODIFIABLE: pushed (bool) col_normal (string ('#r #g #b #a')) col_over (string ('#r #g #b #a')) col_pushed (string ('#r #g #b #a')) col_normal_rgba (rgba) col_over_rgba (rgba) col_pushed_rgba (rgba) frozen (bool) params_l (string) texture (string) texture_pushed (string) texture_over (string) ==== ==== GOAL : button, push, radio or toggle. SYNTAXE: MODIFIABLE: pushed (bool) col_normal (string ('#r #g #b #a')) col_over (string ('#r #g #b #a')) col_pushed (string ('#r #g #b #a')) col_normal_rgba (rgba) col_over_rgba (rgba) col_pushed_rgba (rgba) frozen (bool) params_l (string) uc_hardtext (unaltered ucstring) hardtext (localise string) ==== ==== BUT: scroll bar. SYNTAXE: ==== ==== GOAL : Display a item special's button, brick... SYNTAX: MODIFIABLE: sheet (string) (link value to the DB) color1 (rgba) color2 (rgba) back (int) symbol (int) invert_symbol (bool) ==== ==== GOAL : Display a picture to choose a color in it SYNTAX: MODIFIABLE: r, g, b, a (int) The components of the selectionned color color (string ('#r #g #b #a')) ===== GROUPS ===== ==== ==== DÉRIVÉ DE [[fr:configuration_interface_client#controls|]] BUT: Définit un //group// qui pourra contenir des //groups//, des //controls// ou des //views//. Aucun affichage n'est fait sinon celui des fils. Pour qu'un groupe soit affiché, il faut qu'il apparaisse dans une liste de '''' avec son id indiquée dans une //treenode//. \\ Dans ''login_main.xml'', les //tree node// sont listées à la fin, mais dans d'autres fichiers ce n'est pas le cas. SYNTAXE: MODIFIABLE: ofsx (int) ofsy (int) ==== ==== BUT: SYNTAXE: ==== ==== Hérite de group BUT: Afficher un container SYNTAXE: MODIFIABLE: title, title_opened, title_closed (string) uc_title_opened, uc_title_closed, uc_title (ucstring) title_color (string) pop_max_h (int) openable, opened (bool) lockable, locked (bool) Note: si global_color est à true le bouton et le titre sont colorés par la couleur globale ==== ==== Hérite de group BUT: comme un group mais affiche un cadre et un fond (fixé: bitmaps de la modal). SYNTAXE: MODIFIABLE: color (string ('#r #g #b #a')) ==== ==== Hérite du group de type "frame" (affiche donc un cadre) BUT: Affiche une fenêtre qui pourra être ouverte sur une action. Cachée par defaut (active=false) NOTE: un group modal NE DOIT PAS être défini dans les . En fait ils sont automatiquement ajoutés NB: par défaut les modals sont ESCAPABLE SYNTAXE: Certaines actions handlers prennent un id de window en paramètre (eg: "ui:interface:taskbar"). L'id spécial se nommant "ctrl_launch_modal" désigne en fait le bouton ou le control qui a fait ouvrir la fenêtre modal. eg: Un control sheet dans une fenêtre modal échange son sheet id avec le ctrl sheet qui a ouvert la modal: Dans le xml, il faut bien faire attention à ce que les modals soient à la racine sinon elles peuvent être affichées plusieurs fois. Il ne faut pas non plus qu'elles soient ajoutées en tant que node dans un ==== ==== Hérite du groupe de type "modal" BUT: Affiche un menu contextuel Caché par défaut SYNTAXE: // Ligne simple ... MODIFIABLE: pour une action : grayed, checked et tous les modifiables d’une vue texte on peut récupérer les usergroup en faisant comme d'habitude menuid:actionid:usergroupid ==== ==== BUT: affiche une liste variable de ctrl_sheet SYNTAXE: // Le mode "Resize" n'existe pas en fait. Le scripteur est libre de mettre ou pas une scroll bar et/ou des boutons qui permettent de changer rowmax // Setup tyipque de scrollBar. L'alignement est hardcodé pour être Top. Le y devrait être égal à "-tmargin" du group list_sheet tx_bottomleft= "w_scroll_l123_b.tga" tx_middle= "w_scroll_l123_m.tga" tx_topright= "w_scroll_l123_t.tga" /> MODIFIABLE: nbelt (int en lecture seul !) le nombre d'element valide si array=false sinon maxelt ==== ==== BUT: affiche un tableau de familles de métier avec la bonne brick. son grand père DOIT être un container (pour initialiser son nom) SYNTAXE: // Boutons pour changer le niveau de brick voulu // vue qui affiche le niveau sélectionné // group de décoration qui affiche un fond derrière le texte (sert pour le scroll des levels à la molette) ==== ==== BUT: widget qui sert pour augmenter et diminuer un nombre de la database SYNTAXE: // une vue qui permettra d'afficher le nombre // bouton pour incrémenter // bouton pour décrémenter ==== ==== BUT: widget servant à afficher des lignes de chat ou autres défilant, avec une scrollBar et des boutons pour augmenter la taille de la fenêtre SYNTAXE: ==== ==== BUT: édition de texte SYNTAXE: MODIFIABLE: input_string (string) uc_input_string (ucstring) ==== ==== BUT: Widget de composition de magie SYNTAXE: // Brick racine // Brick mandatory // Brick optional // bouton de validation ==== ==== BUT: Widget de composition de magie SYNTAXE: // Brick racine // Brick optional // bouton de validation // Tool // MPs // Select number ==== ==== BUT: Widget d'affichage des sentence connues. cf list_job pour le lien "list_sentence" SYNTAXE: // Le mode "Resize" n'existe pas en fait. Le scripteur est libre de mettre ou pas une scroll bar et/ou des boutons qui permettent de changer rowmax // Setup tyipque de scrollBar. L'alignement est hardcodé pour être Top. Le y devrait être égal à "-tmargin" du group list_sheet tx_bottomleft= "w_scroll_l123_b.tga" tx_middle= "w_scroll_l123_m.tga" tx_topright= "w_scroll_l123_t.tga" ==== ==== BUT: affiche une combo_box. Un bouton sur un texte qui fait apparaitre un menu de sélection de texte quand on clique dessus SYNTAXE: // Texte qui affiche le choix courant. // Boutton qui sert pour ouvrir la liste. // ajoute un choix pour la combo_box Note: il faut que "ui:interface:combo_box_select_menu" soit définie comme un avec les paramètres d'aspect que l'on veut. Les champs actions sont remplis quand la combo_box est ouverte EXEMPLE: Ce setup permet de faire une combo box ou le bouton est invisible et recouvre en fait tout le group: si on clique sur le texte, on ouvre alors la liste de choix. // un cadre juste pour faire joli // notre text // Note pas de texture définie sauf l'over: c'est fait exprès. ==== ==== hérite de group BUT: affiche un arbre (comme un menu) EXEMPLE: Sur les nodes qui contiennent des fils on peut setuper la valeur de départ à ouvert ou fermé ==== ==== " ul_begin_space="12" // H space when "
    " li_indent="-10" // W space when "
  • " ul_indent="30" // W space when "
      " form_text_area_group="edit_box_widget" // The group to instanciate for a form edit box. It must have a child group CGroupEditBox* with the id "eb" checkbox_bitmap_normal="checkbox_normal.tga" // The "off" bitmap use in form checkbox checkbox_bitmap_pushed="checkbox_pushed.tga" // The "on" bitmap use in form checkbox checkbox_bitmap_over="checkbox_over.tga" // The "over" bitmap use in form checkbox background_bitmap_view="bg" // The name of the child bitmap view used for background home="http://www.nevrax.org" // The home url (you can browsse to the home url with the url "home" browse_next_time="false" // If true, the url is browsed when the group is created > ==== (derived from HTML) ==== ==== (derived from group) ==== ==== (derived from group) ==== a html-like table : The table is essentially an array. Each line must have the same number of cells. The width of the table can be arbitrary. Either sizeref="w" or a fixed w can be used. using child_resize_w has undefined results. The height or the table is imposed by its children cells (like with html table) Table is specified using the standard & Option for the table : border : the same the html tables 'border' cellpadding : the same the html tables 'cellpadding' cellspacing : the same the html tables 'cellspacing' bgcolor : background color with format "R G B A" ("255 0 0 255" for example) width : wanted width of table in pixels (same than html "width"). could be a ratio like "100%" usually the table will specify sizeref="w" or w and width="100%" continuous_update : whan set to true, the table will be updated continuously has its parent container is resized, and not when mouse left button is released only Options for the cells ( tag) Cells can have an id. If none is given a id like cell_1_2 id generated (first number is column, second is row) align : horizontal alignment of cell content. Can be "left", "right" or "center" (same than HTML 'align') valign : vertical alignment of cell content. Can be 'top", "middle" or "bottom" (same than HTML 'valign') left_margin : offset added to the x position of the cell content nowrap : same then htlm table 'nowrap' bgcolor : color of the cell background (with the "R G B A" format) width : same then htlm table 'width' : gives width of column for that cell, or a percentage add_child_w : take the wanted size from the size of the children (equivalent to child_resize_h), and add the 'width' (not added if a percentage) height : minimum height of the cell ignore_max_width : if "true", the cell content max_used_w is ignored when computing the width of the cell ignore_min_width : if "true", the cell content min_used_w is ignored when computing the width of the cell ===== MISC: DEFINE, PROCEDURES, TEMPLATES, ANIM, SCENE3D, ... ===== ==== ==== BUT: Permet de définir une constante. SYNTAXE: EXAMPLE: .... Comme ça "Hello %pipo_title" est remplacé par "Hello yoyo" L'id du define ne peut contenir que les caractères: 'a' à 'z' 'A' à 'Z' '0' à '9' '_' Du coup si vous voulez vraiment afficher un % dans un string (par exemple "25 %"), il faut l'écrire en double "25 %%" ==== ==== BUT: Définis une action handler spéciale qui lance des actions handlers à la suite SYNTAXE: Les paramètres sont optionnels. Une action handler peut être elle-même une autre procédure (attention récursivité :)) La procédure se lance en utilisant l'action handler "proc" avec comme paramètre "nom_procédure" La procédure peut prendre des paramètres en entrée (voir l'action handler proc pour comment faire). Pour chaque action, le champ params="" est parsé. Toute chaine de type @#, ou # est un numéro (à N chiffres) copiera alors le paramètre (simple copie de chaine) au moment de l'appel. Note: de la même façon que les % dans les define, un double @ permet de ne pas considérer l'@ comme un descripteur de paramètre EXAMPLE: .... EXAMPLE paramètres: .... Dans cet exemple, sur un clic gauche du bouton, set sera appelé avec une valeur de 10!! Notez que l'index des paramètres commence à 0. ====