Bun venit pe SkullBox!

Bine ai venit, Vizitator. Trebuie să te autentifici sau să îţi creezi un cont.
Ai pierdut sau nu ai primit emailul care conţine codul de activare al contului?

Autentifică-te cu numele de utilizator, parola şi precizează durata sesiunii.
  Pagini: [1]
  Imprimă  
[DBPro] Text Button  (Vizualizari 455)
Challenge
*

Deconectat Deconectat

Mesaje: 96

[DBPro] Text Button, Dec 04, 2007, 18:50

Un exemplu cum poti sa faci butoane pentru un meniu,etc.

Cod:
Do

if Button(20,55,"New Game")=1 then Goto New_Game
Button(20,66,"Load Game")
Button(40,50,"Save Game")
If Button(20,175,"Exit")=1 then End

loop

New_Game:
instructiunea_1
instructiunea_2
instructiunea_3
.....................
instructiunea_n

function Button(x1,y1,WORDS$)
      Pressed=0
      x2=Text Width(WORDS$)
      y2=Text Height(WORDS$)
      if mousex()>x1 and mousex()             if mousey()>y1-y2 and mousey()                   Pressed=1
             endif
      endif
      if pressed=1 then ink rgb(255,0,0),0 else ink rgb(255,255,255),0
      if pressed=1
             pressed=Mouseclick()
      else
             pressed = 0
     endif
     text x1,y1,WORDS$
endfunction pressed
Memorat
zapakitul
*

Deconectat Deconectat

Mesaje: 1470

[DBPro] Text Button, Dec 07, 2007, 08:51

opa opa Big grin! Inca un DBPRO user perfect Big grin!
Superba functie! Chiar renunt la a mea cu bttnClick Big grin! E mai simpla aceasta!
Memorat

A DS , my kindom for a  DS!

Un Pc De Carcasa Noua Blog
SkullAds
Ecspert
ReclAmator
* * * * *
Google AdSense

Gen: Bărbat
Mesaje: Multe

Reclama AdSense,
 

 
   


Pagini: [1]
  Imprimă  
 
Schimbă forumul:  

Ethical hacking and programming community
Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Traducerea în limba română © 2006-2007 www.smf.ro