a daughter window problem
BlitzPlus Forums/BlitzPlus Programming/a daughter window problem
| ||
Hiya, Community :-) I started a game with ... Graphics wide,high,32,2 SetBuffer BackBuffer() and made the game work. Now I need to add a help page and created a daughter window: helpwin. I gave it a canvas. When I press F1, helpwin activates and pops into view. when I let go, it goes away. This is all good. Now I want to write the help text to the "helpwin". I tried Text 20, 20, "Hello World!" but it drew the text to the mother window, not the helpwin canvas. How do I direct the text to the helpwin canvas? Here is some disembodied code extract ... Global helpwin=CreateWindow("Help",xwin,ywin,wide+6,200,Desktop(),1) canvas=CreateCanvas(0,0,wide,high,helpwin) SetBuffer CanvasBuffer(canvas) HideGadget(helpwin) Graphics wide,high,32,2 SetBuffer BackBuffer() Repeat If KeyDown(59) Then help() Forever Function help() ShowGadget(helpwin) ActivateGadget(helpwin) ActivateGadget(canvas) Text 20,20,"Hello World!" While KeyDown(59):Wend HideGadget(helpwin) End Function If anybody can help, I would be so grateful :) Thank you in anticipation, |
| ||
Use Setbuffer CanvasBuffer(canvashandle) http://www.blitzbasic.com/bpdocs/command.php?name=CanvasBuffer&ref=gui_cat |
| ||
Couldn't make it work. I found another way round: Used the browser and made the instructions in html and screen-captured it. Now I have a nice little help page that flicks in when F1 is pressed. :) |