赞 | 0 |
VIP | 0 |
好人卡 | 110 |
积分 | 1 |
经验 | 24791 |
最后登录 | 2013-6-25 |
在线时间 | 687 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 687 小时
- 注册时间
- 2012-10-29
- 帖子
- 1543
|
本帖最后由 j433463 于 2012-11-25 05:23 编辑
- #==============================================================================
- # ■ Window_Menu_MAP_NBE
- #------------------------------------------------------------------------------
- # 显示角色坐标,荣誉值
- #==============================================================================
- class Window_Menu_Map_NBE < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对象
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, window_width, fitting_height(3))
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 获取窗口的宽度
- #--------------------------------------------------------------------------
- def window_width
- return 160
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- # 显示荣誉值图标与值
- self.contents.font.color = system_color
- self.contents.draw_text(0, 0, 60, 32, "荣誉值")
- self.contents.font.color = normal_color
- self.contents.draw_text(0, 0, 130, 32, $game_variables[31].to_i, 2)
- # 显示当前角色坐标
- self.contents.font.color = system_color
- self.contents.draw_text(0, 23, 60, 32, "坐标↓")
- self.contents.font.color = normal_color
- @p_x = "x: " + $game_player.x.to_s
- @p_y = "y: " + $game_player.y.to_s
- self.contents.draw_text(0, 44, 120, 32, @p_x + " . " + @p_y, 2)
- end
- #--------------------------------------------------------------------------
- # ● 打开窗口
- #--------------------------------------------------------------------------
- def open
- refresh
- super
- end
- end
- #==============================================================================
- # ■ Scene_Menu
- #------------------------------------------------------------------------------
- # 菜单画面
- #==============================================================================
- class Scene_Menu < Scene_MenuBase
- #--------------------------------------------------------------------------
- # ● 生成窗口
- #--------------------------------------------------------------------------
- alias create_map_window create_gold_window
- def create_gold_window
- create_map_window
- @map_window = Window_Menu_Map_NBE.new
- @map_window.x = 0
- @map_window.y = Graphics.height - @gold_window.height - @map_window.height
- end
- end
复制代码 第二个菜单显示荣誉值[变量31]与坐标,刚好我才学过怎么写时间窗口,修改了一下
下面是找到的时间窗口多行显示的教学,可以去参考参考吧,比较看看改了哪几行。
http://rpg.blue/forum.php?mod=viewthread&tid=222048��� |
|