-- OLD CONSTANTS
DIALOG_RESULT_INVALID = -1
DIALOG_ACTION_INVALID = -1
DIALOG_ACTION_NONE = 0
DIALOG_ACTION_FORCE_CLOSED = 1
DIALOG_ACTION_CLOSE = 2
DIALOG_ACTION_NAVIGATE = 3
DIALOG_PRIORITY_INFORMATION = 0
DIALOG_PRIORITY_ACTION = 1
DIALOG_PRIORITY_GAME_CRITICAL = 2
DIALOG_PRIORITY_SYSTEM_CRITICAL = 3
DIALOG_RESULT_YES = 0
DIALOG_RESULT_NO = 1
-- New stuff...
-- CONSTANTS
-- Dialog Operations
local DIALOG_OPERATION_NEW_DIALOG = 1
local DIALOG_OPERATION_CLOSE = 2
local DIALOG_OPERATION_TRANSITION = 3
local DIALOG_OPERATION_SUSPEND = 4
local DIALOG_OPERATION_RESUME = 8
local DIALOG_OPERATION_REBUILD = 16
local Input_tracker -- Track input for dialogs...
local Pause_input_tracker -- Track input for the pause thing
local Mouse_input_tracker -- Track mouse inputs
local Pause_input_added = false
local Dialogs = {} -- Where to store all the dialogs coming in from script...
local Dialog_objects = {}
Dialog_object_0 = -1
Dialog_object_1 = -1
local Dialog_current_idx = -1 -- Index to the current dialog we are going to modify...
local Dialog_current_handle = -1 -- Handle to the current dialog we are going to modify...
local Dialog_box = { handles = { } }
local Ignore_input = false
-------------------------------
-- Init Dialog Box....
-------------------------------
function dialog_init()
-- This is the first screen that can call an interface init...
-- Spawn any processes that need to happen before anything else...
--This is the first screen that can call an init... So we will take advantage...
vint_lib_init_buttons() --Inits all button mappings to globals...
vint_lib_init_constants() --Inits any constants that get used by the game...
local Dialog_document_handle = vint_document_find("dialog")
local dialog_box_h = vint_object_find("box")
Dialog_objects[0] = Vdo_dialog:new("box", 0, Dialog_document_handle, "dialog.lua", "Dialog_object_0")
Dialog_objects[1] = Vdo_dialog:clone(dialog_box_h, 0, Dialog_document_handle, "dialog.lua", "Dialog_object_1")
Dialog_objects[0]:set_color(COLOR_STORE_REWARDS_PRIMARY, COLOR_STORE_REWARDS_PRIMARY)
Dialog_objects[1]:set_color(COLOR_STORE_REWARDS_PRIMARY, COLOR_STORE_REWARDS_PRIMARY)
Dialog_object_0 = Dialog_objects[0]
Dialog_object_1 = Dialog_objects[1]
--Clone objects...
vint_set_property(Dialog_objects[0].handle, "depth", -1200)
vint_set_property(Dialog_objects[1].handle, "depth", -1000)
Dialog_current_idx = -1
--Hide objects...
Dialog_objects[0]:hide()
Dialog_objects[1]:hide()
--Input tracker for the dialog boxes...
Input_tracker = Vdo_input_tracker:new()
Input_tracker:add_input("select", "dialog_input", 200)
Input_tracker:add_input("back", "dialog_input", 200)
Input_tracker:add_input("nav_up", "dialog_input", 200)
Input_tracker:add_input("nav_down", "dialog_input", 200)
Input_tracker:add_input("nav_left", "dialog_input", 200)
Input_tracker:add_input("nav_right", "dialog_input", 200)
Input_tracker:add_input("pause", "dialog_input", 200)
Input_tracker:add_input("map", "dialog_input", 200)
Input_tracker:add_input("exit", "dialog_input", 200)
Input_tracker:add_input("alt_select", "dialog_input", 200)
if game_get_platform() == "PC" then
Input_tracker:add_input("scancode", "dialog_input_tab", 50, false, 15) -- tab key
end
Input_tracker:subscribe(false)
-- Pause coop input
Pause_input_tracker = Vdo_input_tracker:new()
Pause_input_tracker:add_input("map", "dialog_pause_input", 100)
Pause_input_tracker:add_input("select", "dialog_pause_input", 150)
Pause_input_tracker:add_input("back", "dialog_pause_input", 150)
Pause_input_tracker:add_input("nav_up", "dialog_pause_input", 150)
Pause_input_tracker:add_input("nav_down", "dialog_pause_input", 150)
Pause_input_tracker:add_input("nav_left", "dialog_pause_input", 150)
Pause_input_tracker:add_input("nav_right", "dialog_pause_input", 150)
Pause_input_tracker:add_input("exit", "dialog_pause_input", 150)
Pause_input_tracker:add_input("alt_select", "dialog_pause_input", 150)
Pause_input_tracker:subscribe(false)
-- Mouse input
if game_get_platform() == "PC" then
Mouse_input_tracker = Vdo_input_tracker:new()
end
--Paused stuff
local paused_h = vint_object_find("paused")
Dialog_box.handles.paused = paused_h
Dialog_box.handles.partner_paused = vint_object_find("partner_paused", paused_h)
Dialog_box.handles.paused_bg = vint_object_find("background", paused_h)
end
function dialog_cleanup()
--Unsubscribe all inputs...
Input_tracker:subscribe(false)
Pause_input_tracker:subscribe(false)
if Mouse_input_tracker ~= nil then
Mouse_input_tracker:remove_all()
end
end
-- Dialog input...
function dialog_input(event, acceleration)
if Ignore_input == false then
-- Hack, only accept nav up, nav down, and select events while not morphing to fix this but where if you spam the enter key on a dialog box, it will render all funny.
-- For reference, here's the bug "43070: [PC]: UI prompts go blank after accessing crib wardrobe, hitting random keys, then clicking on "save outfit""
if not Dialog_objects[Dialog_current_idx].morph_playing then
if event == "nav_up" then
if Dialog_objects[Dialog_current_idx]:nav(-1) then
game_UI_audio_play("UI_Reward_Store_Menu_Navigation")
end
elseif event == "nav_down" then
if Dialog_objects[Dialog_current_idx]:nav(1) then
game_UI_audio_play("UI_Reward_Store_Menu_Navigation")
end
elseif event == "select" or event == "pause" then
if Dialog_objects[Dialog_current_idx]:select() then
game_UI_audio_play("UI_Main_Menu_Select")
end
local selected_option_idx = Dialog_objects[Dialog_current_idx]:get_selected()
if game_get_platform() == "PC" and game_is_active_input_gamepad() == false and Dialog_objects[Dialog_current_idx]:has_second_option(selected_option_idx) == true then
if Dialog_objects[Dialog_current_idx]:nav(1) then
game_UI_audio_play("UI_Reward_Store_Menu_Navigation")
end
end
end
end
-- Don't worry about the morph for Back events. Otherwise, spinner dialogs aren't cancelable
if event == "back" then
if Dialog_objects[Dialog_current_idx]:back() then
game_UI_audio_play("UI_Main_Menu_Nav_Back")
end
end
end
end
function dialog_input_tab()
dialog_input("nav_down")
end
function dialog_build(dialog_operation, handle, previous_handle)
if dialog_operation == DIALOG_OPERATION_TRANSITION then
local dialog_data = Dialogs[previous_handle]
Dialogs[previous_handle] = { }
Dialogs[handle] = dialog_data
local dialog = dialog_data.object
dialog.dialog_handle = handle
Dialog_current_handle = handle
-- Disable inputs (because this morphs the dialog)
dialog_disable_mouse_input()
--Send data to vdo...
dialog_data.widgets_count = 0
vint_dataresponder_request("dialog_populate", "dialog_populate", 0, handle)
dialog:create(dialog_data, true, dialog_box_morph_done)
dialog:open()
vint_set_property(dialog_data.object.handle, "depth", (Dialog_current_idx + 1) * -1000)
-- DAD - 4/22/11 - Nav to the default option
if dialog_data.default > 0 then
dialog:nav(dialog_data.default)
end
-- Mouse inputs are added by dialog_box_morph_done
Input_tracker:subscribe(true)
elseif dialog_operation == DIALOG_OPERATION_NEW_DIALOG then
-- determine which object the dialog should go into...
Dialog_current_idx = Dialog_current_idx + 1
assert_msg(Dialog_current_idx >= 0 and Dialog_current_idx <= 2, "Invalid Dialog_current_idx DIALOG_OPERATION_NEW_DIALOG")
local dialog_object = Dialog_objects[Dialog_current_idx]
dialog_object.dialog_handle = handle
--Build table for dialog entry...
Dialogs[handle] = {
object = dialog_object,
title = -1,
widgets_count = 0,
}
Dialog_current_handle = handle
-- Get dialog data
vint_dataresponder_request("dialog_populate", "dialog_populate", 0, handle)
--Send data to vdo...
local dialog_data = Dialogs[handle]
local dialog = dialog_data.object
dialog:create(dialog_data, false)
dialog:open(true)
vint_set_property(dialog_data.object.handle, "depth", (Dialog_current_idx + 1) * -1000)
-- DAD - 4/22/11 - Nav to the default option
if dialog_data.default > 0 then
dialog:nav(dialog_data.default)
end
dialog_add_mouse_inputs(dialog)
Input_tracker:subscribe(true)
--play dialog sound
game_UI_audio_play("UI_HUD_Dialog_Critical")
elseif dialog_operation == DIALOG_OPERATION_REBUILD then
local dialog_data = Dialogs[handle]
local dialog = dialog_data.object
dialog.dialog_handle = handle
Dialog_current_handle = handle
-- Disable inputs (because this morphs the dialog)
dialog_disable_mouse_input()
--Send data to vdo...
dialog_data.widgets_count = 0
vint_dataresponder_request("dialog_populate", "dialog_populate", 0, handle)
dialog:create(dialog_data, true, dialog_box_morph_done)
vint_set_property(dialog_data.object.handle, "depth", (Dialog_current_idx + 1) * -1000)
-- DAD - 4/22/11 - Nav to the default option
if dialog_data.default > 0 then
dialog:nav(dialog_data.default)
end
--Mouse inputs are added by dialog_box_morph_done
--Input_tracker:subscribe(true)
elseif dialog_operation == DIALOG_OPERATION_CLOSE then
local dialog_data = Dialogs[handle]
local dialog = dialog_data.object
dialog:close()
local shift_index = -1
for i, dlg in pairs(Dialog_objects) do
if dlg.dialog_handle == handle then
if i < Dialog_current_idx then
shift_index = i
end
end
end
-- shuffle the dialogs so that Dialog_current_idx is correct
-- and we don't lose any of the dialog objects
if shift_index >= 0 then
local temp = Dialog_objects[shift_index] -- Store the closing dialog object
-- Shift all the dialogs back one
for i = shift_index + 1, #Dialog_objects do
Dialog_objects[i - 1] = Dialog_objects[i]
end
-- Push the closing one to the end
Dialog_objects[#Dialog_objects] = temp
-- Current Index should now point correctly to the current dialog
end
Dialog_current_idx = Dialog_current_idx - 1
assert_msg(Dialog_current_idx == -1 or Dialog_current_idx == 1, "Invalid Dialog_current_idx DIALOG_OPERATION_CLOSE")
if Dialog_current_idx < 0 then
Input_tracker:subscribe(false)
dialog_disable_mouse_input()
else
dialog_add_mouse_inputs(Dialog_objects[Dialog_current_idx])
end
end
end
-------------------------------------------------------------------------------
-- Populates our dialog box... this is called via dataresponder...
-------------------------------------------------------------------------------
function dialog_populate(handle, widget_type, ...)
-- process standard type widgets...
local widget = {}
widget.type = widget_type
--process odd type widgets first...
if widget_type == DIALOG_WIDGET_TYPE_TITLE then
-- Populate title
widget.title = arg[1] --Title of the dialog.
Dialogs[handle].default = arg[2] -- Default selection
elseif widget_type == DIALOG_WIDGET_TYPE_OPTION then
--Add option to dialog
widget.has_second_option = arg[1] --Do we have second option or not?
widget.disabled = arg[2] --Is the option disabled? So we can make it display differently and the user cannot select it.
widget.tag_1 = arg[3] --tag for first part of option
widget.tag_2 = arg[4] --tag for second part of option
widget.option_id = arg[5] --ID of option... this gets passed back to game so we know what has been selected
elseif widget_type == DIALOG_WIDGET_TYPE_TEXT then
--Text field for dialog...
widget.text_tag = arg[1] --The text tag for the widget.
widget.num_lines = arg[2] --How many lines we should make the widget...
widget.is_waiting = arg[3] --Determines if this text line should be a cancel/waiting button...(HACK FOR SPINNER TYPES)
elseif widget_type == DIALOG_WIDGET_TYPE_IMAGE then
--Image field for dialog...
widget.image_name = arg[1] --Image name to display.
elseif widget_type == DIALOG_WIDGET_TYPE_SPINNER then
--Spinner field for dialog...
widget.spinner_txt = arg[1] --This is the text that goes along with the spinner.
end
local widget_num = Dialogs[handle].widgets_count
Dialogs[handle][widget_num] = widget
Dialogs[handle].widgets_count = widget_num + 1
end
function do_define_test(dialog_handle, widget_type, ...)
end
------------------------------------
--[ Lua Dialog Box Interface ]--
------------------------------------
function dialog_box_confirmation(header, body, callback, is_close_on_death, is_close_on_damage, default)
if default == nil then
default = 0
end
local priority = DIALOG_PRIORITY_ACTION
local options = { [0] = "CONTROL_YES", [1] = "CONTROL_NO" }
return dialog_box_open(header, body, options, callback, default, priority, true, nil, is_close_on_death, is_close_on_damage)
end
function dialog_box_destructive_confirmation(header, body, callback)
local priority = DIALOG_PRIORITY_ACTION
local options = { [0] = "CONTROL_YES", [1] = "CONTROL_NO" }
local default = 1
return dialog_box_open(header, body, options, callback, default, priority, true)
end
function dialog_box_message(header, body, is_close_on_death, is_close_on_damage, callback)
local default = 0
local priority = DIALOG_PRIORITY_ACTION
local options = { [0] = "CONTROL_CONTINUE" }
return dialog_box_open(header, body, options, callback, 0, priority, false, nil, is_close_on_death, is_close_on_damage)
end
function dialog_box_message_critical(header, body, is_close_on_death, is_close_on_damage)
local default = 0
local priority = DIALOG_PRIORITY_SYSTEM_CRITICAL
local options = { [0] = "CONTROL_CONTINUE" }
return dialog_box_open(header, body, options, nil, 0, priority, false, nil, is_close_on_death, is_close_on_damage)
end
function dialog_box_open(header, body, options, callback, default, priority, is_confirmation, is_spinner, is_close_on_death, is_close_on_damage, is_close_on_mission_end, back_option)
priority = priority or DIALOG_PRIORITY_ACTION
callback = callback or "dialog_box_do_nothing"
is_confirmation = is_confirmation or false
is_spinner = is_spinner or false
is_close_on_death = is_close_on_death or true
is_close_on_damage = is_close_on_damage or false
is_close_on_mission_end = is_close_on_mission_end or true
back_option = back_option or -1
local handle = dialog_box_create_internal(header, body, callback, priority, is_confirmation, is_spinner, options[0], options[1], options[2], options[3], default, is_close_on_death, is_close_on_damage, is_close_on_mission_end, back_option)
return handle
end
function dialog_box_do_nothing()
end
function dialog_box_morph_done()
if Dialog_current_idx > -1 then
dialog_add_mouse_inputs(Dialog_objects[Dialog_current_idx])
end
end
-------------------------------------------------------------------------------
-- Mouse functions
-------------------------------------------------------------------------------
function dialog_add_mouse_inputs(dialog)
if Mouse_input_tracker ~= nil then
Mouse_input_tracker:remove_all(true)
dialog:add_mouse_inputs("dialog_mouse_click", "dialog_mouse_move", Mouse_input_tracker, 150)
Mouse_input_tracker:subscribe(true, true)
end
end
function dialog_disable_mouse_input()
if Mouse_input_tracker ~= nil then
Mouse_input_tracker:remove_all(true)
end
end
function dialog_mouse_move(event, target_handle)
if Ignore_input == false and not Dialog_objects[Dialog_current_idx].morph_playing then
local hint_index = Dialog_objects[Dialog_current_idx].hint_bar:get_hint_index(target_handle)
if hint_index == 1 then
Dialog_objects[Dialog_current_idx].hint_bar:set_highlight(hint_index)
else
Dialog_objects[Dialog_current_idx].hint_bar:set_highlight(0)
end
local option_id = Dialog_objects[Dialog_current_idx]:get_option_index(target_handle)
if option_id > -1 then
Dialog_objects[Dialog_current_idx]:highlight_option(option_id)
game_UI_audio_play("UI_Reward_Store_Menu_Navigation")
end
end
end
function dialog_mouse_click(event, target_handle)
if Ignore_input == false and not Dialog_objects[Dialog_current_idx].morph_playing then
local hint_index = Dialog_objects[Dialog_current_idx].hint_bar:get_hint_index(target_handle)
if hint_index == 1 then
if Dialog_objects[Dialog_current_idx]:back() then
game_UI_audio_play("UI_Main_Menu_Nav_Back")
end
end
local option_id = Dialog_objects[Dialog_current_idx]:get_option_index(target_handle)
if option_id > -1 then
Dialog_objects[Dialog_current_idx]:highlight_option(option_id)
Dialog_objects[Dialog_current_idx]:select()
game_UI_audio_play("UI_Main_Menu_Select")
end
end
end
-------------------------------------------------------------------------------
-- Paused....
-------------------------------------------------------------------------------
Dialog_pause_disconnect_dialog_handle = 0
Dialog_pause_partner_paused = false
Dialog_pause_allow_disconnect = false
-------------------------------------------------------------------------------
-- Shows the simplified pause screen... this is called via game code.
-- @param partner_paused did the coop player pause the game?
-- @param just_show_disconnect does not indicate that the secondary player has paused.(used in special cases)
-------------------------------------------------------------------------------
function dialog_pause_show(partner_paused, just_show_disconnect)
local h = Dialog_box.handles
vint_set_property(h.paused, "visible", true)
vint_set_property(h.paused, "alpha", 1)
vint_set_property(h.paused_bg, "visible", true)
if partner_paused or just_show_disconnect then
vint_set_property(h.partner_paused, "visible", true)
vint_set_property(h.partner_paused, "alpha", 1)
if partner_paused then
Dialog_pause_partner_paused = true
vint_set_property(h.partner_paused, "text_tag", "DIALOG_PAUSE_START_TO_DISCONNECT")
end
if just_show_disconnect then
Dialog_pause_allow_disconnect = true
vint_set_property(h.partner_paused, "text_tag", "COOP_DISCONNECT")
end
else
--Hide partner paused...
vint_set_property(h.partner_paused, "visible", false)
vint_set_property(h.partner_paused, "alpha", 0)
Dialog_pause_partner_paused = false
Dialog_pause_allow_disconnect = false
end
if partner_paused then
--make sure we only remove the pause input once...
if Pause_input_added == true then
Pause_input_tracker:remove_input("pause")
Pause_input_added = false
end
else
if Pause_input_added == false then
Pause_input_tracker:add_input("pause", "dialog_pause_input", 100)
Pause_input_added = true
end
end
Pause_input_tracker:subscribe(true)
end
-------------------------------------------------------------------------------
-- Hides the simplified pause screen... this is called via game code.
-------------------------------------------------------------------------------
function dialog_pause_hide()
local h = Dialog_box.handles
vint_set_property(h.paused, "visible", false)
vint_set_property(h.partner_paused, "visible", false)
vint_set_property(h.paused_bg, "visible", false)
if Dialog_pause_disconnect_dialog_handle ~= 0 then
dialog_box_force_close(Dialog_pause_disconnect_dialog_handle)
Dialog_pause_disconnect_dialog_handle = 0
end
-- Unsubscribe to input
Pause_input_tracker:subscribe(false)
end
function dialog_pause_disconnect(result, action)
if result == 0 then
dialog_box_disconnect()
else
Pause_input_tracker:subscribe(true)
end
Dialog_pause_disconnect_dialog_handle = 0
end
function dialog_pause_input(event, accelleration)
if Ignore_input == false then
if Dialog_pause_partner_paused == true then
if event == "map" then
--Map is the button to exit out of a partner paused situation
local options = { [0] = "CONTROL_YES", [1] = "CONTROL_NO" }
Dialog_pause_disconnect_dialog_handle = dialog_box_open("MENU_TITLE_WARNING", "DIALOG_PAUSE_DISCONNECT_PROMPT", options, "dialog_pause_disconnect", 1, DIALOG_PRIORITY_SYSTEM_CRITICAL, true, nil, false, false)
Pause_input_tracker:subscribe(false)
end
else
if event == "map" and Dialog_pause_allow_disconnect == true then
--Map is the button to exit out of a partner paused situation
local options = { [0] = "CONTROL_YES", [1] = "CONTROL_NO" }
Dialog_pause_disconnect_dialog_handle = dialog_box_open("MENU_TITLE_WARNING", "DIALOG_PAUSE_DISCONNECT_PROMPT", options, "dialog_pause_disconnect", 1, DIALOG_PRIORITY_SYSTEM_CRITICAL, true, nil, false, false)
Pause_input_tracker:subscribe(false)
elseif event == "pause" then
--Pause is the event in a normal paused situation.
dialog_pause_unpause()
end
end
end
end
-------------------------------------------------------------------------------
-- UTILITY FUNCTIONS
-------------------------------------------------------------------------------
-- helper function to set a text tag
function dialog_box_set_tag(handle, value)
if type(value) == "number" then
vint_set_property(handle, "text_tag_crc", value)
elseif type(value) == "string" then
vint_set_property(handle, "text_tag", value)
else
end
end
-- set whether the dialog ignores input
function dialog_ignore_input(value)
Ignore_input = value
end
function dialog_text_update(option_idx, new_text)
assert_msg(Dialog_current_idx >= 0 and Dialog_current_idx <= 2, "Invalid Dialog_current_idx in dialog_text_update")
Dialog_objects[Dialog_current_idx]:set_option_text(option_idx, new_text, true, dialog_box_morph_done)
end
function dialog_select_next()
Dialog_objects[Dialog_current_idx]:nav(1)
local selected_option_idx = Dialog_objects[Dialog_current_idx]:get_selected()
if Dialog_objects[Dialog_current_idx]:has_second_option(selected_option_idx) == true then
Dialog_objects[Dialog_current_idx]:select()
end
end
-------------------------------------------------------------------------------
-- Test Functions...
-------------------------------------------------------------------------------
function dialog_test_populate(handle)
dialog_populate(handle, DIALOG_WIDGET_TYPE_TITLE, "EULA!")
dialog_populate(handle, DIALOG_WIDGET_TYPE_SPINNER, "Waiting for coop player. Waiting for coop player. Waiting for coop player. Waiting for coop player.")
--dialog_populate(handle, DIALOG_WIDGET_TYPE_TEXT, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus sapien lectus, rhoncus eu malesuada at, sodales sed eros. Sed sollicitudin, lorem sed laoreet convallis, neque tortor placerat diam, vitae accumsan enim ante sit amet turpis. Curabitur tempor posuere mollis. Vivamus quam nisl, ultricies at tempus ut, varius id erat. Integer iaculis enim a velit sodales laoreet ultricies justo tincidunt. Vestibulum sagittis dolor lacus. Quisque varius ultrices risus sed adipiscing. Donec sit amet leo nec nisi mollis sodales. Nullam velit orci, ornare a dignissim quis, luctus in ipsum. Proin convallis felis leo, ac lacinia nunc. Donec eu ligula tellus, a molestie mauris. Quisque rutrum velit eget diam viverra vel congue ligula mollis. Etiam at consectetur nulla. Nunc et semper augue. Maecenas rutrum dui ut metus dapibus venenatis. In hac habitasse platea dictumst. Nullam aliquet metus non nibh porta eget convallis justo tristique. Cras erat augue, facilisis tempor suscipit a, placerat quis risus. ", "YES2", 1)
-- dialog_populate(handle, DIALOG_WIDGET_TYPE_IMAGE, "ui_homie_pierce")
-- dialog_populate(handle, DIALOG_WIDGET_TYPE_IMAGE, "ui_homie_pierce")
-- dialog_populate(handle, DIALOG_WIDGET_TYPE_IMAGE, "ui_hud_inv_melee_bat")
-- dialog_populate(handle, DIALOG_WIDGET_TYPE_SPINNER, "This is some spinner text that i'm using to set everything to..")
-- dialog_populate(handle, DIALOG_WIDGET_TYPE_TEXT, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus sapien lectus, rhoncus eu malesuada at, sodales sed eros. Sed sollicitudin, lorem sed laoreet convallis, neque tortor placerat diam, vitae accumsan enim ante sit amet turpis. Curabitur tempor posuere mollis. Vivamus quam nisl, ultricies at tempus ut, varius id erat. Integer iaculis enim a velit sodales laoreet ultricies justo tincidunt. Vestibulum sagittis dolor lacus. Quisque varius ultrices risus sed adipiscing. Donec sit amet leo nec nisi mollis sodales. Nullam velit orci, ornare a dignissim quis, luctus in ipsum. Proin convallis felis leo, ac lacinia nunc. Donec eu ligula tellus, a molestie mauris. Quisque rutrum velit eget diam viverra vel congue ligula mollis. Etiam at consectetur nulla. Nunc et semper augue. Maecenas rutrum dui ut metus dapibus venenatis.", 0)
-- dialog_populate(handle, DIALOG_WIDGET_TYPE_TEXT, "This is a block of text that we are using to represent word wrap. and more complicated matters", "YES2", 1)
--dialog_populate(handle, DIALOG_WIDGET_TYPE_TEXT, "This is a block of text that we are using to", "YES2", 1)
--dialog_populate(handle, DIALOG_WIDGET_TYPE_SPINNER, "This is some spinner text that i'm using to set everything to..")
-- dialog_populate(handle, DIALOG_WIDGET_TYPE_OPTION, "ZOMG WHAT UP?!", nil, 0)
dialog_populate(handle, DIALOG_WIDGET_TYPE_OPTION, "ACCEPT", "", 0)
-- dialog_populate(handle, DIALOG_WIDGET_TYPE_OPTION, "REALLY LONG O...", "FORTYNINE", 1)
dialog_populate(handle, DIALOG_WIDGET_TYPE_OPTION, "ZOMG REALLY LONG TEXT", "YES2", 0)
-- dialog_populate(handle, DIALOG_WIDGET_TYPE_OPTION, "RAD2", "NO...", 4)
-- dialog_populate(handle, DIALOG_WIDGET_TYPE_OPTION, "RAD2", "NOKAY", 5)
-- dialog_populate(handle, DIALOG_WIDGET_TYPE_OPTION, "RAD2", "NOKAY", 6)
end