Magnykikacja napisow
Autor Strona z której zostało pobrane
???? ????
Aby go użyć wystarczy stworzyć nowy skrypt(Edytor skryptów->PPM->Wstaw)
I wkleić tam ten kod:

class Window_Command < Window_Selectable
def initialize(width, commands)
super(0, 0, width, commands.size * 32 + 32)
@item_max = commands.size
@commands = commands
self.contents = Bitmap.new(width - 32, @item_max * 32)
@item = []
self.index = 0
refresh
@oldindex = 0
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
if i != self.index
draw_item_dis(i)
else
draw_item_active(i,@item[i])
end
end
end
#--------------------------------------------------------------------------
# colors and font name etc.
#--------------------------------------------------------------------------

def draw_item_dis(index)
self.contents.font.name = "Arial"
self.contents.font.size -= 2
self.contents.font.color = disabled_color
rect = Rect.new(4+16, 32 * index, self.contents.width - 24, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index])
self.contents.font.size += 2
end
def draw_item_active(index, type)
self.contents.font.name = "Arial"
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(5,32*index+1,self.contents.width,32, @commands[index])
if type==1
self.contents.font.color = disabled_color
else
self.contents.font.color = Color.new(255,255,220,255)
end
self.contents.draw_text(4,32*index,self.contents.width,32, @commands[index])
end
#--------------------------------------------------------------------------
# index
#--------------------------------------------------------------------------
def disable_item(index)
@item[index] = 1
end

#--------------------------------------------------------------------------
# update
#--------------------------------------------------------------------------
def update
super
#——refresh
if self.index != @oldindex
@oldindex = self.index
refresh
end
end
end
Ankieta:
 


Czy podoba Ci się ta strona?
Tak 100%
Nie 0%
5 Total votes


Shoutbox
 
Wygryzanko
 
 
Jesteś 267215 visitors (1103874 hits) gościem na tej stronie!
Buttony:


Kurs HTML - strona WWW za darmo


Katalog stron - Dobre stronyKatalog stron

Toplisty:

Robimy Gry


Toplista graczy!
RPG MAKER - ranking
Bannery:



Linki:
Qezef

Inne:

This website was created for free with Own-Free-Website.com. Would you also like to have your own website?
Sign up for free