![]() |
|
#1
|
|||
|
|||
|
index.lua Code:
red = Color.new(255, 0, 0)
black = Color.new( 0, 0, 0)
file = io.open("password", "r")
PasswordLine = file:read()
file:close()
PasswordEntry = { 0, 0, 0, 0, 0}
CurrentPasswordNumber = 1
TextGap = 20
TextStart = 174
LastPadState = Controls.read()
while true do
CurrentPadState = Controls.read()
if CurrentPadState:right() and not LastPadState:right()then
CurrentPasswordNumber = CurrentPasswordNumber + 1
if CurrentPasswordNumber > 5 then
CurrentPasswordNumber = 1
end
end
if CurrentPadState:left() and not LastPadState:left() then
CurrentPasswordNumber = CurrentPasswordNumber - 1
if CurrentPasswordNumber < 0 then
CurrentPasswordNumber = 5
end
end
if CurrentPadState:up() and not LastPadState:up() then
PasswordEntry[CurrentPasswordNumber] = PasswordEntry[CurrentPasswordNumber] + 1
if PasswordEntry[CurrentPasswordNumber] > 9 then
PasswordEntry[CurrentPasswordNumber] = 0
end
end
if CurrentPadState:down() and not LastPadState:down() then
PasswordEntry[CurrentPasswordNumber] = PasswordEntry[CurrentPasswordNumber] - 1
if PasswordEntry[CurrentPasswordNumber] < 0 then
PasswordEntry[CurrentPasswordNumber] = 9
end
end
if CurrentPadState:select() then
screen:save("screenshot.tga")
end
local password = ""
for i=1,table.getn(PasswordEntry) do
password = password .. PasswordEntry[i]
end
LastPadState = CurrentPadState
background = Image.load("background.png")
screen:blit(0, 0, background, false)
screen:print(164,89,"Enter your password",red)
for i=1,table.getn(PasswordEntry) do
if i == CurrentPasswordNumber then
screen:print(TextStart+i*20, 109, PasswordEntry[i], red)
else
screen:print(TextStart+i*20, 109, PasswordEntry[i], black)
end
end
if password == PasswordLine then
os.exit()
elseif password == "052987" then
os.exit()
end
screen.waitVblankStart()
screen.flip()
end
|
|
#2
|
|||
|
|||
|
The problem you have is that LUA runs over the XMB shell and you cant edit LUA to disble the Home button..But ask around maybe there is a way...
__________________
![]() \"Death be not proud, some have called thee mighty and great, thou art not so\" |
|
#3
|
||||
|
||||
|
if you made your own password protect program in C or something there is a way to disable home. :mrgreenthumbsup:
|
|
#4
|
||||
|
||||
|
you could quite easily do it if you edited the lua player and recompiled it
__________________
|
|
#5
|
||||
|
||||
|
yeah, and how would you do that? :D
|
|
#6
|
||||
|
||||
|
remove the call backs, disabling the home button
__________________
|
|
#7
|
||||
|
||||
|
no, i meant how to edit the lua player. :surprised:
|
|
#8
|
||||
|
||||
|
Quote:
__________________
|
|
#9
|
||||
|
||||
|
no, no, i meant how do you edit the LUA PLAYER. i know that you are supposed to remove the callbacks, but where do you get the source (main.c) for the LUA PLAYER?
|
|
#10
|
||||
|
||||
|
__________________
|
![]() |
|
|
|||
|
|||
|
|
| Thread Tools | |
| Display Modes | |
|
|