赞 | 1 |
VIP | 1 |
好人卡 | 2 |
积分 | 1 |
经验 | 36245 |
最后登录 | 2020-7-2 |
在线时间 | 465 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 55
- 在线时间
- 465 小时
- 注册时间
- 2011-4-13
- 帖子
- 174
|
[img]注意一下脚本中有明显注释的地方是需要你修改的,主要修改的地方是- self.contents.font.color = normal_color
- self.contents.draw_text(32,32,300,32,"这就是友好度窗口啊!")
复制代码 #######draw_text使用方法为
self.contents.draw_text(【文字的X坐标】,【文字的Y坐标】,【文字的宽度】,【文字的高度(一般为32)】,【文字内容】)
【文字内容】方面,如若是纯文字要加半角双引号,变量则用 $game_variables[n].to_s 以此类推
#######font.color使用方法为
self.contents.font.color = 【文字颜色】之后用CONTENTS.DRAW的字色
绘制多行文字就将以上两行拷贝即可,注意自己计算坐标和宽度
祝你愉快!- class Game_Temp
- attr_accessor :fri
- end
- class Window_Friendship < Window_Base
- def initialize
- super(50, 50, 400, 240) #窗口的位置和尺寸可调,继承于WINDOW_BASE
- self.contents = Bitmap.new(width - 32, height - 32)
- self.visible = false
- self.z = 100000
- refresh
- end
- def refresh
- self.contents.clear
- ##########################################################
- #你要修改的是以下区域
- ##########################################################
- self.contents.font.color = normal_color
- self.contents.draw_text(32,32,300,32,"这就是友好度窗口啊!")
- ##############################################################################
- # 其他地方对MENU进行了部分的定义,可以稍作修改,也可以合并到你自己的Scene_Menu
- #############################################################################
- end
- end
- class Scene_Menu
- def main
- $game_temp.fri = false
- s1 = $data_system.words.item
- s2 = $data_system.words.skill
- s3 = $data_system.words.equip
- s4 = "状态"
- s5 = "存档"
- s6 = "结束游戏"
- s7 = "友好度"
- @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
- @command_window.index = @menu_index
- if $game_party.actors.size == 0
- @command_window.disable_item(0)
- @command_window.disable_item(1)
- @command_window.disable_item(2)
- @command_window.disable_item(3)
- end
- if $game_system.save_disabled
- @command_window.disable_item(4)
- end
- @fri = Window_Friendship.new
- @steps_window = Window_Steps.new
- @steps_window.x = 0
- @steps_window.y = 320
- @gold_window = Window_Gold.new
- @gold_window.x = 0
- @gold_window.y = 416
- @status_window = Window_MenuStatus.new
- @status_window.x = 160
- @status_window.y = 0
- Graphics.transition
- loop do
- Graphics.update
- Input.update
- update
- if $scene != self
- break
- end
- end
- Graphics.freeze
- @command_window.dispose
- @fri.dispose
- @steps_window.dispose
- @gold_window.dispose
- @status_window.dispose
- end
- def update
- @command_window.update
- @fri.update
- @steps_window.update
- @gold_window.update
- @status_window.update
- if @command_window.active
- update_command
- return
- end
- if @status_window.active
- update_status
- return
- end
- end
- def update_command
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- $scene = Scene_Map.new
- return
- end
- if Input.trigger?(Input::C)
- if $game_temp.fri == false
- if $game_party.actors.size == 0 and @command_window.index < 4
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- case @command_window.index
- when 0
- $game_system.se_play($data_system.decision_se)
- $scene = Scene_Item.new
- when 1
- $game_system.se_play($data_system.decision_se)
- @command_window.active = false
- @status_window.active = true
- @status_window.index = 0
- when 2
- $game_system.se_play($data_system.decision_se)
- @command_window.active = false
- @status_window.active = true
- @status_window.index = 0
- when 3
- $game_system.se_play($data_system.decision_se)
- @command_window.active = false
- @status_window.active = true
- @status_window.index = 0
- when 4
- if $game_system.save_disabled
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- $game_system.se_play($data_system.decision_se)
- $scene = Scene_Save.new
- when 5
- $game_system.se_play($data_system.decision_se)
- $scene = Scene_End.new
- when 6
- $game_temp.fri = true
- @fri.visible = true
- end
- return
- else
- $game_temp.fri = false
- @fri.visible = false
- end
- end
- end
- end
复制代码 预览图不发了,自己拷贝到MAIN上就行了 |
评分
-
查看全部评分
|