Project1
标题:
在商店菜單中把金錢顯示變不透明
[打印本页]
作者:
FrozenDen
时间:
2012-7-28 17:05
标题:
在商店菜單中把金錢顯示變不透明
本帖最后由 FrozenDen 于 2012-7-29 11:28 编辑
小弟在Window_Gold 中加入了 self.opacity = 0 ,令ESC 菜單中變透明
但同樣在商店中也會透明,有個洞。
請問如何只在商店中變回不透明呢?
dsu_plus_rewardpost_czw
作者:
l616631804
时间:
2012-7-28 17:35
在Scene_Menu中修改成如下
#--------------------------------------------------------------------------
# ● 开始处理
#--------------------------------------------------------------------------
def start
super
create_command_window
#~ create_gold_window
create_status_window
##########
create_menugold_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_menugold_window
@menugold_window = Window_MenuGold.new
@menugold_window.x = 0
@menugold_window.y = Graphics.height - @menugold_window.height
end
#~ #--------------------------------------------------------------------------
#~ # ● 生成金钱窗口
#~ #--------------------------------------------------------------------------
#~ def create_gold_window
#~ @gold_window = Window_Gold.new
#~ @gold_window.x = 0
#~ @gold_window.y = Graphics.height - @gold_window.height
#~ end
复制代码
在将Window_Gold复制一份在main前 在做如下修改,
#==============================================================================
# ■ Window_MenuGold
#------------------------------------------------------------------------------
# 显示持有金钱的窗口
#==============================================================================
class Window_MenuGold < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize
super(0, 0, window_width, fitting_height(1)) #金钱窗口高度
self.opacity = 0
refresh
end
#--------------------------------------------------------------------------
# ● 获取窗口的宽度
#--------------------------------------------------------------------------
def window_width
return 160
end
复制代码
作者:
345912390
时间:
2012-7-28 20:44
在Scene_Shop中修改成如下
#--------------------------------------------------------------------------
# ● 生成金錢視窗
#--------------------------------------------------------------------------
def create_gold_window
@gold_window = Window_Gold.new
@gold_window.viewport = @viewport
@gold_window.x = Graphics.width - @gold_window.width
@gold_window.y = @help_window.height
@gold_window.opacity = 255##新加入的行
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1