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.

I need help making small my gold window

Status
Not open for further replies.

Mac

Member

Replace your old Window_Gold with this:-

Code:
#==============================================================================
# ** Window_Gold
#==============================================================================

class Window_Gold < Window_Base
  # ------------------------------------
  def initialize
    super(0, 0, 130, 50)#162 84
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fonttype
    self.contents.font.size = 21
    refresh
  end
  # ------------------------------------
  def refresh
    self.contents.clear
    cx = contents.text_size($data_system.words.gold).width
    @green_gem_bitmap = RPG::Cache.picture('Gold')
    self.contents.blt(0, 0,@green_gem_bitmap, Rect.new(0, 0, 16, 32))#16 32
    self.contents.font.color = normal_color
    self.contents.draw_text(18, -4.9, 25-cx-2, 18, $game_party.gold_coins.to_s, 2)#20 -4.9 120
    @green_gem_bitmap = RPG::Cache.picture('Silver')
    self.contents.blt(33, 0,@green_gem_bitmap, Rect.new(0, 0, 16, 32))#16 32
    self.contents.font.color = normal_color
    self.contents.draw_text(51, -4.9, 25-cx-2, 18, $game_party.silver_coins.to_s, 2)
    @green_gem_bitmap = RPG::Cache.picture('Copper')
    self.contents.blt(66, 0,@green_gem_bitmap, Rect.new(0, 0, 16, 32))#16 32
    self.contents.font.color = normal_color
    self.contents.draw_text(84, -4.9, 25-cx-2, 18, $game_party.bronze_coins.to_s, 2)
  end
end
 
Is this what you want?
Code:
#==============================================================================
# ** Window_Gold
#==============================================================================

class Window_Gold < Window_Base
  # ------------------------------------
  def initialize
    super(0, 0, 130, 50)#162 84
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fonttype
    self.contents.font.size = 21
    refresh
  end
  # ------------------------------------
  def refresh
    self.contents.clear
    cx = contents.text_size($data_system.words.gold).width
    @green_gem_bitmap = RPG::Cache.picture('Gold')
    self.contents.blt(15, 0,@green_gem_bitmap, Rect.new(0, 0, 16, 32))#16 32
    self.contents.font.color = normal_color
    self.contents.draw_text(0, -4.9, 25-cx-2, 18, $game_party.gold_coins.to_s, 2)#20 -4.9 120
    @green_gem_bitmap = RPG::Cache.picture('Silver')
    self.contents.blt(48, 0,@green_gem_bitmap, Rect.new(0, 0, 16, 32))#16 32
    self.contents.font.color = normal_color
    self.contents.draw_text(33, -4.9, 25-cx-2, 18, $game_party.silver_coins.to_s, 2)
    @green_gem_bitmap = RPG::Cache.picture('Copper')
    self.contents.blt(79, 0,@green_gem_bitmap, Rect.new(0, 0, 16, 32))#16 32
    self.contents.font.color = normal_color
    self.contents.draw_text(64, -4.9, 25-cx-2, 18, $game_party.bronze_coins.to_s, 2)
  end
end
 
Status
Not open for further replies.

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