Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Visual Inventory
#1
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!
Reply
#2
Add the UpdateInventory after you login. It's a packet, can't remember exacly now, I think it's "loginok", something like this.
Reply
#3
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.
Reply
#4
Do it before the looping part in GameLoop.

frmMirage is loaded then shut down when you init DX Tongue
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#5
Did that robin, it ended up not blting it.
Reply
#6
Have you set the box to AutoRedraw, and are you using BltToDC?
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#7
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.
Reply
#8
Eurgh, not wonder it doesn't work.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#9
What is BltToDC, I know it is a DX7 function, but what makes it different?
Reply
#10
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.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)