chattext verschieben

Übersicht BlitzBasic Beginners-Corner

Neue Antwort erstellen

mas93

Betreff: chattext verschieben

BeitragSa, Jun 23, 2007 10:45
Antworten mit Zitat
Benutzer-Profile anzeigen
hi, ICh will jetzt gerade nen kleinen chat versuchen.
ICh habs so versucht:
Code: [AUSKLAPPEN]

Graphics 640,480,16,2
SetBuffer BackBuffer()
Global antwort$,backtime = MilliSecs(),ccolor,stelle
Global showbox

Type satz
Field x
Field y
Field inhalt$
End Type


While Not KeyDown(1)

If KeyHit(28) Then showbox=showbox+1

If showbox=1
befehl$ = newinput$(100,100,300,200,">>", 40)
EndIf 
Text 20,20,showbox

If showbox=2 Then
 s.satz= New satz
  s\inhalt$=antwort$

If stelle=0 Then s\x=5 :s\y=5
If stelle=1 Then s\x=5 :s\y=20
If stelle=2 Then s\x=5 :s\y=35
If stelle=3 Then s\x=5 :s\y=50
If stelle=4 Then s\x=5 :s\y=65
stelle=stelle+1
showbox=0 :antwort=""
EndIf



For s.satz=Each satz
 Text s\inhalt$,s\x,s\y
Next

If showbox=3 Then
showbox=0
antwort=""
EndIf

   Flip
   Cls
Wend

Function newinput$(x1,y1,x2,y2,frage$,maxl)
If KeyHit(28) Then showbox=showbox+1
   a = GetKey()
   If a => 32 And a <= 255 And Len(antwort$) <= maxl-1 Then antwort$ = antwort$ + Chr$(a)   
   If KeyDown(14) Or KeyDown(203) And Len(antwort$) > 0 And MilliSecs()-backtime > 125 Then
      antwort$ = Left(antwort$,(Len(antwort$)-1))
      backtime = MilliSecs()
   End If

   Color 135,0,45
   Rect x1, y1,x2-x1+170, y2-y1-80,1
   Color 185,0,60
   Rect x1, y1,x2-x1+170, y2-y1-80,0
   textlange = StringWidth(antwort$) ;Blinkener Cursor
   texthohe = StringHeight(antwort$)
   fragelange = StringWidth(frage$)
   Color ccolor,50,0
   Rect x1+28+(Len(antwort$)*8),y1+4,10,texthohe-1,1
   ccolor = ccolor + 5
   If ccolor = 255 Then ccolor = 100
 
   Color 255,255,255
   Text x1+3,y1+3, frage$ + " " + antwort$




End Function


Nur funktioniert das so nich richtig.
Wie würdet ihr das machen??

Ich brauch nur n kleinen tipp
wäre nett wenn ihr mir da n bisschne auf die sprünge helfen könntet

mfg
mas93
www.lpbase.de
Meine Linkin Park Fanseite[Noch im Aufbau]
 

Beatenvoy

BeitragSo, Jun 24, 2007 1:19
Antworten mit Zitat
Benutzer-Profile anzeigen
Machs mit Dims!

Neue Antwort erstellen


Übersicht BlitzBasic Beginners-Corner

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group