Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting sprite number max
#1
This could be a little useful for handling scroll bars in editors for choosing sprites. To get the total number of sprites this is what I did:

Make a picture box 1x1, set it to appearance-flat, border style-none, autosize-true, and visible = false, and name it picGetSize and place it in frmMainMenu or wherever...

Code:
frmMainMenu.picGetSize.Picture = LoadPicture(App.Path & "/Gfx/Sprites.bmp")

SPRITE_COUNT = (frmMainMenu.picGetSize.Height \ 32) - 1

frmMainMenu.picGetSize.Picture = LoadPicture()
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)