赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 2 |
经验 | 6936 |
最后登录 | 2022-6-23 |
在线时间 | 77 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 216
- 在线时间
- 77 小时
- 注册时间
- 2008-4-24
- 帖子
- 164
|
- #==============================================================================
- # ■ Window_Status
- #------------------------------------------------------------------------------
- # 显示状态画面、完全规格的状态窗口。
- #==============================================================================
- class Window_Status < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # actor : 角色
- #--------------------------------------------------------------------------
- def initialize(actor)
- super(0, 0, 640, 480)
- self.contents = Bitmap.new(width - 32, height - 32)
- @actor = actor
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- draw_actor_graphic(@actor, 40, 112)
- draw_actor_name(@actor, 4, 0)
- draw_actor_class(@actor, 4 + 144, 0)
- draw_actor_level(@actor, 96, 32)
- draw_actor_state(@actor, 96, 64)
- draw_actor_hp(@actor, 96, 112, 172)
- draw_actor_sp(@actor, 96, 144, 172)
- draw_actor_parameter(@actor, 96, 192, 0)
- draw_actor_parameter(@actor, 96, 224, 1)
- draw_actor_parameter(@actor, 96, 256, 2)
- draw_actor_parameter(@actor, 96, 304, 3)
- draw_actor_parameter(@actor, 96, 336, 4)
- draw_actor_parameter(@actor, 96, 368, 5)
- draw_actor_parameter(@actor, 96, 400, 6)
- self.contents.font.color = system_color
- self.contents.draw_text(320, 10, 80, 32, "EXP")
- self.contents.draw_text(320, 40, 80, 32, "NEXT")
- self.contents.font.color = normal_color
- self.contents.draw_text(320 + 80, 10, 84, 32, @actor.exp_s, 2)
- self.contents.draw_text(320 + 80, 40, 84, 32, @actor.next_rest_exp_s, 2)
- self.contents.font.color = system_color
- self.contents.draw_text(320, 70, 96, 32, "装备")
- draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 100)
- draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 130)
- draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 160)
- draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 190)
- draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 220)
- #############################################################
- #从这个地方开始改写
-
- self.contents.font.color = system_color
- ###########################坐标自己改###########################
- self.contents.draw_text(320, 250, 96, 32, "角色技能")
- #################################################################
- self.contents.font.color = normal_color
- showskill
- end
- #定义skill
- def skill
- return @data[self.index]
- end
- #定义showskill
- def showskill
- @data = []
- for i in [email protected]
- skill = $data_skills[@actor.skills[i]]
- if skill != nil
- @data.push(skill) #读取技能
- end
- end
- @item_max = @data.size
- for i in 0...@item_max
- draw_item(i)
- end
- end
- #定义draw_item
- def draw_item(index)
- skill = @data[index]
- #################这个坐标自己改############################
- x=320 #你想从哪个坐标开始描画技能——x坐标
- y=280+index*25 #y坐标,index是序号,25是间距,但是如果技能太多再往下的显示不出来
- ###########################################################
- rect = Rect.new(x, y, self.width - 32, 32)
- draw_item_name(skill, rect.x-10, rect.y)
- if skill.sp_cost !=0
- self.contents.draw_text(x + 232-50, y, 48, 32, skill.sp_cost.to_s, 2)
- end
- end
- end
复制代码
脚本写完了,在Window_Status里面改。需要自己设定自己的坐标。相信你自己应该会改坐标了。
效果图:http://rpg.blue/upload_program/d ... 题-2_111441396.jpg
顺便说一下,你的字号太大了,肯定不够用。建议是在main里面 Font.default_name = (["黑体"])下面加上一句Font.default_size = 13 #13字号,比较小了,貌似一般是24吧? 系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~ |
|