module X_Litemenu
#================
# 脚本设置在这里!
#================
MENU_WINDOW_Y = 50
CHARA_WINDOW_Y = 160
CHARA_WINDOW_WIDTH = 175
#是否显示等级?true or false
SHOW_LV = true
#是否显示地图名/金钱对话框?true or false
SHOW_LOCATION_WINDOW = true
VOCAB_LOCATION = "地图:"
VOCAB_GOLD = "金钱:"
LOCATION_WINDOW_Y = 295
LOCATION_TEXT_X = 96
GOLD_TEXT_X = 84
end
class Scene_Menu < Scene_Base
def initialize(menu_index = 0)
@menu_index = menu_index
end
def start
super
create_menu_background
create_command_window
lite_create_location_window if X_Litemenu::SHOW_LOCATION_WINDOW == true
lite_create_actor_window
end
def lite_create_actor_window
member = []
@item_max = $game_party.members.size
for actor in $game_party.members
member.push ((actor.name) + " 等级." + (actor.level.to_s)) if X_Litemenu::SHOW_LV == true
member.push (actor.name) if X_Litemenu::SHOW_LV == false
end
@status_window = Window_Command.new(X_Litemenu::CHARA_WINDOW_WIDTH, member)
@status_window.index = @menu_index
@status_window.x = (554 /2) - (@status_window.width/2)
@status_window.y = X_Litemenu::CHARA_WINDOW_Y
@status_window.visible = false
end
def lite_get_map_name
mapdata = load_data("Data/MapInfos.rvdata")
map_id = $game_map.map_id
@map_name = mapdata[map_id].name
end
def lite_draw_currency_value(value, x, y, width)
cx = @location_window.contents.text_size(Vocab::gold).width
@location_window.contents.font.color = @location_window.normal_color
@location_window.contents.draw_text(x+53, y, @location_window.width+cx, 24, value, 0)
@location_window.contents.font.color = @location_window.system_color
@location_window.contents.draw_text(x+(($game_party.gold).to_s.size * 8)+68, y, @location_window.width, 24, Vocab::gold, 0)
end
def lite_create_location_window
width = 300
height = 90
x = (554 /2) - (width/2)
y = X_Litemenu::LOCATION_WINDOW_Y
@location_window = Window_Base.new(x, y, width, height)
@location_window.create_contents
lite_get_map_name
@location_window.contents.font.color = @location_window.system_color
@location_window.contents.draw_text(0, 0, 300, 24, X_Litemenu::VOCAB_GOLD)
@location_window.contents.font.color = @location_window.normal_color
lite_draw_currency_value($game_party.gold, 4, 0, X_Litemenu::GOLD_TEXT_X)
@location_window.contents.font.color = @location_window.system_color
@location_window.contents.draw_text(0, 32, 300, 24, X_Litemenu::VOCAB_LOCATION)
@location_window.contents.font.color = @location_window.normal_color
@location_window.contents.draw_text(X_Litemenu::LOCATION_TEXT_X, 32, 300, 24, @map_name)
end
def terminate
super
dispose_menu_background
@command_window.dispose
@location_window.dispose if @location_window
@status_window.dispose
end
def update
super
update_menu_background
@command_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
@status_window.update
update_actor_selection
end
end
def create_command_window
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end
@command_window = Window_Command.new(200, [s1, s2, s3, s4, s5, s6],2,3)
@command_window.index = @menu_index
@command_window.x = (554 /2) - (@command_window.width/2) #167
@command_window.y = X_Litemenu::MENU_WINDOW_Y
if $game_party.members.size == 0
@command_window.draw_item(0, false)
@command_window.draw_item(1, false)
@command_window.draw_item(2, false)
@command_window.draw_item(3, false)
end
if $game_system.save_disabled
@command_window.draw_item(4, false)
end
end
def start_actor_selection
@command_window.active = false
@status_window.visible = true
@status_window.active = true
@status_window.index = 0
end
def end_actor_selection
@command_window.active = true
@status_window.visible = false
@status_window.active = false
@status_window.index = -1
end
end
以下引用都督竹于2008-4-6 16:17:26的发言:
做些小游戏还是有用途的````
以下引用风雪优游于2008-4-9 16:35:48的发言:
以下引用都督竹于2008-4-6 16:17:26的发言:
做些小游戏还是有用途的````
恩....恩.....能美化下吗?
以下引用火鸡三毛老大于2008-4-10 22:24:14的发言:
像美化战斗选项一样
加图标在选项前面
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |