
--/|----------------------|\--
--||*~Made by Psgarsenal~*||--
--||*~~~~~~~~~~~~~~~~~~~~*||--
--||*~blog.bendermix.org~*||--
--\|______________________|/--

require("Addons")
Drivers.Install()
search = "Google"-- texte recherche google
bureau = 2--position bureau
google_souris = 0
option_selecteur = 1
s = 460
boot = Image.load("IMG/boot.png")
option_selecteur = 1 -- selecteur menu bureau
curx = 240--]Position
cury = 136--] Souris
y_menu = 218--Position Menu
menu = Image.load("IMG/menu.png")
y_notif = -246
notif = Image.load("IMG/notif.png")
USBpic = Image.load("IMG/USB.png")
bar = Image.load("IMG/bar.png")
option_norm = Image.load("IMG/option_norm.png")--]Barre
option_sele = Image.load("IMG/option_sele.png")--]Options
--batterie
bat100=Image.load("IMG/BAT/100.png")
bat80=Image.load("IMG/BAT/80.png")
bat60=Image.load("IMG/BAT/60.png")
bat40=Image.load("IMG/BAT/40.png")
bat20=Image.load("IMG/BAT/20.png")
batcharg=Image.load("IMG/BAT/CHARGE.png")
--widget
img_google=Image.load("IMG/google.png")
img_google_OK=Image.load("IMG/googleok.png")
font = Font.load("droid.ttf")
font:setPixelSizes(16,16)
big_font = Font.load("droid.ttf")
big_font:setPixelSizes(24,26)
small_font = Font.load("droid.ttf")
small_font:setPixelSizes(10,10)
--dofile
dofile("SYSTEM/firstrun.lua")
dofile("SYSTEM/fonctions.lua")
dofile("SYSTEM/widget.lua")
dofile("SYSTEM/menu.lua")
dofile("SYSTEM/notif.lua")
--couleur
blanc = Color.new(255,255,255)
noir = Color.new(0,0,0)
--Apps
System.currentDirectory("ms0:/PSP/GAME/Android/APPS")
Apps = System.listDirectory()
System.currentDirectory("ms0:/PSP/GAME/Android/")
while true do
 screen:clear()
 screen:blit(0,0,boot)

 if firstrun==true then
  System.message("Bienvenue sur Android Shell\n"..
                 "Psgarsenal\n"..
                 "Premiere utilisation\n"..
                 "Presente sur PSPGEN\n"..
                 "Beta 1.2\n"..
                 "Besoin d'aide?\n"..
                 "Appuyez sur triangle\n",0)
  firstrun = false
  firstrun_file = io.open("ms0:/psp/game/Android/system/firstrun.lua","w")
  firstrun_file:write("firstrun = false")
  firstrun_file:close()
  wall_file = io.open("ms0:/psp/game/Android/wall/options.ini","w")
  wall_file:write("wall_choisis = 'matrix.lua'")
  wall_file:close()
  cur_file = io.open("ms0:/psp/game/Android/img/curseurs/options.ini","w")
  cur_file:write("curseur_choisis = '4.png'")
  cur_file:close()
  cur_sens_file = io.open("ms0:/psp/game/Android/img/curseurs/sensibilite.ini","w")
  cur_sens_file:write("sens_cur = 15")
  cur_sens_file:close()
  dev_file = io.open("ms0:/psp/game/Android/system/dev.lua","w")
  dev_file:write("dev = false")
  dev_file:close()
 end
 
 screen:drawLine(0,260,480-s,260,Color.new(100,255,100))
 screen:drawLine(0,261,480-s+1,261,Color.new(80,255,80))
 screen:drawLine(0,262,480-s+2,262,Color.new(60,255,60))
 screen:drawLine(0,263,480-s+3,263,Color.new(40,255,40))
 screen:drawLine(0,264,480-s+4,264,Color.new(20,255,20))
 screen:drawLine(0,265,480-s+5,265,Color.new(0,255,0))
 
 if s>=0 then
 s=s-8
 end
 if s<=0 then
 dofile("SYSTEM/bureau.lua")
 end
 screen.flip()
 screen.waitVblankStart()
end
