(str_store_string, s1, "@Зарегистрируйте аккаунт!"),
(create_text_overlay, reg1, s1, tf_center_justify),
(position_set_x, pos1, 500),
(position_set_y, pos1, 600),
(overlay_set_position, reg1, pos1),
(str_store_string, s1, "str_username"),
(create_text_overlay, reg1, s1, tf_center_justify),
(position_set_x, pos1, 500),
(position_set_y, pos1, 460),
(overlay_set_position, reg1, pos1),
#(overlay_set_text, reg1, s1),
(create_simple_text_box_overlay, "$username"),
(position_set_x, pos1, 400),
(position_set_y, pos1, 435),
(overlay_set_position, "$username", pos1),
###pass
# (str_store_string, s1, "str_password"),
# (create_text_overlay, reg1, s1, tf_center_justify),
# (position_set_x, pos1, 500),
# (position_set_y, pos1, 400),
# (overlay_set_position, reg1, pos1),
# #(overlay_set_text, reg1, s1),
# (create_simple_text_box_overlay, "$password"),
# (position_set_x, pos1, 400),
# (position_set_y, pos1, 375),
# (overlay_set_position, "$password", pos1),
(create_button_overlay, "$obj2", "@Continue...", tf_center_justify),
(position_set_x, pos1, 500),
(position_set_y, pos1, 250),
(overlay_set_position, "$obj2", pos1),
(create_button_overlay, "$obj3", "@Exit", tf_center_justify),
(position_set_x, pos1, 500),
(position_set_y, pos1, 200),
(overlay_set_position, "$obj3", pos1),
(presentation_set_duration, 999999),
]),
(ti_on_presentation_event_state_change,
[(store_trigger_param_1, ":object"),
(try_begin),
(eq, ":object", "$username"),
(str_store_string, s1, s0),
# (else_try),
# (eq,":object","$password"),
# (str_store_string, s2, s0),
# (else_try),
# (eq, ":object", "$obj2"),
(neg|str_is_empty, s1),
# (neg|str_is_empty, s2),
# Password
# (str_store_string, "@123", s2),
(party_set_name, "p_main_party", s1),
(troop_set_name, "trp_player", s1),
(call_script, "script_send_string_to_server",mpcamp_event_register,1,s1),
(call_script, "script_send_data"),
(presentation_set_duration, 0),
(jump_to_menu, "mnu_wait_for_confirmation"),
(else_try),
(eq, ":object", "$obj3"),
(jump_to_menu, "mnu_start_game_0"),
(try_end),
]),
]),
Given your request and the provided example, I'm going to draft a basic implementation for a "mp_meeting" chat feature within the module system of a game like Warband. This implementation will capture the elements you specified: a chat box, input field, send button, and a couple of test buttons, all with the specified color scheme.
Note that the following code is schematic and would likely need adjustments to integrate seamlessly with the specific game's module system and scripting API:
# mp_meeting Presentation Script
("mp_meeting", 0, mesh_load_window, [
(ti_on_presentation_load,
[
# Set the chat box background (Note: The method to create a chat background may vary)
(create_mesh_overlay, reg1, "mesh_black_square"),
(position_set_x, pos1, 50), # Adjust X position as needed
(position_set_y, pos1, 50), # Adjust Y position as needed
(overlay_set_position, reg1, pos1),
# Create the chat log box
(create_text_overlay, "$chat_log", "@", tf_left_align | tf_scrollable),
(position_set_x, pos1, 55), # Adjust X position as needed
(position_set_y, pos1, 55), # Adjust Y position as needed
(overlay_set_position, "$chat_log", pos1),
(overlay_set_area_size, "$chat_log", 800, 500), # Width and Height
(overlay_set_color, "$chat_log", 0xFFFFFF), # White color text
# Create the input field
(create_simple_text_box_overlay, "$chat_input"),
(position_set_x, pos1, 55), # Adjust X position as needed
(position_set_y, pos1, 560), # Adjust Y position as needed, below the chat log
(overlay_set_position, "$chat_input", pos1),
(overlay_set_color, "$chat_input", 0xFFFFFF), # Text color
# Create the Send button
(create_button_overlay, "$chat_send_button", "@Send", tf_center_justify),
(position_set_x, pos1, 860), # Adjust X position next to the input field
(position_set_y, pos1, 560), # Adjust Y position to align with the input field
(overlay_set_position, "$chat_send_button", pos1),
# Test Button 1
(create_button_overlay, "$test_button_1", "@Test1", tf_center_justify),
(position_set_x, pos1, 960),
(position_set_y, pos1, 55),
(overlay_set_position, "$test_button_1", pos1),
# Test Button 2
(create_button_overlay, "$test_button_2", "@Test2", tf_center_justify),
(position_set_x, pos1, 960),
(position_set_y, pos1, 110),
(overlay_set_position, "$test_button_2", pos1),
# Keeping the presentation open
(presentation_set_duration, 999999),
]),
(ti_on_presentation_event_state_change,
[
(store_trigger_param_1, ":object"),
# Handling input from the send button
(try_begin),
(eq, ":object", "$chat_send_button"),
# Retrieving the message from the input field
(overlay_get_text, s1, "$chat_input"),
# Implement sending the chat message function here
# This is a placeholder, actual implementation may vary
(call_script, "script_send_chat_message", s1),
# Clear the input field after sending
(overlay_set_text, "$chat_input", "@"),
# Handling other buttons (e.g., Test buttons) similarly
(try_end),
]),
])
This is a high-level approach and would require actual script functions like script_send_chat_message to be implemented based on your game's networking and messaging system. Adjust the positions (position_set_x, position_set_y), sizes (overlay_set_area_size), and identifiers ("$chat_log", "$chat_input", etc.) as necessary to fit your game UI's layout and design requirements.