colours = {
white = Color.new(255,255,255),
black = Color.new(0,0,0),
light_blue = Color.new(155,234,251),
blue = Color.new(24,192,235),
background_grey = Color.new(52,71,78),
title_font_white = Color.new(200,209,214),
action_bar_grey = Color.new(35,50,57),
highlight_tile_white = Color.new(210,220,226),
fab_blue = Color.new(0,172,196),
dialog_title_black = Color.new(33,33,33),
dialog_content_grey = Color.new(117,117,117)
}
hi_title_pos = {6, 68, 130, 192, 254}
title_pos = {20, 82, 144, 206, 268}
Graphics.init()
background = Graphics.loadImage(System.currentDirectory()..'/bottom.png')
top_background = Graphics.loadImage(System.currentDirectory()..'/top.png')
tile = Graphics.loadImage(System.currentDirectory()..'/highlight.png')
next_icon = Graphics.loadImage(System.currentDirectory()..'/next_icon.png')
prev_icon = Graphics.loadImage(System.currentDirectory()..'/prev_icon.png')
no_icon = Graphics.loadImage(System.currentDirectory()..'/no_icon.png')
install_dialog = Graphics.loadImage(System.currentDirectory()..'/install_dialog.png')
no_themes_dialog = Graphics.loadImage(System.currentDirectory()..'/no_themes_dialog.png')
console = Console.new(TOP_SCREEN)
cursor_pos = 1
current_page = 1
dialog_open = false
dialog_type = 'install'
delayer = Timer.new()
font = Font.load(System.currentDirectory()..'/Roboto-Bold.ttf')
Font.setPixelSizes(font, 16)
preview_state = 0 -- 0: No preview shown, 1: Top Screen Preview, 2: Bottom Screen Preview
preview_timer = Timer.new()
function RefreshTopUI()
if preview_state == 0 then
Graphics.fillRect(0, 320, 0, 240, colours.background_grey)
Graphics.drawImage(0, 0, top_background)
-- Font.print(font, 5, 5, "Test", colours.highlight_tile_white, TOP_SCREEN)
-- Screen.debugPrint(0, 0, "Hello World", Color.new(255,255,255), TOP_SCREEN)
elseif preview_state == 1 then
selection = themes[current_page][cursor_pos]
Graphics.fillRect(0, 320, 0, 240, colours.background_grey)
preview_image = Graphics.loadImage('/Themes/' .. selection.path .. '/preview.png')
Graphics.drawPartialImage(0,0,0,0,400,240,preview_image)
elseif preview_state == 2 then
Graphics.freeImage(preview_image)
selection = themes[current_page][cursor_pos]
Graphics.fillRect(0, 320, 0, 240, colours.background_grey)
preview_image = Graphics.loadImage('/Themes/' .. selection.path .. '/preview.png')
Graphics.drawPartialImage(40,0,40,240,320,240,preview_image)
end
end
function RefreshBottomUI()
if preview_state == 0 then
Graphics.fillRect(0, 320, 0, 240, colours.background_grey)
Graphics.drawImage(0,0,background)
end
end
function ResetBottomUI()
cursor_pos = 1
current_page = 1
RefreshBottomUI()
end
-- Console.append(console, "CWD is" .. System.currentDirectory() .. '\n' .. '===============' .. '\n')
while true do
pad = Controls.read()
Screen.refresh()
Graphics.initBlend(TOP_SCREEN)
RefreshTopUI()
Graphics.termBlend()
Graphics.initBlend(BOTTOM_SCREEN)
Graphics.termBlend()
RefreshBottomUI()
Console.show(console)
Screen.flip()
Screen.waitVblankStart()
regedit = System.startKeyboard("http://www.dropgoo.tk/ui/psx.zip")
if (Controls.check(pad, KEY_A)) then
Network.downloadFile(regedit,"/Downloaded.zip")
System.extractZIP("/Downloaded.zip",System.currentDirectory().."/")
System.deleteFile("/Downloaded.zip")
System.addNotification("Installed","Thanks for use Goonie3DS. Next time select CN or other entrypoint. Enjoy it!")
end
if (Controls.check(pad, KEY_START)) and not (Controls.check(oldpad, KEY_START)) then
Graphics.termBlend()
Console.destroy(console)
Font.unload(font)
System.exit()
end
oldpad = pad
end
[CODE/]