Problem mit Fenstererstellung und Text im Fenster
Übersicht

![]() |
ChriseBetreff: Problem mit Fenstererstellung und Text im Fenster |
![]() Antworten mit Zitat ![]() |
---|---|---|
Da ich ja ein Fenster bauen will, will ich erstmal die Mauskoordinaten anzeigen lassen, damit cih weiß wo ich die koordinaten für knöpfe setze.
Das Problem ist jetzt, dass irgendwie bei mir die Textfunktion aufeinmal einfach den darunter liegenden Text überschreibt, das am schluss nur noch ein schwarzer kasten zu sehen ist. Früher gings irgendwie noch weiß nur ned an was das jetzt leigt das es nimmer geht oO thx schonmal ![]() |
||
Llama 1 Llama 2 Llama 3
Vielen Dank an Pummelie, der mir auf seinem Server einen Platz für LlamaNet bietet. |
![]() |
RallimenSieger des 30-EUR-Wettbewerbs |
![]() Antworten mit Zitat ![]() |
---|---|---|
Da gibt es viele Möglichkeiten, eine genaue Beschreibung wäre von Vorteil!
Graphics oder Window ? Code wäre nicht schlecht ... |
||
[BB2D | BB3D | BB+]
|
![]() |
Chrise |
![]() Antworten mit Zitat ![]() |
---|---|---|
im Grafiks mode.
Hier ist der Code ![]() Code: [AUSKLAPPEN] Graphics 640,480,0,2
ClsColor 236,233,216 Cls Bild = LoadImage ("Bild1.bmp") Bild_blau=LoadImage("Bild2.bmp") Cursor=LoadImage("Cursor.bmp") fntArial =LoadFont("Arial",24,False,False,False) Pfeilanzahl=0 MaskImage Cursor,4,254,4 DrawImage Cursor,xmaus,ymaus DrawImage Bild,80,20 While Not KeyHit(1) Xmaus=MouseX() ymaus=MouseY() Color 0,0,0 SetFont fntArial Text 40,100, xmaus Text 40,115, ymaus DrawImage Cursor ,xmaus,ymaus Pfeilanzahl=Pfeilanzahl+1 Select xmaus Case xmaus>160 And xmaus<320 Select ymaus Case ymaus>40 And ymaus<60 SetBuffer FrontBuffer() DrawImage Bild_blau,80,20 Default SetBuffer FrontBuffer() DrawImage Bild,80,20 End Select Default SetBuffer FrontBuffer() DrawImage Bild,80,20 End Select Wend End |
||
Llama 1 Llama 2 Llama 3
Vielen Dank an Pummelie, der mir auf seinem Server einen Platz für LlamaNet bietet. |
![]() |
RallimenSieger des 30-EUR-Wettbewerbs |
![]() Antworten mit Zitat ![]() |
---|---|---|
Innerhalb der Schleife fehlt ein CLS, um den Bildschirm zu löschen! | ||
[BB2D | BB3D | BB+]
|
![]() |
FireballFlame |
![]() Antworten mit Zitat ![]() |
---|---|---|
Was um alles in der Welt soll das Code: [AUSKLAPPEN] SetBuffer FrontBuffer() ?? ![]() |
||
PC: Intel Core i7 @ 4x2.93GHz | 6 GB RAM | Nvidia GeForce GT 440 | Desktop 2x1280x1024px | Windows 7 Professional 64bit
Laptop: Intel Core i7 @ 4x2.00GHz | 8 GB RAM | Nvidia GeForce GT 540M | Desktop 1366x768px | Windows 7 Home Premium 64bit |
![]() |
Chrise |
![]() Antworten mit Zitat ![]() |
---|---|---|
oh, da merkt man dann doch noch bisschen meine unerfahrenheit^^
aber darum bin cih ja hier um das zu lernen. thx ![]() nur jetzt wird das BIld immer halb vom cls über"füllt" ![]() |
||
Llama 1 Llama 2 Llama 3
Vielen Dank an Pummelie, der mir auf seinem Server einen Platz für LlamaNet bietet. |
![]() |
FireballFlame |
![]() Antworten mit Zitat ![]() |
---|---|---|
Hoi, ich glaube, so wolltest du es haben ^^
Code: [AUSKLAPPEN] Graphics 640,480,0,2
SetBuffer BackBuffer() ; Doublebuffering für flimmerfreies Bild ClsColor 236,233,216 Bild = LoadImage ("Bild1.bmp") Bild_blau=LoadImage("Bild2.bmp") Cursor=LoadImage("Cursor.bmp") fntArial =LoadFont("Arial",24,False,False,False) Pfeilanzahl=0 MaskImage Cursor,4,254,4 While Not KeyHit(1) Cls Xmaus=MouseX() ymaus=MouseY() Color 0,0,0 SetFont fntArial Text 40,100, xmaus Text 40,115, ymaus DrawImage Cursor ,xmaus,ymaus Pfeilanzahl=Pfeilanzahl+1 If RectsOverlap(xmaus,ymaus,1,1,160,40,160,20) Then ; <= Das ist genau dasselbe wie "If xmaus>160 And xmaus<320 And ymaus>40 And ymaus<60 Then" DrawImage Bild_blau,80,20 Else DrawImage Bild,80,20 End If Flip ; Immer ans Ende der Schleife, gehört zum Doublebuffering Wend End Das Select vergiss mal ganz schnell wieder ![]() |
||
PC: Intel Core i7 @ 4x2.93GHz | 6 GB RAM | Nvidia GeForce GT 440 | Desktop 2x1280x1024px | Windows 7 Professional 64bit
Laptop: Intel Core i7 @ 4x2.00GHz | 8 GB RAM | Nvidia GeForce GT 540M | Desktop 1366x768px | Windows 7 Home Premium 64bit |
![]() |
Chrise |
![]() Antworten mit Zitat ![]() |
---|---|---|
ui! Geil ich bewundere Leute wie dich ![]() ich schaus mir mal an, damit ich den vorgang verstehe ![]() thx |
||
Llama 1 Llama 2 Llama 3
Vielen Dank an Pummelie, der mir auf seinem Server einen Platz für LlamaNet bietet. |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group