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.

Chaging TEXT to Icons on HUD Bar?

How can I change the text into picture on the HUD next to the bar?
Here's the code
Code:
 draw_basic
  #  Draws the HUD template.
  #----------------------------------------------------------------------------
  def draw_basic
    # fill with grey rectangle
    self.bitmap.fill_rect(0, 0, 156, 112, Color.new(0, 0, 0, 128))
    # set font color
    self.bitmap.font.color = system_color
    # draw "LV"
    self.bitmap.draw_text_full(108, 1, 20, 20, 'LV')
    # draw "Skill:"
    self.bitmap.draw_text_full(4, 80, 48, 20, 'Skill:')
    # draw "Item:"
    self.bitmap.draw_text_full(80, 80, 48, 20, 'Item:')
    # draw "HP"
    self.bitmap.draw_text_full(4, 17, 32, 20, [b]$data_system.words.hp[/b])
    # draw "SP"
    self.bitmap.draw_text_full(4, 33, 32, 20, [b]$data_system.words.sp[/b])
    # draw "next"
    self.bitmap.draw_text_full(4, 49, 80, 20, 'next')
    # set font color
    self.bitmap.font.color = Color.new(255, 255, 0)
    # draw the first letter of the word used for the game currency
    self.bitmap.draw_text_full(96, 64, 56, 20, $data_system.words.gold[0, 1], 2)
  end
 

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