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.

Simple Menu request.

Okay I found this picture of a CMS. I wanted to use it as a reference for my idea of my menu. ':|

Menu:
http://i22.tinypic.com/24wuh61.jpg[/IMG]


I want my menu to have the faces just like that one.
And add Icons next to the commands Like next to Items have an Apple Icon or something.


I hope this is detailed enough. :|

It seems like an easy request. :s

Please and thank you. :thumb:
 
done.
Replace Window_MenuStatus with this

Code:
#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
#  This window displays party member status on the menu screen.
#==============================================================================

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 480, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = 70 + 6 
      y = i * 116
      actor = $game_party.actors[i]
      draw_actor_face(actor, x - 80, y)
      draw_actor_name(actor, x + 20, y)
      draw_actor_class(actor, x + 166, y)
      draw_actor_level(actor, x + 20, y + 32)
      draw_actor_state(actor, x + 90, y + 32)
      draw_actor_exp(actor, x + 20, y + 64)
      draw_actor_hp(actor, x + 236, y + 32)
      draw_actor_sp(actor, x + 236, y + 64)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Face Method
  #--------------------------------------------------------------------------
  def  draw_actor_face(actor,x,y)    
    fac = RPG::Cache.picture(actor.name + "_mt") 
    cw = fac.width 
    ch = fac.height 
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x, y, fac, src_rect)
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
    end
  end
end


I have only changed the y values to display the lvl, name and exp.
then i add a method to draw a graphic, in this case a picture of the characters..lets call it face (?), so you have to put in the pictures folder each face for each character in party name_mt
for example, Aluxes_mt

and thats all =)


and for the icon thingy

replace the draw_item method in window_command with this one or just create a new class like window_command but with this draw_item method

Code:
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item number
  #     color : text color
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    self.contents.font.color = color
    rect = Rect.new(24, 32 * index, self.contents.width - 8, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon("MT_Iconmenu_" + index.to_s)
    self.contents.blt(x + 3, index * 32 +4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(rect, @commands[index])
  end

you need the icons in the icon folders with MT_Iconmenu_x as the name, x is the index number of the window O______O

for example, MT_Iconmenu_0 for the item slot in the command window of the menu screen..

hope that helps you =)

ps- i now i express myself in the wrong way xD, i'm from argentina, so i dont speak english so well..but if you need something just ask =)
 
ok ok so now copy and paste de Window_Command sscript and put it in a ner slot above Main, replace the name of this new script to Window_MenuCommand, and replace just the draw_item method of this new class, then in scene menu, change @command_window = Window_Command.new to @command_window = Window_MenuCommand.new and you're done =)

byee ^_^
 

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