Hello everyone, I`m new to these forums. This is my first script. For those who are bored to look for themselves at what it does, it creates a window for messages with the possibility to change the font each time, the person speaking (which also his name is highlighted in
red and allows 3 lines of text to be displayed. My problem is, I don`t know how to make this window I`m creating act like a normal window. Meaning it will dissapear if I press "Action" button again, it will not overlay other windows etc. etc. Basically I want it to act like a normal "Show Text" event window. Right now, my window acts on it's own. I press action, call it, shows up, and dissapears after some time by itself. Also, if I press "Action" too many times, it will look as if it`s adding a layer of brightness to the text. Please help.
class My_Window < Window_Base
attr_accessor :fontused
attr_accessor :person
attr_accessor :message
attr_accessor :message2
attr_accessor :message3
def initialize(fontused = "Arial", person = " ", message = " ", message2 = " ", message3 = " ")
@fontused = fontused
@person = person
@message = message
@message2 = message2
@message3 = message3
if @message.size > 64
print "Warning! More than 64 characters in line 1"
elsif @message2.size > 64
print "Warning! More than 64 characters in line 2"
elsif @message3.size > 64
print "Warning! More than 64 characters in line 3"
end
super(5, 365, 630, 110)
#says the content will be drawn in Bitmap 32x32 Format
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = fontused
self.contents.font.size = 17
self.contents.font.color = text_color(8)
self.contents.draw_text(0,0, 630, 32, person)
self.contents.font.color = text_color(0)
self.contents.draw_text(0,17, 630, 32, message)
self.contents.draw_text(0,34, 630, 32, message2)
self.contents.draw_text(0,51, 630, 32, message3)
end
end