| Mirage Source http://miragesource.net/forums/ |
|
| Visual Inventory http://miragesource.net/forums/viewtopic.php?f=201&t=3298 |
Page 1 of 1 |
| Author: | Anthony [ Mon Jan 21, 2008 5:02 pm ] |
| Post subject: | Visual Inventory |
So I am beginning to get annoyed with GSDs way of doing a visual inventory and am trying to think of a better way to do it. First I thought about removing the timers and moving it all into the game loop, thus keeping the 14 picture boxes I have (yuck) and still blting to them all individually. I think this is not a very good replacement? Correct me if I am wrong. Then I thought, why not have one picture box and blt a gui onto it, then the items in your inventory around the gui similar to how the game loop blts items to the picscreen. Would this be a good way of going about it? I am looking for ideas and hopefully a few good pushes in the right direction. Anybody want to offer some insight? |
|
| Author: | Rezeyu [ Mon Jan 21, 2008 7:33 pm ] |
| Post subject: | Re: Visual Inventory |
Since it's off of the picscreen, do you need to continuously blit? I really don't know so.. XD If you don't, then just have it re-blit when their inventory changes. Pick p an item, drop an item, item breaks, equip/unequip, etc. |
|
| Author: | Lea [ Mon Jan 21, 2008 7:38 pm ] |
| Post subject: | Re: Visual Inventory |
You need to reblt when the components Paint function is called. Or something like paint... repaint? It's called whenever it moves, changes, or is covered. Any time it needs to be redrawn. |
|
| Author: | Robin [ Tue Jan 22, 2008 4:52 pm ] |
| Post subject: | Re: Visual Inventory |
Set it to autoredraw and use BltToDc. |
|
| Author: | Anthony [ Wed Jan 23, 2008 4:48 am ] |
| Post subject: | Re: Visual Inventory |
So sticking with the 14 picture boxes and the timer is ok? As long as I only blit the images when they actually need to be right? Does it make a difference if I turn the timer on and off whenever the inventory is opened and closed? |
|
| Author: | Robin [ Wed Jan 23, 2008 12:03 pm ] |
| Post subject: | Re: Visual Inventory |
No, simply turn on Autoredraw. Drop the timer, and get rid of all the boxes. You only need one. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|