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.

Some Menu system help

Hello guys, I'm using a mewsterus cms that is translucent and would like it if the rest of the rest of the menu sections where as well, can someone help me out with this please? I've been looking around these sections but have not found anything on this.

Edit: The save and end game do not matter.

Here's the script i'm using.
Code:
#===============================================================================
# ¦ Window_Base
#-------------------------------------------------------------------------------
#   Edited by mewsterus
#===============================================================================

class Window_Base
  #-----------------------------------------------------------------------------
  # @ Draw state
  #-----------------------------------------------------------------------------
  def draw_actor_state(actor, x, y, width = 120)
    text = make_battler_state_text(actor, width, true)
    self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
    self.contents.draw_text(x, y, width, 32, text, 2)
  end
  #-----------------------------------------------------------------------------
  # @ Draw EXP
  #-----------------------------------------------------------------------------
  def draw_actor_exp(actor, x, y, width = 144)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 48, 32, "Exp")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + width - 48, y, 48, 32, actor.exp_s, 2)
  end
end

#===============================================================================
# ¦ Window_MenuStatus
#-------------------------------------------------------------------------------
#   Edited by mewsterus
#===============================================================================

class Window_MenuStatus < Window_Base
  #-----------------------------------------------------------------------------
  # @ Create the window
  #-----------------------------------------------------------------------------
  def initialize(actor)
    super(0, 0, 288, 120)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    self.back_opacity = 160
    @actor = actor
    refresh
    self.active = false
  end
  #-----------------------------------------------------------------------------
  # @ Draw contents
  #-----------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_graphic(@actor, 40, 86)
    draw_actor_name(@actor, 0, 0)
    draw_actor_level(@actor, 112, 0)
    draw_actor_class(@actor, 172, 0)
    draw_actor_state(@actor, 0, 20, 108)
    draw_actor_exp(@actor, 112, 20)
    draw_actor_hp(@actor, 112, 40)
    draw_actor_sp(@actor, 112, 60)
  end
  #-----------------------------------------------------------------------------
  # @ Update the window
  #-----------------------------------------------------------------------------
  def update
    super
    if @selected
      self.cursor_rect.set(-8, -8, 272, 104)
    else
      self.cursor_rect.empty
    end
  end
  #-----------------------------------------------------------------------------
  # @ Accept whether window is selected
  #-----------------------------------------------------------------------------
  def selected=(selected)
    @selected = selected
    update
  end
end

#===============================================================================
# ¦ Scene_Menu
#-------------------------------------------------------------------------------
#   Edited by mewsterus
#===============================================================================

