π
<-

Problème

Pour TI-Nspire OS 3.0 ou ultérieur.

Re: Problème

Unread postby AlexRider38 » 04 Jan 2012, 14:00

finalement j'utilise la version en ligne ça marche bien sauf pour un de mes codes où je devrais avoir ça
Image 3.jpg
(avec oclua)
et j'ai ça
Image 1.jpg
(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

You do not have the required permissions to view the files attached to this post.
Donald Knuth wrote:
Beware of bugs in the above code; I have only proved it correct, not tried it.
User avatar
AlexRider38Généreux
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 68.5%
 
Posts: 650
Images: 0
Joined: 03 Nov 2010, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile

Re: Problème

Unread postby critor » 04 Jan 2012, 14:53

Ton code de barre de progression marche très bien sous le prochain OS, aussi bien sur la calculatrice que sous le logiciel en mode calculatrice ou même en mode ordinateur.

Très joli d'ailleurs! ;)


L'émulateur en ligne fonctionne lui en mode ordinateur, mais j'avais effectivement noté quelques différences de comportement par rapport au logiciel... on doit être en plein dedans.
Image
User avatar
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Level up: 53.2%
 
Posts: 42384
Images: 17086
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
MyCalcs profile
YouTube: critor3000
Twitter: critor2000
GitHub: critor

Re: Problème

Unread postby AlexRider38 » 04 Jan 2012, 15:59

merci beaucoup et ok pour le problème
au fait tu sais un peu quand ça vas sortir cet OS et Ndless?
Donald Knuth wrote:
Beware of bugs in the above code; I have only proved it correct, not tried it.
User avatar
AlexRider38Généreux
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 68.5%
 
Posts: 650
Images: 0
Joined: 03 Nov 2010, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile

Re: Problème

Unread postby Lionel Debroux » 04 Jan 2012, 16:10

On ne sait ni l'un, ni l'autre ;)
Membre de la TI-Chess Team.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
User avatar
Lionel DebrouxSuper Modo
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 11.4%
 
Posts: 6873
Joined: 23 Dec 2009, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Class: -
GitHub: debrouxl

Re: Problème

Unread postby AlexRider38 » 04 Jan 2012, 16:12

ok
Comment on peut faire parti de l'équipe de testeur que vous êtes?
Donald Knuth wrote:
Beware of bugs in the above code; I have only proved it correct, not tried it.
User avatar
AlexRider38Généreux
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 68.5%
 
Posts: 650
Images: 0
Joined: 03 Nov 2010, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile

Previous

Return to Nspire-Lua

Who is online

Users browsing this forum: ClaudeBot [spider] and 3 guests

-
Search
-
Social TI-Planet
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
2477 utilisateurs:
>2424 invités
>46 membres
>7 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)