save_list {
    height = parent_height - 200,
    width = parent_width - 300,
    background_color = rgba(0, 0, 0, 0.25),
    shadow = shadow(0.0, 0.0, rgba(0, 0, 0, 0.6), 16.0, 1.0, "outset"),
}

save_list > button(id="new_game") {
    x = 16,
    y = parent_height - 16 - 50,
    height = 50,
    width = (parent_width / 2) - 32,
}

save_list > button(id="load_game") {
    x = 16 + (parent_width / 2) - 16,
    y = parent_height - 16 - 50,
    height = 50,
    width = (parent_width / 2) - 32,
}

save_list > save_preview {
    x = float(parent_width) * 0.6,
    width = float(parent_width) * 0.4,
    height = parent_height - (16 * 2 + 50),
}

save_list > save_preview > save_icon {
    image = "dynamic:800@600@save_icon",
    width = parent_width - 32,
    height = float(parent_width - 32) * 0.75,
    x = 16,
    y = 16,
}

save_list > save_preview > save_details {
    y = float(parent_width - 32) * 0.75 + 32.0,
    x = 16,
    width = parent_width - 32,
    height = float(parent_height) - (float(parent_width - 32) * 0.75 + 16.0 + 32.0),
    background_color = rgba(255, 255, 255, 0.3),
}

save_list > scroll_panel {
    width = float(parent_width) * 0.6,
    height = parent_height - (16 * 2 + 50),
}

save_list > scroll_panel > content {
    layout = "rows",
}

save_header {
    width = parent_width,
    height = 40,
    border_width = border_width(0.0, 0.0, 0.0, 2.0),
    border = border(bside("#FAFFBF", "dotted")),
}

save_header > name {
    layout = "lined",
    line_height = 40,
    width = 200,
    x = 25,
}

save_header > name > @text {
    font_size = 35,
    font_color = "#FAFFBF",
}

save_header > time {
    layout = "lined",
    line_height = 40,
    width = 200,
    x = parent_width - 75,
}

save_header > time > @text {
    font_size = 35,
    font_color = "#FAFFBF",
}

save_entry {
    width = parent_width,
    height = 30,
    border_width = border_width(0.0, 0.0, 0.0, 1.0),
    border = border(bside("#FAFFBF", "solid")),

    can_hover = true,

    on_mouse_move_over = "init#
        ui.set_cursor('base:ui/cursor/interact')
    ",
    on_mouse_move_out = "init#
        ui.set_cursor('base:ui/cursor/normal')
    ",
}

save_entry(on_click=click) {
    on_mouse_up = click,
}

save_entry(hover=true) {
    background_color = rgba(255, 255, 255, 0.7),
    shadow = shadow(0.0, 0.0, rgba(0, 0, 0, 0.6), 16.0, 1.0, "outset"),
}

save_entry(selected=true) {
    background_color = rgba(255, 255, 0, 0.7),
    shadow = shadow(0.0, 0.0, rgba(255, 255, 255, 0.6), 16.0, 1.0, "outset"),
}

save_entry(hover=true, selected=true) {
    background_color = rgba(0, 255, 255, 0.7),
    shadow = shadow(0.0, 0.0, rgba(255, 255, 255, 0.6), 16.0, 1.0, "outset"),
}

save_entry > name {
    layout = "lined",
    line_height = 30,
    width = 800,
    x = 25,
}

save_entry > name > @text {
    font_size = 25,
    font_color = "#FAFFBF",
}

save_entry(valid=false) > name > @text {
    font_color = "#333333",
}

save_entry(hover=true) > name > @text {
    font_color = "#8c3b31",
}
save_entry(selected=true) > name > @text {
    font_color = "#8c3b31",
}

save_entry > time {
    layout = "lined",
    line_height = 30,
    width = 200,
    x = parent_width - 150,
}

save_entry > time > @text {
    font_size = 25,
    font_color = "#FAFFBF",
}

save_entry(hover=true) > time > @text {
    font_color = "#8c3b31",
}
save_entry(selected=true) > time > @text {
    font_color = "#8c3b31",
}

save_entry > delete_save(on_click=click) {
    height = parent_height,
    width = 200,
    x = parent_width - 20,
    can_hover = true,
    on_mouse_move_over = "ui.tooltip#
        local key = 'delete_save' .. tostring(node:get_property_string('entry'))
        local tooltip = 'Delete the save file'

        local content = ui.new('content')
        add_text(content, tooltip)

        ui.show_tooltip(key, content, evt.x, evt.y)
    ",
    on_mouse_move_out = "init#
        local key = 'delete_save' .. tostring(node:get_property_string('entry'))
        ui.hide_tooltip(key)
    ",
    on_mouse_move = "init#
        local key = 'delete_save' .. tostring(node:get_property_string('entry'))
        ui.move_tooltip(key, evt.x, evt.y)
    ",

    on_mouse_up = click,
}
save_entry > delete_save > @text {
    height = parent_height,
    width = parent_width,
    x = 0,
    y = -3,
    font_size = 32,
    font_color = rgb(100, 0, 0),
}
save_entry(hover=true) > delete_save > @text {
    font_color = rgb(255, 0, 0),
}