class Scene_Menu
  #-----------------------------------------------------------------------------
  # @ Accept indeces
  #-----------------------------------------------------------------------------
  def initialize(menu_index = 0, status_index = 0)
    @menu_index = menu_index
    @status_index = status_index
  end
  #-----------------------------------------------------------------------------
  # @ Start the scene
  #-----------------------------------------------------------------------------
  def main
    @sprite = Spriteset_Map.new
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Save"
    s6 = "End Game"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.back_opacity = 160
    @command_window.x = 0
    @command_window.y = 640
    if $game_party.actors.size == 0
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    if $game_system.save_disabled
      @command_window.disable_item(4)
    end
    @steps_window = Window_Steps.new
    @steps_window.x = -320
    @steps_window.y = 0
    @steps_window.back_opacity = 160
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 0
    @playtime_window.y = -224
    @playtime_window.back_opacity = 160
    @gold_window = Window_Gold.new
    @gold_window.x = -384
    @gold_window.y = 192
    @gold_window.back_opacity = 160
    if $itemdrop_enabled
      @itemdrop = Window_Command.new(160, ["Basic", "Equipment", "Quest"])
    else
      @itemdrop = Window_Base.new(240, 144, 160, 128)
    end
    @itemdrop.x = -160
    @itemdrop.y = 256
    @itemdrop.back_opacity = 160
    @itemdrop.active = false
    @status_windows = []
    for i in 0...$game_party.actors.size
      @status_windows.push(Window_MenuStatus.new($game_party.actors[i]))
      @status_windows[i].x = 672 + i * 64
      @status_windows[i].y = i * 120 + (240 - $game_party.actors.size * 60)
      @status_windows[i].active = true
    end
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      if @steps_window.x < 0
        @steps_window.x += 32
      end
      if @playtime_window.y < 96
        @playtime_window.y += 32
      end
      if @gold_window.x < 0
        @gold_window.x += 32
      end
      for i in 0...$game_party.actors.size
        if @status_windows[i].x > 366
          @status_windows[i].x -= 64
        end
      end
      if @command_window.y > 256
        @command_window.y -= 32
      else
        update
      end
      if $scene != self
        break
      end
    end
    for i in 0..12
      @gold_window.x -= 32
      if i >= 1
        @steps_window.x -= 32
      end
      if i >= 2
        @playtime_window.y -= 32
        @command_window.y += 32
      end
      if i >= 3
        @status_windows[0].x += 64
        @itemdrop.x -= 32
      end
      if i >= 4 and $game_party.actors.size >= 2
        @status_windows[1].x += 64
      end
      if i >= 5 and $game_party.actors.size >= 3
        @status_windows[2].x += 64
      end
      if i >= 6 and $game_party.actors.size >= 4
        @status_windows[3].x += 64
      end
      Graphics.update
    end
    Graphics.freeze
    @sprite.dispose
    @command_window.dispose
    @steps_window.dispose
    @playtime_window.dispose
    @gold_window.dispose
    @itemdrop.dispose
    for i in 0...$game_party.actors.size
      @status_windows[i].dispose
    end
  end
  #-----------------------------------------------------------------------------
  # @ Update the scene
  #-----------------------------------------------------------------------------
  def update
    @sprite.update
    @command_window.update
    @steps_window.update
    @playtime_window.update
    @gold_window.update
    @itemdrop.update
    for i in 0...$game_party.actors.size
      @status_windows[i].update
    end
    if @command_window.active
      update_command
      return
    end
    if @status_windows_active
      update_status
      return
    end

    if @itemdrop.active
      update_itemdrop
      return
    end
  end
  #-----------------------------------------------------------------------------
  # @ Update the command window
  #-----------------------------------------------------------------------------
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::C)
      if $game_party.actors.size == 0 and @command_window.index < 4
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0
        $game_system.se_play($data_system.decision_se)

        if $itemdrop_enabled
          loop do
            if @itemdrop.x < 160
              @itemdrop.x += 40
            else
              break
            end
            Graphics.update
          end
          @command_window.active = false
          @itemdrop.active = true
          return
        end
        $scene = Scene_Item.new
      when 1
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_windows_active = true
        @status_windows[@status_index].selected = true
      when 2
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_windows_active = true
        @status_windows[@status_index].selected = true
      when 3
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_windows_active = true
        @status_windows[@status_index].selected = true
      when 4
        if $game_system.save_disabled
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Save.new
      when 5
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_End.new
      end
      return
    end
  end
  #-----------------------------------------------------------------------------
  # @ Update the status windows
  #-----------------------------------------------------------------------------
  def update_status
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @command_window.active = true
      @status_window_active = false
      @status_windows[@status_index].selected = false
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 1
        if $game_party.actors[@status_index].restriction >= 2
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Skill.new(@status_index)
      when 2
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Equip.new(@status_index)
      when 3
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Status.new(@status_index)
      end
      return
    end
    if Input.repeat?(Input::DOWN)
      if Input.trigger?(Input::DOWN) or @status_index<$game_party.actors.size-1
        $game_system.se_play($data_system.cursor_se)
        @status_windows[@status_index].selected = false
        @status_index = (@status_index + 1) % $game_party.actors.size
        @status_windows[@status_index].selected = true
        return
      end
    end
    if Input.repeat?(Input::UP)
      if Input.trigger?(Input::UP) or @status_index > 0
        $game_system.se_play($data_system.cursor_se)
        @status_windows[@status_index].selected = false
        @status_index = (@status_index + $game_party.actors.size - 1) %
                    $game_party.actors.size
        @status_windows[@status_index].selected = true
        return
      end
    end
  end
  #-----------------------------------------------------------------------------
  # @ Update the itemdrop window
  #-----------------------------------------------------------------------------
  def update_itemdrop
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      loop do
        if @itemdrop.x > -160
          @itemdrop.x -= 40
        else
          break
        end
        Graphics.update
      end
      @itemdrop.active = false
      @command_window.active = true
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_Item.new(@itemdrop.index + 20)
    end
  end
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