赞 | 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, 185)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 255
self.back_opacity = 0
self.contents_opacity = 255
self.visible = false
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 = 17
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 = 17
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 = 17
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 = 13
self.contents.draw_text(10, 24, 120, 15, "X:")
self.contents.font.color = normal_color
self.contents.font.size = 13
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 = 13
self.contents.draw_text(60, 15, 90, 32, "Y:")
self.contents.font.color = Color.new(255, 255, 255, 255)
self.contents.font.size = 13
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
谢谢 版务信息:本贴由楼主自主结贴~ |
|