赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 18684 |
最后登录 | 2020-5-5 |
在线时间 | 9 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 60
- 在线时间
- 9 小时
- 注册时间
- 2006-9-7
- 帖子
- 303
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
如下图所示的,把坐标外面的框框去了, 再把坐标图移动到最左上方.
改来改去还是这样,哪位朋友帮我看看.
代码在下面
- #-----------------------------------------------------------------------------
- # ■class map_XY
- #-----------------------------------------------------------------------------
- class Window_xy < Window_Base
-
- def initialize
- super(0, 0, 175, 100)
- self.contents = Bitmap.new(width - 32, height - 22)
- self.opacity = 255
- self.back_opacity = 0
- self.contents_opacity = 255
- self.visible = true
- refresh
- @x = $game_player.x
- @y = $game_player.y
- @id = $game_map.map_id
- end
-
- def refresh
- @x = $game_player.x
- @y = $game_player.y
- @id = $game_map.map_id
- self.contents.clear
- a = "001"
- bitmap=Bitmap.new("Graphics/Pictures/#{a}")
- src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
- self.contents.blt(0, 0, bitmap, src_rect)
- $mapnames = load_data("Data/MapInfos.rxdata")
- map_name = $mapnames[@id].name
- self.contents.font.color = Color.new(255, 255, 255, 255)
- self.contents.font.size = 16
- self.contents.draw_text(0, 6, 105, 18, map_name,2)
- self.contents.font.color = Color.new(255, 255, 255, 255)
- self.contents.font.size = 16
- self.contents.draw_text(0, 6, 105, 18, map_name,2)
- self.contents.font.color = Color.new(255, 255, 255, 255)
- self.contents.font.size = 16
- self.contents.draw_text(0, 6, 105, 18, map_name,2)
- self.contents.font.color = Color.new(255, 255, 255, 255)
- self.contents.font.size = 12
- self.contents.draw_text(10, 24, 120, 15, "X:")
- self.contents.font.color = normal_color
- self.contents.font.size = 12
- self.contents.draw_text(0, 15, 45, 32, @x.to_s,2)
- self.contents.font.color = Color.new(255, 255, 255, 255)
- self.contents.font.size = 12
- self.contents.draw_text(60, 15, 90, 32, "Y:")
- self.contents.font.color = Color.new(255, 255, 255, 255)
- self.contents.font.size = 12
- self.contents.draw_text(0, 15, 95, 32, @y.to_s,2)
- end
-
- def judge
- return true if @x != $game_player.x
- return true if @y != $game_player.y
- return true if @id != $game_map.map_id
- return false
- end
- end
- class Scene_Map
- alias xy_66rpg_main main
- def main
- @xy_window = Window_xy.new
- @xy_window.x = 1
- @xy_window.y = 1
- xy_66rpg_main
- @xy_window.dispose
- end
- alias xy_66rpg_update update
- def update
- xy_66rpg_update
-
- @xy_window.visible = false
- @xy_window.refresh if @xy_window.judge
- else
- @xy_window.visible = true
- end
- end
复制代码 此贴于 2008-10-7 13:25:06 被版主darkten提醒,请楼主看到后对本贴做出回应。 本贴由论坛斑竹darkten结贴,如楼主认为问题未解决,请重新将此贴编辑为“有事请教”,并回帖叙述疑点即可~ ^-^ |
|