Mirage Source http://www.miragesource.net/forums/ |
|
Custom Visual Inventory http://www.miragesource.net/forums/viewtopic.php?f=201&t=3316 |
Page 1 of 1 |
Author: | Stomach Pulser [ Sat Jan 26, 2008 5:27 am ] |
Post subject: | Custom Visual Inventory |
Hello, I am attempting to code a visual inventory without using any tutorials. So far, I have it blt your items into a visual inventory picture box. But, I can't get it to do it right when you open frmMirage. For some reason, if I add an UpdateInventory into Form_Load, I get an error because the player hasn't been loaded yet. I tried using a timer and such. Is there a reason that frmMirage would load before the game itself starts? Meaning, when you open up frmMainMenu? Any help would be appreciated! |
Author: | Dragoons Master [ Sat Jan 26, 2008 5:34 am ] |
Post subject: | Re: Custom Visual Inventory |
Add the UpdateInventory after you login. It's a packet, can't remember exacly now, I think it's "loginok", something like this. |
Author: | Stomach Pulser [ Sat Jan 26, 2008 5:44 am ] |
Post subject: | Re: Custom Visual Inventory |
Tried after the login and the use_char, both gave me the error. Also, once in-game, if you update inventory with a /inv or getting\dropping an item, the inventory blts properly. |
Author: | Robin [ Sat Jan 26, 2008 1:55 pm ] |
Post subject: | Re: Custom Visual Inventory |
Do it before the looping part in GameLoop. frmMirage is loaded then shut down when you init DX |
Author: | Stomach Pulser [ Sat Jan 26, 2008 4:25 pm ] |
Post subject: | Re: Custom Visual Inventory |
Did that robin, it ended up not blting it. |
Author: | Robin [ Sat Jan 26, 2008 4:37 pm ] |
Post subject: | Re: Custom Visual Inventory |
Have you set the box to AutoRedraw, and are you using BltToDC? |
Author: | Stomach Pulser [ Sat Jan 26, 2008 7:05 pm ] |
Post subject: | Re: Custom Visual Inventory |
AutoRedraw is yes, but what is BltToDC? I just use Bitblt... It works now, I added in a picture.refresh and it loads it properly. If anything new arises I'll post it. |
Author: | Robin [ Sat Jan 26, 2008 7:19 pm ] |
Post subject: | Re: Custom Visual Inventory |
Eurgh, not wonder it doesn't work. |
Author: | Stomach Pulser [ Sat Jan 26, 2008 8:41 pm ] |
Post subject: | Re: Custom Visual Inventory |
What is BltToDC, I know it is a DX7 function, but what makes it different? |
Author: | Robin [ Sat Jan 26, 2008 9:20 pm ] |
Post subject: | Re: Custom Visual Inventory |
BitBlt means you're loading all the graphics into memory again (as well as loading them into DX7 surfaces) to just blt them into a different box. BltToDC means you can use the graphics stored in a surface rather than having to load everything again. It also doesn't get wiped out like BitBlt. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |