Question about VGA 512x384 2-Color Bitmap Driver v1.0
E-Head
Posts: 13
Hello
Any ideas how to reprint or repaint a tile. I'm making a little mouse application and I use the driver mentioned in the subject line.
With that code, I get a mouse cursor which works quite well. And then if I press a left button I get a mouse coordinates. But anytime when I click the left mouse button, the coordinates comes over the old ones. And the same thing happens to the mouse cursor when I move the mouse.
I thought that if I get a tile reprinted each time before when the gr.plot or gr.SimpleNum are executed, "old informations" will be cleared. Will that work and if it will, how I reprint the tile?
Any ideas how to reprint or repaint a tile. I'm making a little mouse application and I use the driver mentioned in the subject line.
repeat mx := mouse.abs_x my := mouse.abs_y gr.plot(mx,-my) if mouse.button(0) gr.SimpleNum(464,0,mx,0) gr.SimpleNum(464,20,-my,0)
With that code, I get a mouse cursor which works quite well. And then if I press a left button I get a mouse coordinates. But anytime when I click the left mouse button, the coordinates comes over the old ones. And the same thing happens to the mouse cursor when I move the mouse.
I thought that if I get a tile reprinted each time before when the gr.plot or gr.SimpleNum are executed, "old informations" will be cleared. Will that work and if it will, how I reprint the tile?
Comments
gr.box(x,y,xsize,ysize) 'by specifying the rectangular area where they appear
I think that will work. Change all variables to the right numbers unless you want variables there.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
VIRAND, If you spent as much time SPINNING as you do Trolling the Forums,
you'd have tons of awesome code to post! (Note to self)
1- Have the program that is going to write to the screen save the image in the area it is writing to and restore it later.
2- Send a signal to a program to have it rewrite it's displayed data.
3- Send a signal to the program to save the affected screen area, and another signal to rewrite the area after wards.
There are other methods as well. The first method is probably the simplest to program as long as you do not have a large number of independent programs running.
kwinn, what I understood from your examples, I need allways know the screen history. But why if I don't need them? If I could just clear the screen then I basicly return to the start but just with a new thing to draw on the screen.
Of course if I must clear the whole screen always after the mouse moved it is not very clever. But at least I can go on with my "testings" and maybe made a nice vga clock [noparse]:)[/noparse]