Skip to content

Commit

Permalink
Add proper error dialogue for when Tinker detects Menuhax Manager is …
Browse files Browse the repository at this point in the history
…not installed.
  • Loading branch information
Jono committed Jan 3, 2016
1 parent b8d2936 commit 6b0595a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions index.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if System.doesFileExist('/3ds/menuhax_manager/menuhax_manager.3dsx') ~= true then error("Menuhax Manager is not installed.") end
-- if System.doesFileExist('/3ds/menuhax_manager/menuhax_manager.3dsx') ~= true then error("Menuhax Manager is not installed.") end
-- error(System.currentDirectory())
colours = {
white = Color.new(255,255,255),
Expand All @@ -24,6 +24,7 @@ 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')
no_menuhax_dialog = Graphics.loadImage(System.currentDirectory()..'/no_menuhax_dialog.png')
console = Console.new(TOP_SCREEN)
cursor_pos = 1
current_page = 1
Expand Down Expand Up @@ -300,15 +301,20 @@ while true do
Timer.reset(preview_timer)
end
Graphics.initBlend(TOP_SCREEN)
if #themes ~= 0 then
if #themes ~= 0 and System.doesFileExist('/3ds/menuhax_manager/menuhax_manager.3dsx') then
RefreshTopUI()
else
Graphics.fillRect(0, 412, 0, 240, colours.background_grey)
end
Graphics.termBlend()
Graphics.initBlend(BOTTOM_SCREEN)
if #themes ~= 0 then
if #themes ~= 0 and System.doesFileExist('/3ds/menuhax_manager/menuhax_manager.3dsx') then
RefreshBottomUI()
elseif not System.doesFileExist('/3ds/menuhax_manager/menuhax_manager.3dsx') then
Graphics.fillRect(0, 320, 0, 240, colours.background_grey)
dialog_type = 'no_menuhax'
dialog_open = true
Graphics.drawImage(15, 31, no_menuhax_dialog)
else
Graphics.fillRect(0, 320, 0, 240, colours.background_grey)
dialog_type = 'no_themes'
Expand Down
Binary file added no_menuhax_dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6b0595a

Please sign in to comment.