Store_demo_doc_handle = -1
Game_platform = -1
---------------------------------------------------------------------------
-- Initialize Clothing Store
---------------------------------------------------------------------------
function store_demo_init()
Store_demo_doc_handle = vint_document_find("store_demo")
Game_platform = game_get_platform()
-- Set hints
Hint_bar = Vdo_hint_bar:new("hint_bar", 0, Store_common_doc_handle)
local hint_data = {
{CTRL_MENU_BUTTON_B, "MENU_BACK"},
}
Hint_bar:set_hints(hint_data)
Hint_bar:set_visible(true)
if Game_platform == "PC" then
Mouse_input_tracker:subscribe(false)
Hint_bar_mouse_input_tracker = Vdo_input_tracker:new()
end
if game_is_active_input_gamepad() then
Hint_bar_rotate = Vdo_hint_bar:new("hint_rotate", 0, Store_common_doc_handle)
local hint_rotate_data = {
{CTRL_BUTTON_RS, "STORE_ZOOM_ROTATE"},
}
Hint_bar_rotate:set_hints(hint_rotate_data)
Hint_bar_rotate:set_visible(true)
end
Store_header:set_visible(true)
-- Set component colors
Store_header:set_color(COLOR_STORE_PLANET_PRIMARY, COLOR_STORE_CLOTHING_SECONDARY, COLOR_STORE_CLOTHING_TERTIARY)
Store_popup:set_color(COLOR_STORE_PLANET_PRIMARY, COLOR_STORE_CLOTHING_SECONDARY, COLOR_STORE_CLOTHING_TERTIARY)
Active_list:set_highlight_color(COLOR_STORE_PLANET_PRIMARY)
Color_grid:set_highlight_color(COLOR_STORE_PLANET_PRIMARY)
bg_saints_show(true)
bg_saints_set_type(BG_TYPE_CENTER, false, 1290, false)
end
function store_demo_populate_list(list_data, current_index)
Active_list:draw_items(list_data, current_index, STORE_COMMON_LIST_SIZE, 10, LIST_FONT_SCALE)
Active_list:set_visible(true)
if Game_platform == "PC" then
Mouse_input_tracker:remove_all()
Active_list:set_store("store_clothing")
Active_list:add_mouse_inputs("store_common", Mouse_input_tracker)
Mouse_input_tracker:subscribe(true)
end
end