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.

Icons instead of Text in a command choice

Ernst

Member

I got sephiroths Window_HorizCommand now an finally I can make horizontal command choices  :smile:
But my next question is: Can I change the text into icons? I think I need to add/change something in Window_HorizCommand but I don't know what.
 
Go to Window_HorizCommand

and search for:

Code:
  #--------------------------------------------------------------------------
  # * Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    command = commands[index]
    x = index * @c_spacing + 4
    self.contents.font.color = color
    self.contents.draw_text(x, 0, @c_spacing - 8, 32, command, @alignment)
  end

And change to:

Code:
  #--------------------------------------------------------------------------
  # * Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    command = commands[index]
    x = index * @c_spacing + 4
    self.contents.font.color = color
    self.contents.draw_icon_text(x, 0, @c_spacing - 8, 32, command, @alignment)
  end

You will need the MACL for the Draw_Icon_Text Function.

Now, to put icons, or text, or icon and text use in your commands:

command = '[icon name] Text' (For the icons you will need to put into []. so you will get:

http://img353.imageshack.us/img353/1386/dibujots2.png[/img]

Good Luck!
 

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