Hi there!
You know, Window_Help is used for Scene_Skill (also for other Scenes). I want to enlarge the Window_Help class because I want to show power and type of the skill. Here's my code:
There isn't any RGSS-error, but my Window_Help shows just the description text!!! Height and Width of the Window are ok, but the part where my informations should be shown remains empty! Help!
You know, Window_Help is used for Scene_Skill (also for other Scenes). I want to enlarge the Window_Help class because I want to show power and type of the skill. Here's my code:
Code:
class Window_SkillHelp < Window_Base
def initialize
super(0, 0, 640, 128)
self.contents = Bitmap.new(width - 32, height - 32)
end
def set_text(text, align = 0)
if text != @text or align != @align
# Redraw text
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
@text = text
@align = align
@actor = nil
end
end
def skill
return @data[self.index]
end
def draw_item(index)
skill = @data[index]
x = 4 + index % 1 * (288 + 32)
y = index / 2 * 32
opacity = self.contents.font.color == normal_color ? 255 : 128
self.visible = true
self.contents.font.color = system_color
self.contents.draw_text(x, y + 64, 192, 32, "Power", 0)
self.contents.font.color = normal_color
self.contents.draw_text(x + 64, y + 64, 48, 32, skill.power.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(x + 160, y + 64, 192, 32, "Hit Chance", 0)
self.contents.font.color = normal_color
self.contents.draw_text(x + 288, y + 64, 48, 32, skill.hit.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(x + 384, y + 64, 48, 32, "Type", 0)
self.contents.font.color = normal_color
if skill.variance > 0
self.contents.draw_text(x + 452, y, 192, 32, "M. Attack", 0)
else
self.contents.draw_text(x + 452, y, 192, 32, "P. Attack", 0)
end
end
end
There isn't any RGSS-error, but my Window_Help shows just the description text!!! Height and Width of the Window are ok, but the part where my informations should be shown remains empty! Help!