Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================#
- # Leaf Style Menu v1.02 #
- # NEEDED IMAGES #
- # charset #
- # large_shd_charsheet #
- # large_shd_charsheet_g #
- # colorbar #
- # graybar #
- # hud_leaf #
- # hud_leafexp #
- # imgbar_hp #
- # imgbar_mp #
- # imgbar_exp #
- # #
- # NEEDED SCRIPTS #
- # Neo Menu System LITE by Zetu #
- # Text to Image by Zetu #
- # *Fonts: "Default" (6-8 px) #
- # "24pxReq" (24 px) THESE TWO NEED TO BE ADDED TO T2I's MODULE #
- # "ReqGS" (24 px) Gray Version of 24pxReq. #
- #==============================================================================#
- class Scene_Menu < Scene_Base
- alias nms_start start
- def start
- nms_start
- @status_window.x += 32
- @command_window.opacity = 0
- end
- def create_command_window
- @command_window = Window_CommandNMS.new(160, Z_Systems::NeoMenu::MENU_ITEMS, 1, 0)####
- @command_window.index = @menu_index
- zs_nms_disable
- end
- def cmd_index
- return @command_window.nil? ? 0 : @command_window.index
- end
- end
- class Window_Base
- def draw_pic(filename, x, y, size = -1, allign = 0)
- bitmap = Cache.picture(filename)
- if size == -1
- size = bitmap.width
- end
- size = [[size, 0].max, bitmap.width].min
- rect = Rect.new(0, 0, 0, 0)
- if allign == 1
- rect.x = bitmap.width - size
- end
- rect.width = size
- rect.height = bitmap.height
- self.contents.blt(x, y, bitmap, rect)
- bitmap.dispose
- end
- end
- class Game_Actor < Game_Battler
- def exp_til
- return (@exp - @exp_list[@level])
- end
- def exp_max
- return 0 if @level == 99
- return @exp_list[@level+1] - @exp_list[@level]
- end
- end
- class Window_CommandNMS < Window_Selectable
- include Z_Systems::NeoMenu
- alias nms_initialize initialize
- def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32)
- if row_max == 0
- row_max = (commands.size + column_max - 1) / column_max
- end
- super(-16, -16, 224, row_max * WLH + 80, spacing)
- @commands = commands
- @item_max = commands.size
- @column_max = column_max
- @index = 0
- refresh
- end
- def draw_item(index, enabled = true)
- type = MENU_ITEMS[$scene.cmd_index]
- enabled = !DISABLES[type] unless DISABLES[type].nil?
- rect = item_rect(index)
- self.contents.clear_rect(rect)
- bg_img = (enabled and index == $scene.cmd_index) ? "ColorBar" : "GrayBar"
- tx = index == $scene.cmd_index ? 0 : -16
- font = (enabled and index == $scene.cmd_index) ? "24pxReq" : "ReqGS"
- draw_pic(bg_img, tx, rect.y)
- draw_img_text(@commands[index], tx + 16, rect.y + 4, 0, 0, font)
- draw_icon(ICONS[@commands[index]], tx + 168, rect.y+4)
- end
- def item_rect(index)
- rect = Rect.new(0, 0, 0, 0)
- rect.width = 192
- rect.height = 32
- rect.x = 0
- rect.y = index * 32
- return rect
- end
- alias nms_update update
- def update
- nms_update
- refresh if @last_index != @index
- end
- def refresh
- @last_index = self.index
- self.contents.clear
- @index = @last_index
- for i in 0...@item_max
- draw_item(i)
- end
- end
- def update_cursor
- self.cursor_rect.empty
- end
- end
- class Window_MenuStatus < Window_Selectable
- def initialize(x, y)
- super(x, y, 352, 416)
- refresh
- self.active = false
- self.index = -1
- end
- def refresh
- self.contents.clear
- @item_max = $game_party.members.size
- for actor in $game_party.members
- draw_actor_face(actor, 226, actor.index * 96 + 2, 92)
- y = actor.index * 96 + WLH / 2
- draw_actor_name(actor, 0, y)
- draw_actor_class(actor, 100, y)
- draw_actor_level(actor, 0, y + WLH * 1)
- draw_actor_state(actor, 100, y + WLH * 1)
- draw_actor_imgexp(actor, 4, y + WLH * 2 + 6)
- draw_actor_imghpmp(actor, 100, y + WLH * 2)
- end
- end
- def draw_actor_imgexp(actor, x, y)
- draw_pic("hud_leafexp", x, y)
- if actor.exp_max != 0
- draw_pic("imgbar_exp", x + 3, y + 3, 101 * actor.exp_til / actor.exp_max)
- else
- draw_pic("imgbar_exp", x + 3, y + 3, 101) if actor.level == 99
- end
- end
- def draw_actor_imghpmp(actor, x, y)
- draw_pic("hud_leaf", x, y)
- draw_pic("imgbar_hp", x + 3, y + 3, 101 * actor.hp / actor.maxhp)
- draw_pic("imgbar_mp", x + 3, y +15, 101 * actor.mp / actor.maxmp)
- draw_img_text(actor.maxhp, x + 104, y + 3, spacing = 1, allign = 1)
- draw_img_text("/", x + 60, y + 3)
- draw_img_text(actor.hp, x + 59, y + 3, spacing = 1, allign = 1)
- draw_img_text(actor.maxmp, x + 104, y + 15, spacing = 1, allign = 1)
- draw_img_text("/", x + 60, y + 15)
- draw_img_text(actor.mp, x + 59, y + 15, spacing = 1, allign = 1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement