et j'ai ça
(avec luna online)
mon code
- Code: Select all
icon = image.new("\015\000\000\000\015\000\000\000\000\000\000\000\030\000\000\000\016\000\001\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\224\131\224\131\224\131\224\131\224\131\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\128\000\000\224\131\000\000\000\000\000\000\000\000\000\000\224\131\000\000\000\128\000\000\000\000\000\000\000\128\000\000\224\131\000\000\000\000\224\127\000\000\000\000\000\000\000\000\224\131\000\000\000\128\000\000\000\000\000\128\224\131\000\000\000\124\000\124\000\124\000\124\000\124\000\124\000\124\000\000\224\131\000\128\000\000\000\128\224\131\000\000\000\124\000\252\000\252\000\124\000\124\000\124\000\124\000\124\000\124\000\000\224\131\000\128\000\128\224\131\000\000\000\252\000\124\000\000\224\127\000\252\000\000\000\252\000\000\000\252\000\000\224\131\000\128\000\128\224\131\000\000\000\252\000\124\000\124\224\127\000\252\000\000\000\252\000\000\000\252\000\000\224\131\000\128\000\128\224\131\000\000\000\252\000\124\000\124\224\127\000\252\224\127\000\252\000\000\000\252\000\000\224\131\000\128\000\128\224\131\000\000\000\124\000\252\000\252\224\003\000\252\000\124\000\252\000\124\000\252\000\000\224\131\000\128\000\000\000\128\224\131\000\124\000\124\000\124\224\003\000\124\000\252\224\003\000\252\000\000\224\131\000\128\000\000\000\000\000\128\000\000\224\131\000\000\000\000\000\000\000\000\000\124\000\000\000\000\224\131\000\000\000\128\000\000\000\000\000\000\000\128\000\000\224\131\000\000\000\000\000\000\000\000\000\000\224\131\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\128\000\128\224\131\224\131\224\131\224\131\224\131\000\128\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\128\000\128\000\128\000\128\000\000\000\000\000\000\000\000\000\000")
progressbar=0
move=0
move2=0
color=0
color2=0
finish=0
finish2=0
time=0
wh = platform.window:height()
ww = platform.window:width()
timer.start(0.01)
function on.timer(gc)
if progressbar<100 then
if math.random(1,10)==1 then
progressbar = progressbar+2
color = progressbar*2.55
function on.paint(gc)
gc:setFont("sansserif","r","8")
w = gc:getStringWidth(progressbar.."%")
h = gc:getStringHeight(progressbar.."%")
gc:setColorRGB(color,color,color)
gc:fillRect(0,0,ww,wh)
gc:setColorRGB(0,100,255)
gc:fillRect((ww-progressbar-((ww/4)-3))/2,(wh-17)/2,progressbar+((ww/4)-1),20)
gc:setColorRGB(50,130,255)
gc:fillRect((ww-progressbar-((ww/4)-3))/2,(wh-17)/2,progressbar+((ww/4)-1),10)
gc:setColorRGB(255-color,255-color,255-color)
gc:drawLine((ww-progressbar-(ww/4)+3)/2,(wh-20)/2,(ww+progressbar+(ww/4)-3)/2,(wh-20)/2)
gc:drawLine((ww-progressbar-(ww/4)+3)/2,(wh+20)/2,(ww+progressbar+(ww/4)-3)/2,(wh+20)/2)
gc:drawLine((ww-progressbar-(ww/4))/2,(wh+19)/2,(ww-progressbar-(ww/4))/2,(wh-18)/2)
gc:drawLine((ww+progressbar+(ww/4))/2,(wh+19)/2,(ww+progressbar+(ww/4))/2,(wh-18)/2)
gc:setColorRGB(255-color,255-color,255-color)
gc:drawString(progressbar.."%",(ww-w)/2,wh/2,"middle")
gc:setColorRGB(0,0,0)
gc:fillRect(0,wh-25,ww,25)
gc:setColorRGB(30,30,30)
gc:fillRect(0,wh-25,ww,12.5)
gc:setColorRGB(40,40,40)
gc:drawLine(0,wh-25,ww,wh-25)
wc = gc:getStringWidth("CW inc. ©2012")
hc = gc:getStringHeight("CW inc. ©2012")
wd = gc:getStringWidth("Now loading...")
hd = gc:getStringHeight("Now loading...")
gc:setColorRGB(255,255,255)
gc:drawString("CW inc. ©2012",ww-wc-25,wh-hc-5,"top")
gc:drawString("Now loading...",(ww-wd)/2,wh-hd-5,"top")
gc:drawImage(icon,ww-20,wh-20)
end
platform.window:invalidate()
end
else
if move<wh then
move=move+5
function on.paint(gc)
gc:setFont("sansserif","r","8")
w = gc:getStringWidth(progressbar.."%")
h = gc:getStringHeight(progressbar.."%")
gc:setColorRGB(color,color,color)
gc:fillRect(0,0,ww,wh)
gc:setColorRGB(0,100,255)
gc:fillRect((ww-progressbar-((ww/4)-3))/2,(wh-17)/2,progressbar+((ww/4)-1),20)
gc:setColorRGB(50,130,255)
gc:fillRect((ww-progressbar-((ww/4)-3))/2,(wh-17)/2,progressbar+((ww/4)-1),10)
gc:setColorRGB(255-color,255-color,255-color)
gc:drawLine((ww-progressbar-(ww/4)+3)/2,(wh-20)/2,(ww+progressbar+(ww/4)-3)/2,(wh-20)/2)
gc:drawLine((ww-progressbar-(ww/4)+3)/2,(wh+20)/2,(ww+progressbar+(ww/4)-3)/2,(wh+20)/2)
gc:drawLine((ww-progressbar-(ww/4))/2,(wh+19)/2,(ww-progressbar-(ww/4))/2,(wh-18)/2)
gc:drawLine((ww+progressbar+(ww/4))/2,(wh+19)/2,(ww+progressbar+(ww/4))/2,(wh-18)/2)
gc:setColorRGB(255-color,255-color,255-color)
gc:drawString(progressbar.."%",(ww-w)/2,wh/2,"middle")
gc:setColorRGB(0,0,0)
gc:fillRect(0,wh-25,ww,25)
gc:setColorRGB(30,30,30)
gc:fillRect(0,wh-25,ww,12.5)
gc:setColorRGB(40,40,40)
gc:drawLine(0,wh-25,ww,wh-25)
wc = gc:getStringWidth("CW inc. ©2012")
hc = gc:getStringHeight("CW inc. ©2012")
wd = gc:getStringWidth("Now loading...")
hd = gc:getStringHeight("Now loading...")
gc:setColorRGB(255,255,255)
gc:drawString("CW inc. ©2012",ww-wc-25,wh-hc-5,"top")
gc:drawString("Now loading...",(ww-wd)/2,wh-hd-5,"top")
gc:drawImage(icon,ww-20,wh-20)
gc:setFont("sansserif","r","8")
gc:setColorRGB(0,0,0)
gc:fillRect(0,(wh-move)/2,ww,move)
gc:drawImage(icon,ww-20,wh-20)
wc = gc:getStringWidth("CW inc. ©2012")
hc = gc:getStringHeight("CW inc. ©2012")
gc:setColorRGB(255,255,255)
gc:drawString("CW inc. ©2012",ww-wc-25,wh-hc-5,"top")
end
platform.window:invalidate()
else
if color2<255 then
color2=color2+15
function on.paint(gc)
gc:drawImage(icon,ww-20,wh-20)
gc:setFont("sansserif","r","8")
gc:setColorRGB(0,0,0)
gc:fillRect(0,0,ww,wh)
gc:drawImage(icon,ww-20,wh-20)
wc = gc:getStringWidth("CW inc. ©2012")
hc = gc:getStringHeight("CW inc. ©2012")
gc:setColorRGB(255-color2,255-color2,255-color2)
gc:drawString("CW inc. ©2012",ww-wc-25,wh-hc-5,"top")
end
platform.window:invalidate()
else
if finish < 1 then
finish = finish+1
function on.paint(gc)
gc:setColorRGB(0,0,0)
gc:fillRect(0,0,ww,wh) gc:drawImage(icon,(ww/2)-7.5,(wh/2)-15)
end
platform.window:invalidate()
else
if time<20 then
time=time+1
if move2<wh/8 then
move2=move2+1
function on.paint(gc)
gc:setColorRGB(0,0,0)
gc:fillRect(0,0,ww,wh) gc:drawImage(icon,(ww/2)-7.5,(wh/2)-15-move2)
end
platform.window:invalidate()
end
end
end
end
end
end
end