A Question about VGA_Tile_Driver_Demo2... where's the action, man?
ElectricAye
Posts: 4,561
Hi all,
I just hooked up a mouse to my Prop for the first time and started working with VGA_Tile_Driver_Demo2. Everything on the screen looks good and the cursor moves around. But when I clicked on the displayed buttons, nothing happens. So I looked through the code to see if something is supposed to happen, and... well... I guess nothing is supposed to happen. Which seems weird to me since VGA_Tile_Driver_Demo2 uses VGA_1280x1024_tile_driver_with_cursor. Then I looked more closely at VGA_1280x1024_tile_driver_with_cursor to see if it even has the ability to make something happen when I click on a button if I so programmed it to do so. And it's not clear to me that it can do that. Needless to say, I'm confused. I don't know assembly code and there are few comments in any of these objects, so maybe I'm overlooking something. Surely there must be a way to make things happen when you click on a button. And is there a VGA demo that will show that to a poor wretched newbie like me?
TGIF to all,
Mark
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Watching the world pass me by, one photon at a time.
I just hooked up a mouse to my Prop for the first time and started working with VGA_Tile_Driver_Demo2. Everything on the screen looks good and the cursor moves around. But when I clicked on the displayed buttons, nothing happens. So I looked through the code to see if something is supposed to happen, and... well... I guess nothing is supposed to happen. Which seems weird to me since VGA_Tile_Driver_Demo2 uses VGA_1280x1024_tile_driver_with_cursor. Then I looked more closely at VGA_1280x1024_tile_driver_with_cursor to see if it even has the ability to make something happen when I click on a button if I so programmed it to do so. And it's not clear to me that it can do that. Needless to say, I'm confused. I don't know assembly code and there are few comments in any of these objects, so maybe I'm overlooking something. Surely there must be a way to make things happen when you click on a button. And is there a VGA demo that will show that to a poor wretched newbie like me?
TGIF to all,
Mark
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Watching the world pass me by, one photon at a time.
Comments
I have all kinds of apps for 1024x768 that use buttons. Some of them are on my website...
Basically, you just start a loop inside of which you check for the mouse down event.· Then, you may wish to start another loop to wait for the mouse up event.· Then, take the mouse coordinates and see if it's on top of a button...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
thanks for your superfast responses. I had hoped the demos would give me more to work from but now I see your point about having to make all that button stuff myself. I'm already using 6 cogs without using a cursor + button feature with my VGA display. Any ideas on how many additional cogs, if any, would be required to drive a button-pushable cursor with my project? I want to have a cursor so I can control about 6 buttons on a screen to lower and raise a few variables. Is this the sort of thing that takes, like, one or two cogs by itself???
thanks again,
Mark
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Watching the world pass me by, one photon at a time.
The higher level button display/manipulation functions could either be done by the mouse driver in response to a click on or click off or it could be done by the main program (cog) as an event (if it's event oriented) or it could be handled by its own cog. These are all valid choices depending on the details of your program and the resources available. I'm more concerned about the memory needed. If you're handling the buttons by using graphics areas, that's a lot of memory. If you're using the tile based drivers, particularly the button stuff, for primarily text, you'll be in better shape memory-wise.
I'll need to grok your comments over the weekend.· Silly me, I thought this cursor thing would be a rare plug-and-chug moment for me today.· ·· "Everyone else has got a cursor, why not me?" I said to myself this morning.
"Because you're clueless and lazy," then said God.· "Get to work."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Watching the world pass me by, one photon at a time.