Also are menu's like in ttlde's file quite hard/easy to make?
here's my code:
Code: Select all
-- PSPOffice
--created by Glynnder
dblue = Color.new(0, 0, 255)
red = Color.new(230, 0, 0)
pink = Color.new(255, 0 , 153)
blue = Color.new(0 , 153, 255)
orange = Color.new(255, 102, 0)
gray = Color.new(153, 153, 153)
black = Color.new(0 , 0 , 0)
white = Color.new(255, 255, 255)
screen:print(194, 136, "loading: 0%", red)
screen.flip()
background = Image.load("images/home.png")
screen:clear()
screen:print(194, 136, "loading 20%", pink)
screen. flip()
pstype = Image.load("images/pstypebutton.png")
--created by glynnder
screen:clear()
screen:print(194, 136, "Loading: 40%", pink)
screen.flip()
psdraw = Image.load("images/psdrawbutton.png")
x1 = 0 ; x0 = 0 ; y1 = 0 ; y0 = 0
screen:clear()
screen:print(194, 136, "Loading: 60%", pink)
screen.flip()
pscalc = Image.load("images/pscalcbutton.png")
screen:clear()
screen:print(194, 136, "Loading: 80%", pink)
screen.flip()
links = Image.load("images/linksbutton.png")
screen:clear()
screen:print(194, 136, "Loading: 90%", pink)
screen.flip()
bg2 = Image.load("images/apps.png")
cursor = Image.load("images/cursor.png")
screen:clear()
screen:print(194, 136, "Loading: 100%", pink)
screen.flip() 
screen.waitVblankStart(60)
screen.flip()
while true do
          screen:blit(0, 0, background, false)
		  screen:blit(30, 150, pstype, true)
		  screen:blit(100, 195, pscalc, true)
		  screen:blit(285, 195, psdraw, true)
		  screen:blit(355, 150, links, true)
		  	time = os.time()
        	dateString = os.date("%c")
			screen:print(1, 1, os.date(), red)
			dateFields = os.date("*t")
			hour = dateFields.hour
			if hour < 10 then
				hour = "0" .. hour
			end
			min = dateFields.min
			if min < 10 then
			min = "0" .. min
			end
	sec = dateFields.sec
	if sec < 10 then
		sec = "0" .. sec
	end
      screen:print(30, 260, "Press 'Start' to quit", blue)
      screen:print(400, 1, "Batt:", red)
      if  (System.powerIsLowBattery()) == true then
	  screen:print(440, 1, tostring(System.powerGetBatteryLifePercent()) .. "%", blue)
	  else screen:print(450, 1, tostring(System.powerGetBatteryLifePercent()) .. "%", red)
	  end
	  if (System.powerIsBatteryCharging()) == true then
	  screen:print(457, 1, "+", red) end 
                screen:print(300, 260, "'Select' = Screenshot", white)
          pad = Controls.read() 
          screen.flip()
                   
          if pad:start() then
                    break
          end          
          if pad:select() then
          screen:save("screenshot.jpg")  
function analogS() 
   pad = Controls.read() 
   dx = pad:analogX() 
   if math.abs(dx) > 32 then 
      x0 = x1 + dx / 64 
   end 
   dy = pad:analogY() 
   if math.abs(dy) > 32 then 
      y0 = y1 + dy / 64 
   end 
end 
screen:blit(x0, y0, cursor, true)
screen.flip()
      end
	  end