Skip to content

Commit

Permalink
Update v2.01
Browse files Browse the repository at this point in the history
  • Loading branch information
ONElua authored Nov 28, 2017
1 parent f18fad5 commit 383bf1e
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 69 deletions.
2 changes: 1 addition & 1 deletion ONEMenuVita/git/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ APP_PROJECT = "ONEMenu-for-PSVita"
APP_VPK = "ONEMenuVita"

APP_VERSION_MAJOR = 0x02 -- major.minor
APP_VERSION_MINOR = 0x00
APP_VERSION_MINOR = 0x01

APP_VERSION = ((APP_VERSION_MAJOR << 0x18) | (APP_VERSION_MINOR << 0x10)) -- Union Binary
1 change: 0 additions & 1 deletion ONEMenuVita/git/updater.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ function screen.flip()
files.copy("eboot.bin","ux0:/data/1luapkg")
files.copy("git/updater/script.lua","ux0:/data/1luapkg/")
files.copy("git/updater/param.sfo","ux0:/data/1luapkg/sce_sys/")
files.delete("ux0:data/ONEMENU/config.ini")
game.installdir("ux0:/data/1luapkg")
files.delete("ux0:/data/1luapkg")
game.launch(string.format("ONEUPDATE&%s&%s",os.titleid(),path)) -- Goto installer extern!
Expand Down
5 changes: 5 additions & 0 deletions ONEMenuVita/sce_sys/changeinfo/changeinfo.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<changeinfo>
<changes app_ver="02.01">
<![CDATA[
- Fix and more Fix errors.<br>
]]>
</changes>
<changes app_ver="02.00">
<![CDATA[
- [NEW] Icons and games list loading time reduced everytime Onemenu is started.<br>
Expand Down
2 changes: 1 addition & 1 deletion ONEMenuVita/sce_sys/livearea/contents/template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<frame id="frame3">
<liveitem>
<text align="left" text-align="left" word-wrap="off" ellipsis="on">
<str size="26" color="#ffffff" shadow="on">v2.00</str>
<str size="26" color="#ffffff" shadow="on">v2.01</str>
</text>
</liveitem>
</frame>
Expand Down
Binary file modified ONEMenuVita/sce_sys/param.sfo
Binary file not shown.
114 changes: 62 additions & 52 deletions ONEMenuVita/system/appman.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ function isTouched(x,y,sx,sy)
end

categories = {
{ img = theme.data["psvita"] },
{ img = theme.data["hbvita"] },
{ img = theme.data["psm"] },
{ img = theme.data["retro"]},
{ img = theme.data["adrbb"]},
{ img = theme.data["fav"] },
{ img = theme.data["psvita"] }, --cat 1
{ img = theme.data["hbvita"] }, --cat 2
{ img = theme.data["psm"] }, --cat 3
{ img = theme.data["retro"]}, --cat 4
{ img = theme.data["adrbb"]}, --cat 5
{ img = theme.data["fav"] }, --cat 6
}

cat,limit,movx=1,7,0
cat,limit,movx=0,7,0
elev = 0

appman = {}
Expand All @@ -42,20 +42,22 @@ function fillappman(obj)
if __FAV == 1 then index = 6 else index = 3 end
obj.resize = true
obj.path_img = "ur0:appmeta/"..obj.id.."/pic0.png"

elseif obj.type == "EG" or obj.type == "ME" then
if __FAV == 1 then index = 6 else index = 4 end
obj.resize = true
obj.path_img = "ur0:appmeta/"..obj.id.."/livearea/contents/startup.png"

else

if files.exists(obj.path.."/data/boot.inf") or obj.id == "PSPEMUCFW" then
if __FAV == 1 then index = 6 else index = 5 end
else
local sfo = game.info(obj.path.."/sce_sys/param.sfo")
if sfo.CONTENT_ID:len() > 9 then
if __FAV == 1 then index = 6 else index = 1 end
if sfo and sfo.CONTENT_ID then
if sfo.CONTENT_ID:len() > 9 then
if __FAV == 1 then index = 6 else index = 1 end
else
if __FAV == 1 then index = 6 else index = 2 end
end
else
if __FAV == 1 then index = 6 else index = 2 end
end
Expand All @@ -72,6 +74,7 @@ function fillappman(obj)
if obj.resize then obj.img:resize(120,100) else obj.img:resize(120,120) end
end

appman.len += 1
table.insert(appman[index].list,obj)

end
Expand All @@ -89,28 +92,33 @@ function appman.refresh()
local list = game.list(__GAME_LIST_ALL)
table.sort(list, function (a,b) return string.lower(a.id)<string.lower(b.id) end)

appman.len = #list
for i=1,appman.len do
for i=1,#list do

if files.exists(list[i].path) then
list[i].fav = false
for j=1,#apps do
if list[i].id == apps[j] then list[i].fav = true end
end

if __ID != list[i].id then
if __FAV == 1 and #apps>0 then
if list[i].fav then fillappman(list[i]) end--Scan only Favs
else
__FAV=0
fillappman(list[i])
end
end
end

end

if __FAV == 1 then cat = 6 else cat = 1 end
if __FAV == 1 then cat = 6
else
local tmp=1
while tmp<5 do
if #appman[tmp].list > 0 then cat=tmp break end
tmp+=1
end
if cat == 0 then appman.len = 0 end
end

os.cpu(333)
os.gpuclock(gpu)
Expand Down Expand Up @@ -210,14 +218,12 @@ local search_icon,cont_icons = false,0
function appman.launch()

appman.refresh()

buttons.interval(10,10)
while true do

--Este for es una belleza!!!!
if not search_icon then
local gpu = os.gpuclock()
os.gpuclock(166)
os.cpu(444)
for i=1, #appman do
for j=1, #appman[i].list do

Expand All @@ -233,14 +239,14 @@ function appman.launch()
if entry.img then
appman[entry.i].list[entry.j].img = entry.img
end
cont_icons += 1
end
end

end
end
if cont_icons == appman.len then
os.delay(50)
os.gpuclock(gpu)
os.cpu(333)
search_icon = true
end
end
Expand All @@ -259,7 +265,7 @@ function appman.launch()
end

screen.flip()

if appman.len > 0 then
appman.ctrls()
end
Expand Down Expand Up @@ -306,44 +312,44 @@ local manual_callback = function ()
end

local uninstall_callback = function ()
if appman[cat].list[focus_index].id != __ID then
if os.message(strings.appremove + appman[cat].list[focus_index].id + "?",1) == 1 then
if theme.data["back"] then theme.data["back"]:blit(0,0) end
message_wait()
buttons.homepopup(0)
reboot=false

if os.message(strings.appremove + appman[cat].list[focus_index].id + "?",1) == 1 then
if theme.data["back"] then theme.data["back"]:blit(0,0) end
message_wait()
buttons.homepopup(0)
reboot=false

local result_rmv = game.delete(appman[cat].list[focus_index].id)
buttons.homepopup(1)
reboot=true
if result_rmv == 1 then
local result_rmv = game.delete(appman[cat].list[focus_index].id)
buttons.homepopup(1)
reboot=true
if result_rmv == 1 then

if theme.data["back"] then theme.data["back"]:blit(0,0) end
if theme.data["back"] then theme.data["back"]:blit(0,0) end

table.remove(appman[cat].list, appman[cat].scroll.sel)
appman[cat].scroll.maxim=#appman[cat].list
if #appman[cat].list < 1 then
while #appman[cat].list < 1 do
cat += 1
if cat > #appman then cat = 1 end
end
else
table.remove(appman[cat].list, appman[cat].scroll.sel)
appman[cat].scroll.maxim=#appman[cat].list

if #appman[cat].list < 1 then
while #appman[cat].list < 1 do
cat += 1
if cat > #appman then cat = 1 end
end
else

if appman[cat].scroll.sel==appman[cat].scroll.lim then
if appman[cat].scroll.ini != 1 then appman[cat].scroll.ini-=1 end
appman[cat].scroll.sel-=1
appman[cat].scroll.lim=appman[cat].scroll.sel
elseif appman[cat].scroll.lim>#appman[cat].list then
appman[cat].scroll.lim-=1
if appman[cat].scroll.sel==appman[cat].scroll.lim then
if appman[cat].scroll.ini != 1 then appman[cat].scroll.ini-=1 end
appman[cat].scroll.sel-=1
appman[cat].scroll.lim=appman[cat].scroll.sel
elseif appman[cat].scroll.lim>#appman[cat].list then
appman[cat].scroll.lim-=1
end
end
appman.len -= 1
infodevices()
end
appman.len -= 1
infodevices()
submenu_ctx.close = true
end
submenu_ctx.close = true
end

end

local switch_callback = function ()
Expand Down Expand Up @@ -434,6 +440,10 @@ local switch_callback = function ()
appman[cat].list[focus_index].path = "uma0:app/"..appman[cat].list[focus_index].id
appman[cat].list[focus_index].dev = "uma0"
end
if appman[cat].list[focus_index].id == __ID then
os.message(strings.restart)
power.restart()
end

elseif result ==-4 then os.message(strings.nomemory) end

Expand Down
8 changes: 4 additions & 4 deletions ONEMenuVita/system/explorer/commons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ function show_scan(infovpk)
draw.fillrect(x,y,420,420,color.new(0x2f,0x2f,0x2f,0xff))
draw.framerect(x,y,420,420,color.black, color.shine,6)

screen.print(960/2,y+35,infovpk.name,1,color.black,color.blue,__ACENTER)
screen.print(960/2,y+85,strings.total_sizevpk..tostring(realsize),1,color.black,color.blue,__ACENTER)
screen.print(960/2,y+115,strings.count..tostring(vpk.len),1,color.black,color.blue,__ACENTER)
screen.print(960/2,y+35,infovpk.name,1,color.white,color.blue,__ACENTER)
screen.print(960/2,y+85,strings.total_sizevpk..tostring(realsize),1,color.white,color.blue,__ACENTER)
screen.print(960/2,y+115,strings.count..tostring(vpk.len),1,color.white,color.blue,__ACENTER)
screen.flip()

if buttons[accept] or buttons[cancel] then
Expand All @@ -112,7 +112,7 @@ function show_msg_vpk(obj_vpk)
if not #scan_vpk or #scan_vpk<=0 then return end
reboot=true

local bin_pos,icon_pos,sfo_pos=-1,-1,-1
local bin_pos,icon_pos,sfo_pos = -1,-1,-1
local unsafe=0
local dang,dangname=false,""

Expand Down
2 changes: 0 additions & 2 deletions ONEMenuVita/system/explorer/explorer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ maxim_files=16
backl, explorer, multi = {},{},{} -- All explorer functions
slidex=0

__BACKG = ""

-- ## Explorer Drawer List ## --
function explorer.listshow(posy)

Expand Down
8 changes: 4 additions & 4 deletions ONEMenuVita/system/lang/french.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cthemesman = "Thèmes LiveArea",
ftp = "FTP",
restarthb = "Redémarrer 1Menu",
reset = "Redémarrer PSVita",
off = "Eteindre",
off = "Eteindre la PSVita",

items = "Eléments Sel: ",

Expand Down Expand Up @@ -63,7 +63,7 @@ tags = "xx:xx:xx",
sounderror = "\nErreur format invalide",

--ONEMenu
switch = "\nVoulez-vous de switcher de patition ? ",
switch = "\nVoulez-vous de switcher de partition ? ",
nomemory = "\nPas assez d'espace...",
appremove = "\nVoulez-vous vraiment désinstaller \n\ncette application: ",
delclon = "\nVoulez-vous supprimer ce clone PSP ? ",
Expand All @@ -84,7 +84,7 @@ plugins = "Plugins",
getsize = "Calcul de la taille en cours...",
slides = "Vignettes : ",
pic1 = "Montrer PIC1: ",
fav = "Favourite: ",
fav = "Favoris: ",
up = "Haut",
down = "Bas",
original= "Original",
Expand Down Expand Up @@ -172,7 +172,7 @@ restart = "\nVotre PSVita va Redémarrer...",
shutdown = "\nVotre PSVita va s’Eteindre...",
pgf = "Police d'écriture type PGF",
pvf = "Police d'écriture type PVF",
favorites = "Section Favoris ",
favorites = "Activer la Section Favoris ",

------------ Favorites ---------------------------------------------------------------------------------
nofavorites = "Cette fonction ne peut-être activée...\n\nNécessite au moins un favoris",
Expand Down
6 changes: 3 additions & 3 deletions ONEMenuVita/system/menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function slides_efect()
appman[i].slide.acel=1
appman[i].slide.x-=8

if appman[i].slide.x < -(appman[i].slide.w) then appman[i].slide.x =- appman[i].slide.w end
if appman[i].slide.x < -(appman[i].slide.w) then appman[i].slide.x = -appman[i].slide.w end
if appman[i].slide.img then
appman[i].slide.img:blit(960 + appman[i].slide.x, __SLIDES)
end
Expand All @@ -40,8 +40,8 @@ end

function main_draw()

x_neg = -30
x_init = 40
x_neg = -35
x_init = 45
focus_x = 210
movx = submenu_ctx.x+submenu_ctx.w

Expand Down
2 changes: 1 addition & 1 deletion ONEMenuVita/system/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ end

function write_config()
ini.write(__PATHINI,"theme","id",__THEME)
ini.write(__PATHINI,"backg","img",__BACKG)
ini.write(__PATHINI,"backg","img",__BACKG)
ini.write(__PATHINI,"slides","pos",__SLIDES)
ini.write(__PATHINI,"pics","show",__PIC1)
ini.write(__PATHINI,"font","type",__FNT)
Expand Down

0 comments on commit 383bf1e

Please sign in to comment.