赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 2690 |
最后登录 | 2015-4-29 |
在线时间 | 58 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 58 小时
- 注册时间
- 2007-8-10
- 帖子
- 284
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
如何把红色圈里的字改成绿圈里那种 应该怎摸改呢要艘索那里
我找不到了 谢谢
![]() - #==============================================================================
- # ■ Window_Base
- #------------------------------------------------------------------------------
- # 游戏中全部窗口的超级类。
- #==============================================================================
- class Window_Base < Window
- def draw_actor_guard_state(actor, x, y)
- guard_state = []
- if actor.armor1_id != 0
- for i in $data_armors[actor.armor1_id].guard_state_set
- if !guard_state.include?(i)
- guard_state.push(i)
- end
- end
- end
- if actor.armor2_id != 0
- for i in $data_armors[actor.armor2_id].guard_state_set
- if !guard_state.include?(i)
- guard_state.push(i)
- end
- end
- end
- if actor.armor3_id != 0
- for i in $data_armors[actor.armor3_id].guard_state_set
- if !guard_state.include?(i)
- guard_state.push(i)
- end
- end
- end
- if actor.armor4_id != 0
- for i in $data_armors[actor.armor4_id].guard_state_set
- if !guard_state.include?(i)
- guard_state.push(i)
- end
- end
- end
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 120, 32, "状态防御")
- self.contents.font.color = normal_color
- for i in 0...guard_state.size
- self.contents.draw_text(x + 96 + i%4*48, y+ i/4*32, 48, 32, $data_states[guard_state[i]].name)
- end
- end
- #--------------------------------------------------------------------------
- # ● 生辰成描绘用状态字符串
- # actor : 角色
- # width : 描画目标的宽度
- # need_normal : [正常] 是否为必须 (true / false)
- #--------------------------------------------------------------------------
- def make_battler_state_text(battler, width, need_normal)
- # 获取括号的宽
- brackets_width = self.contents.text_size("[]").width
- # 生成状态名字符串
- text = ""
- for i in battler.states
- if $data_states[i].rating >= 1
- if text == ""
- text = $data_states[i].name
- else
- new_text = text + "/" + $data_states[i].name
- text_width = self.contents.text_size(new_text).width
- if text_width > width - brackets_width
- break
- end
- text = new_text
- end
- end
- end
- # 状态名空的字符串是 "[正常]" 的情况下
- if text == ""
- if need_normal
- text = "●正常"
- end
- else
- # 加上括号
- text = "★" + text
- end
- # 返回完成后的文字类
- return text
- end
- #--------------------------------------------------------------------------
- # ● 描绘状态
- # actor : 角色
- # x : 描画目标 X 坐标
- # y : 描画目标 Y 坐标
- # width : 描画目标的宽
- #--------------------------------------------------------------------------
- def draw_actor_state(actor, x, y, width = 120)
- text = make_battler_state_text(actor, width, true)
- if !actor.states.empty?
- self.contents.font.color = actor.hp == 0 ? knockout_color : text_color(3)
- else
- self.contents.font.color = normal_color
- end
- self.contents.font.size = 16
- self.contents.draw_text(x, y, width, 32, text)
- self.contents.font.size = 20
- self.contents.font.color=normal_color
- end
- #--------------------------------------------------------------------------
- # ● 描画 EXP
- # actor : 角色
- # x : 描画目标 X 坐标
- # y : 描画目标 Y 坐标
- #--------------------------------------------------------------------------
- def draw_actor_exp(actor, x, y)
- self.contents.font.color = system_color
- self.contents.draw_text(x , y, 48, 32, "经验")
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 24, y, 84, 32, actor.exp_s, 2)
- self.contents.draw_text(x + 108, y, 12, 32, "/", 1)
- self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)
- end
复制代码- #==============================================================================
- # ■ Window_Base
- #==============================================================================
- class Window_Base < Window
-
- #--------------------------------------------------------------------------
- # ○ ゲージを描画
- #--------------------------------------------------------------------------
- def draw_meter(now, max, x, y, width, height, start_color, end_color=start_color )
- color=Color.new(96, 96, 96, 255)
- color1 = Color.new(255, 255, 255, 255)
- color2= Color.new(0,0,0,160)
- self.contents.fill_rect(x+0,y+1+1, 1, height-2, color2)
- self.contents.fill_rect(x+0+1,y+1, width-2, height, color2)
- self.contents.fill_rect(x+width,y+1+1, 1, height-2, color2)
-
- self.contents.fill_rect(x, y+1, 1, height-2, color1)
- self.contents.fill_rect(x+width-1, y+1, 1, height-2, color1)
- self.contents.fill_rect(x+1, y, width-2, height, color1)
-
- self.contents.fill_rect(x+2,y+1, width-4, height-2, color)
- self.contents.fill_rect(x+1,y+2, 1, height-4, color)
- self.contents.fill_rect(x-2+width,y+2, 1, height-4, color)
-
- now = now > max ? max : now
- percentage = max != 0 ? (width-2) * now / max.to_f : 0
- if start_color == end_color
- self.contents.fill_rect(x+1, y+1, percentage, height-2, start_color)
- else
- for i in 1..percentage
- r = start_color.red + (end_color.red - start_color.red) / percentage * i
- g = start_color.green + (end_color.green - start_color.green) / percentage * i
- b = start_color.blue + (end_color.blue - start_color.blue) / percentage * i
- a = start_color.alpha + (end_color.alpha - start_color.alpha) / percentage * i
- if i == 1 or i == percentage
- self.contents.fill_rect(x+i, y+2, 1, height-4, Color.new(r, g, b, a))
- else
- self.contents.fill_rect(x+i, y+1, 1, height-2, Color.new(r, g, b, a))
- end
- end
- end
- end
- end
复制代码 版务信息:本贴由楼主自主结贴~ |
|