Показано с 1 по 3 из 3

Тема: Angelo Menu

  1. #1

    Сообщение Angelo Menu

    Меняет ваше меню на другое!

    Оборудование. EXP и параметры приведены в барах, два основных оснащает (оружие и щит, или первого и второго оружия) представлены под HP, MP и опыта, а другой на стороне Параметры баров. Он поддерживает большое количество членов партии, и не имеет еще золотое окно. Посмотрите на рис:

    Код:
    #==============================================================================
    # ■ Angelo Menu α (alpha)
    #------------------------------------------------------------------------------
    #  Created by Brandon *** No customization options *** Plug N' Play!
    #==============================================================================
    
    class Window_MenuCommand < Window_Command
      
      def self.init_command_position
        @@last_command_symbol = nil
      end
      
      def initialize
        super(0, 368)
        select_last
        self.opacity = 0
      end
      
      def window_width
        return 544
      end
    
      def visible_line_number
        return 1
      end
    
      def col_max
        return 6
      end
      
      def spacing
        return 1
      end
      
      def contents_width
        (item_width + spacing) * item_max - spacing
      end
    
        def contents_height
        item_height
      end
    
      def make_command_list
        add_main_commands
        add_formation_command
        add_original_commands
        add_save_command
        add_game_end_command
      end
      
      def add_main_commands
        add_command(Vocab::item,   :item,   main_commands_enabled)
        add_command(Vocab::skill,  :skill,  main_commands_enabled)
        add_command(Vocab::equip,  :equip,  main_commands_enabled)
    #    add_command(Vocab::status, :status, main_commands_enabled)
      end
      
      def add_formation_command
        add_command(Vocab::formation, :formation, formation_enabled)
      end
      
      def add_original_commands
      end
      
      def add_save_command
        add_command(Vocab::save, :save, save_enabled)
      end
      
      def add_game_end_command
        add_command(Vocab::game_end, :game_end)
      end
      
      def main_commands_enabled
        $game_party.exists
      end
      
      def formation_enabled
        $game_party.members.size >= 2 && !$game_system.formation_disabled
      end
      
      def save_enabled
        !$game_system.save_disabled
      end
      
      def process_ok
        @@last_command_symbol = current_symbol
        super
      end
      
      def select_last
        select_symbol(@@last_command_symbol)
      end
      
    end
    class Window_MenuStatus < Window_Selectable
      
      attr_reader   :pending_index
      
      def initialize(x, y)
        super(0, 0, window_width, window_height)
        @pending_index = -1
        refresh
        self.opacity = 0
      end
    
    #=============================================================================
    #  DRAW_ANGELO_HP
    #=============================================================================
      def draw_angelo_hp(actor, x, y, width = 200)
        draw_back_bars(x - 5, y + 11, 200 + 13)
        draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
        draw_text(x, y + 5, 30, line_height, Vocab::hp_a)
        draw_current_and_max_values(x + 16, y + 5, width, actor.hp, actor.mhp, hp_color(actor), normal_color)
      end
    
    #=============================================================================
    #  DRAW_ANGELO_MP
    #=============================================================================
      def draw_angelo_mp(actor, x, y, width = 200)
        draw_back_bars(x - 5, y + 11, 200 + 13)
        draw_gauge(x, y, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
        draw_text(x, y + 5, 30, line_height, Vocab::mp_a)
        draw_current_and_max_values(x + 16, y + 5, width, actor.mp, actor.mmp, mp_color(actor), normal_color)
      end
      
    #=============================================================================
    #  DRAW_ANGELO_EXP
    #=============================================================================
      def draw_angelo_exp(actor, x, y, width = 200)
        expcolor1 = Color.new(205, 255, 151, 255)
        expcolor2 = Color.new(235, 210, 0, 255)
        draw_back_bars(x - 5, y + 11, 200 + 13)
        draw_gauge(x, y, width, actor.exp.to_f / actor.next_level_exp, expcolor1, expcolor2)
        draw_text(x, y + 5, 30, line_height, "EXP")
        draw_current_and_max_values(x + 16, y + 5, width, actor.exp, actor.next_level_exp, mp_color(actor), normal_color)
      end
    #=============================================================================
    #  DRAW_ANGELO_EQUIP
    #=============================================================================
      def draw_angelo_equip(item, x, y, enabled = true, width = 120)
        return unless item
        draw_icon(item.icon_index, x, y, enabled)
        change_color(normal_color, enabled)
        draw_text(x + 14, y, width, 2 * line_height / 3, item.name)
      end
      
    def params_distance
      2 + line_height / 2
    end
    
      def draw_angelo_params(actor, x, y, width = 75)
        for i in 0..5
    
         draw_gauge(x, y + i * params_distance - 10, width, actor.param(i + 2).to_f / 999, Color.new(237, 173, 202, 255), Color.new(111, 36, 69, 255))
         draw_text(x, y + i * params_distance - 10, 60, line_height, Vocab::param(i + 2))
        end
      end    
    
      def draw_actor_angelo_status(actor, x, y)
        colorback = Color.new(0, 0, 0, 150)
        colorback2 = Color.new(0, 0, 0, 190)
    
        self.contents.fill_rect(x + 240, y - 4, 75, 88, colorback)
        self.contents.fill_rect(x + 240, y, 75, 80, colorback2)
        draw_actor_name(actor, x - 96, y)
        draw_actor_nickname(actor, x - 75, y + 60)
        draw_actor_level(actor, x, y - line_height / 2)
        draw_actor_icons(actor, x + 32, y - line_height / 2)
        draw_actor_class(actor, x + 132, y - line_height / 2)
        draw_angelo_params(actor, x + 240, y - 4)
        draw_angelo_hp(actor, x, y + line_height * 0)
        draw_angelo_mp(actor, x, y + line_height * 1)
        draw_angelo_exp(actor, x, y + line_height * 2)
        for i in 0..1
          draw_angelo_equip(actor.equips[i], x + line_height * (i * 6), y + line_height * 3)
        end 
        for i in 2..4
          draw_angelo_equip(actor.equips[i], 420, y - 40 + line_height * i)
        end
      end
      
        def draw_back_bars(x, y, width)
          colorback = Color.new(0, 0, 0, 150)
          colorback2 = Color.new(0, 0, 0, 190)
          self.contents.fill_rect(x, y, width, 16, colorback)
          self.contents.fill_rect(x, y + 4, width, 8, colorback2)
          
    #      self.contents.fill_rect(x, y + 24, width, 16, colorback)
    #      self.contents.fill_rect(x, y + 28, width, 8, colorback2)
          
    #      self.contents.fill_rect(x, y + 24 + 96, 543, 16, colorback)
    #      self.contents.fill_rect(x, y + 28 + 96, 543, 8, colorback2)
        
    #      self.contents.fill_rect(x, y + 24 + 96 + 96, 543, 16, colorback)
    #      self.contents.fill_rect(x, y + 28 + 96 + 96, 543, 8, colorback2)
    
    end
    
    
      def col_max
        return 1
      end
    
      def window_width
        544
      end
      
      def window_height
        368
      end
      
      def spacing
        return 18
      end
      
      def item_max
        $game_party.members.size
      end
      
      def item_height
        (height - standard_padding * 2) / 3
      end
      
      def draw_item(index)
        self.contents.font = Font.new("Times New Roman", 16)
        actor = $game_party.members[index]
        enabled = $game_party.battle_members.include?(actor)
        rect = item_rect(index)
        draw_item_background(index)
        draw_actor_face(actor, rect.x + 8, rect.y + 8, enabled)
        draw_actor_angelo_status(actor, rect.x + 108, rect.y + line_height / 2)
      end
      
      def draw_item_background(index)
        if index == @pending_index
          contents.fill_rect(item_rect(index), pending_color)
        end
      end
      
      def process_ok
        super
        $game_party.menu_actor = $game_party.members[index]
      end
      
      def select_last
        select($game_party.menu_actor.index || 0)
      end
      
      def pending_index=(index)
        last_pending_index = @pending_index
        @pending_index = index
        redraw_item(@pending_index)
        redraw_item(last_pending_index)
      end
    
    end
    
    class Scene_Menu < Scene_MenuBase
      def start
        super
        create_command_window
    #    create_gold_window
        create_status_window
      end
      
      def create_command_window
        @command_window = Window_MenuCommand.new
        @command_window.set_handler(:item,      method(:command_item))
        @command_window.set_handler(:skill,     method(:command_personal))
        @command_window.set_handler(:equip,     method(:command_personal))
        @command_window.set_handler(:status,    method(:command_personal))
        @command_window.set_handler(:formation, method(:command_formation))
        @command_window.set_handler(:save,      method(:command_save))
        @command_window.set_handler(:game_end,  method(:command_game_end))
        @command_window.set_handler(:cancel,    method(:return_scene))
      end
    #  def create_gold_window
    #    @gold_window = Window_Gold.new
    #    @gold_window.x = 400
    #    @gold_window.y = -16
    #  end
      #--------------------------------------------------------------------------
      def create_status_window
        @status_window = Window_MenuStatus.new(@command_window.width, 0)
      end
      def command_item
        SceneManager.call(Scene_Item)
      end
      def command_personal
        @status_window.select_last
        @status_window.activate
        @status_window.set_handler(:ok,     method(:on_personal_ok))
        @status_window.set_handler(:cancel, method(:on_personal_cancel))
      end
      def command_formation
        @status_window.select_last
        @status_window.activate
        @status_window.set_handler(:ok,     method(:on_formation_ok))
        @status_window.set_handler(:cancel, method(:on_formation_cancel))
      end
      def command_save
        SceneManager.call(Scene_Save)
      end
      def command_game_end
        SceneManager.call(Scene_End)
      end
      def on_personal_ok
        case @command_window.current_symbol
        when :skill
          SceneManager.call(Scene_Skill)
        when :equip
          SceneManager.call(Scene_Equip)
        when :status
          SceneManager.call(Scene_Status)
        end
      end
      def on_personal_cancel
        @status_window.unselect
        @command_window.activate
      end
      def on_formation_ok
        if @status_window.pending_index >= 0
          $game_party.swap_order(@status_window.index,
                                 @status_window.pending_index)
          @status_window.pending_index = -1
          @status_window.redraw_item(@status_window.index)
        else
          @status_window.pending_index = @status_window.index
        end
        @status_window.activate
      end
      def on_formation_cancel
        if @status_window.pending_index >= 0
          @status_window.pending_index = -1
          @status_window.activate
        else
          @status_window.unselect
          @command_window.activate
        end
      end
    end
    Изображения Изображения
    • Тип файла: png zxcccc.png (150.5 Кб, Просмотров: 190)
    Последний раз редактировалось aisuuw; 22.02.2012 в 20:11.
    Я очень злой дядя.....Так что думайте перед тем когда говорить!
    Спрайты тут http://rpgmaker.su/members/vancar/albums/

  2. #2
    Бывалый Аватар для Anxel
    Информация о пользователе
    Регистрация
    06.06.2011
    Адрес
    п.Солнечный, Хаб.край
    Сообщений
    942
    Записей в дневнике
    11
    Репутация: 23 Добавить или отнять репутацию

    По умолчанию

    Вопрос: Где сам скрипт то?
    Мнение: Как-то всё криво..."Выколиглаз" просто.

  3. #3
    Местный Аватар для Dante XIII
    Информация о пользователе
    Регистрация
    13.10.2010
    Адрес
    Киев
    Сообщений
    243
    Записей в дневнике
    10
    Репутация: 7 Добавить или отнять репутацию

    По умолчанию

    Интересно выглядит, но не уверен, что будет так уж удобно.
    But you probably won't listen to me anyway, will you?

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)

Социальные закладки

Социальные закладки

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •