- UID
 - 104
 - 帖子
 - 8486
 - 主题
 - 173
 - 精华
 - 3
 - 积分
 - 13214
 - 历练
 - 7 
 - 声望
 - 24 
 - 人气
 - 2494 
 - 经验
 - 12329 
 - 金钱
 - 1353 
 - 注册时间
 - 2009-8-27
 - 最后登录
 - 2025-10-24
 - 在线时间
 - 925 小时
 - 阅读权限
 - 100
  
 
 
 
  
TA的每日心情  | 开心 2025-10-24 00:14 | 
|---|
 
  签到天数: 903 天 [LV.10]以坛为家III - 精华
 - 3
 - 积分
 - 13214
 - 历练
 - 7 
 - 声望
 - 24 
 - 人气
 - 2494 
 
 
 
 
 
 
 | 
 本帖最后由 最爱南宫煌 于 2010-9-21 14:26 编辑  
- # ▼▲▼ XRXS20. マップ名表示ウィンドウ 1.01 ▼▲▼ 
 
 - # by にふ, 桜雅 在土 
 
 - #============================================================================== 
 
 - # ■ Window_Map_Name 
 
 - #------------------------------------------------------------------------------ 
 
 - #  マップ名を表示するウィンドウです。 
 
 - #============================================================================== 
 
 - class Window_Map_Name < Window_Base 
 
 - #-------------------------------------------------------------------------- 
 
 - # ● オブジェクト初期 
 
 - #-------------------------------------------------------------------------- 
 
 - def initialize 
 
 - super(460, 0, 180, 64) 
 
 - self.contents = Bitmap.new(width-32, height-32) 
 
 - @showing_time = 0 
 
 - @text_color = Color.new(255,255,255,255) # 地名:描写文字色 
 
 - end 
 
 - #-------------------------------------------------------------------------- 
 
 - # ● テキスト設定 
 
 - # text : ウィンドウに表示する文字列 
 
 - # align : アラインメント (0..左揃え、1..中央揃え、2..右揃え) 
 
 - #-------------------------------------------------------------------------- 
 
 - def set_text(text, align = 2) 
 
 - # テキストとアラインメントの少なくとも一方が前回と違っている場合 
 
 - if text != @text or align != @align 
 
 - # テキストを再描画 
 
 - self.contents.clear 
 
 - @showing_time = 100 
 
 - @text = text 
 
 - @align = align 
 
 - @actor = nil 
 
 - self.contents_opacity = 255 
 
 - x = 4 
 
 - y = 0 
 
 - self.contents.font.color = Color.new( 0, 0, 0, 192) 
 
 - self.contents.draw_text(x+2, y+2, self.width - 40, 32, "-"+text+"-",align=1) 
 
 - self.contents.font.color = Color.new( 64, 64, 64, 192) 
 
 - self.contents.draw_text(x-1, y-1, self.width - 40, 32, "-"+text+"-", align=1) 
 
 - self.contents.draw_text(x+1, y-1, self.width - 40, 32, "-"+text+"-", align=1) 
 
 - self.contents.draw_text(x-1, y+1, self.width - 40, 32, "-"+text+"-", align=1) 
 
 - self.contents.draw_text(x+1, y+1, self.width - 40, 32, "-"+text+"-", align=1) 
 
 - self.contents.font.color = @text_color 
 
 - self.contents.draw_text(x, y, self.width - 40, 32, "-"+text+"-", align=1) 
 
 - else 
 
 - @showing_time -= 1 
 
 - if @showing_time < 100 
 
 - # フェードアウトしはじめる 
 
 - self.contents_opacity = @showing_time * 100
 
 - elsif @showing_time <= 0 
 
 - # 一定時間経過したので表示を消す 
 
 - self.contents.clear 
 
 - end 
 
 - end 
 
 - self.visible = true 
 
 - end 
 
 - end 
 
 - #============================================================================== 
 
 - # ■ Scene_Map 
 
 - #============================================================================== 
 
 - class Scene_Map 
 
 - #-------------------------------------------------------------------------- 
 
 - # ● メイン処理 
 
 - #-------------------------------------------------------------------------- 
 
 - alias xrxs20_main main 
 
 - def main 
 
 - # 地名ウィンドウを作成 
 
 - @map_name_window = Window_Map_Name.new 
 
 - @map_name_window.opacity = 0 
 
 - # 戻す 
 
 - xrxs20_main 
 
 - # 地名ウィンドウを解放 
 
 - @map_name_window.dispose 
 
 - end 
 
 - #-------------------------------------------------------------------------- 
 
 - # ● フレーム更新 
 
 - #-------------------------------------------------------------------------- 
 
 - alias xrxs20_update update 
 
 - def update 
 
 - # 地名ウィンドウの更新 
 
 - @map_name_window.set_text($game_map.name,1) 
 
 - xrxs20_update 
 
 - end 
 
 - end 
 
 - #============================================================================== 
 
 - # ■ Scene_Title 
 
 - #============================================================================== 
 
 - class Scene_Title 
 
 - #-------------------------------------------------------------------------- 
 
 - # ● メイン処理 
 
 - #-------------------------------------------------------------------------- 
 
 - alias xrxs20_main main 
 
 - def main 
 
 - $map_infos = load_data("Data/MapInfos.rxdata") 
 
 - for key in $map_infos.keys 
 
 - $map_infos[key] = $map_infos[key].name 
 
 - end 
 
 - xrxs20_main 
 
 - end 
 
 - end 
 
 - #============================================================================== 
 
 - # ■ Game_Map 
 
 - #============================================================================== 
 
 - class Game_Map 
 
 - #-------------------------------------------------------------------------- 
 
 - # ● マップ名を取得 
 
 - #-------------------------------------------------------------------------- 
 
 - def name 
 
 - $map_infos[@map_id] 
 
 - end 
 
 - end
 
 - #============================================================================== #本脚本来自仙剑之十里坡 www.palslp.com
 
 - #============================================================================== 
 
  复制代码 
 
比较实用的一个脚本,使用这个脚本后,地图的名称会自动显示在右上角,我个人比较喜欢的。 |   
 
  
 |