chat

Users who are viewing this thread

You save them to a string register via create_simple_text_box_overlay. Look at name_kingdom in module_presentations - it is literally a textbox with a button to use the string after.
 
thx but i have one more question :
its code from "name_kingdom" : (create_text_overlay, reg1, s1, tf_center_justify),

Can you explain me what mean every atribute? (in header_operations is only name of function...)
 
Code:
        (str_store_string, s1, "str_name_kingdom_text"),
        (create_text_overlay, reg1, s1, tf_center_justify),
        (position_set_x, pos1, 500),
        (position_set_y, pos1, 500),
        (overlay_set_position, reg1, pos1),
That's a simple text label, which contains whatever string that's stored on s1 (in this case it's str_name_kingdom_text), center justified. The pointer to that presentation object will be stored in reg1 - this is a common practice for static labels like those strings, since we only need to initialize where it goes by setting the coordinates in pos1, and then using overlay_set_position to properly position the text overlay on the screen.
 
For an example of how to copy the appearance of a multiplayer chat box, see this old thread of mine, copying the multiplayer_get_poll_question presentation and changing the network event appropriately. Also remember to call overlay_obtain_focus on the text box overlay in the init trigger, so players don't have to click the box before typing (the operation was added in a later warband version).
 
Back
Top Bottom