Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

draw graphics?

Depends on what kind of graphic you want to display, but they all use very similar methods.
Icons: bitmap = RPG::Cache.icon('iconname')
Pictures: bitmap = RPG::Cache.picture('picname')
You get the idea, then you must preform a block transfer:
self.contents.blt(x, y, bitmap, Rect.new(x, y, width, height), opacity)
 
Use:
Code:
self.contents.blt(x, y, bitmap, src_rect, opacity)
x = x coordinate
y = y coordinate
bitmap = bitmap of the image (Example: RPG::Cache.icon('Filename'))
src_rect = the rectangle taken from the bitmap that shows (Example: Rect.new(0, 0, 24, 24) is used to show default icons.)
opacity = the opacity of the image
 
Daniel said:
Use:
Code:
self.contents.blt(x, y, bitmap, src_rect, opacity)
x = x coordinate
y = y coordinate
bitmap = bitmap of the image (Example: RPG::Cache.icon('Filename')
src_rect = the rectangle taken from the bitmap that shows (Example: Rect.new(0, 0, 24, 24) is used to show default icons.)
opacity = the opacity of the image

Thanx guys...found also a reference in the help file.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top