- 50
- Posts
- 5
- Years
- Seen Oct 17, 2023
![[PokeCommunity.com] Color in party ( Version 16.2) [PokeCommunity.com] Color in party ( Version 16.2)](https://i.postimg.cc/rmZ4TqMw/2019-04-10-21-38-25-108.png)
I am trying to do the same function, I know that in version 17-20 it is with the following code:
class Window_CommandPokemonColor < Window_CommandPokemon
def initialize(commands,width=nil)
@colorKey = []
for i in 0...commands.length
if commands.is_a?(Array)
@colorKey = commands[1]
commands = commands[0]
end
end
super(commands,width)
end
def drawItem(index,count,rect)
pbSetSystemFont(self.contents) if @starting
rect = drawCursor(index,rect)
base = self.baseColor
shadow = self.shadowColor
if @colorKey[index] && @colorKey[index]==1
base = Color.new(0,80,160)
shadow = Color.new(128,192,240)
end
pbDrawShadowText(self.contents,rect.x,rect.y,rect.width,rect.height,@commands[index],base,shadow)
end
end
def initialize(commands,width=nil)
@colorKey = []
for i in 0...commands.length
if commands.is_a?(Array)
@colorKey = commands[1]
commands = commands[0]
end
end
super(commands,width)
end
def drawItem(index,count,rect)
pbSetSystemFont(self.contents) if @starting
rect = drawCursor(index,rect)
base = self.baseColor
shadow = self.shadowColor
if @colorKey[index] && @colorKey[index]==1
base = Color.new(0,80,160)
shadow = Color.new(128,192,240)
end
pbDrawShadowText(self.contents,rect.x,rect.y,rect.width,rect.height,@commands[index],base,shadow)
end
end
Can it be done in version 16.2?