Arkadious
Developer of Fragmentum
- 50
- Posts
- 9
- Years
- Age 27
- New Zealand
- Seen Apr 30, 2021
Hi everyone :)
So far I've been able to remove all the shadows from most sections of text in the summary screens. However, when I first edited some essentials scripts to remove shadows for sections like the ability descriptions and move descriptions, it ended up displaying like how it is in the picture attachment.
I'm using Essentials 17.2 and I think the method of how shadows are drawn is different from some previous versions which is one of the reasons why I'm asking. The picture below is what happens with the code I have at the moment, which makes the text in sections like the abilities part look like that.
The sections I edited in DrawText were def DrawTextEx & def renderLineBrokenChunksWithShadow
The section I edited in SpriteWindow_text was def refresh
I edited them by removing the shadowColor variable from them, changing it to 7 instead of 8 variables (I think?)
Code is below:
What should I change, or what other sections should I edit to change it. As always, any help is appreciated thanks.
So far I've been able to remove all the shadows from most sections of text in the summary screens. However, when I first edited some essentials scripts to remove shadows for sections like the ability descriptions and move descriptions, it ended up displaying like how it is in the picture attachment.
I'm using Essentials 17.2 and I think the method of how shadows are drawn is different from some previous versions which is one of the reasons why I'm asking. The picture below is what happens with the code I have at the moment, which makes the text in sections like the abilities part look like that.
The sections I edited in DrawText were def DrawTextEx & def renderLineBrokenChunksWithShadow
The section I edited in SpriteWindow_text was def refresh
I edited them by removing the shadowColor variable from them, changing it to 7 instead of 8 variables (I think?)
Code is below:
Code:
def renderLineBrokenChunksWithShadow(bitmap,xDst,yDst,normtext,maxheight,baseColor)
for i in 0...normtext.length
width=normtext[i][3]
textx=normtext[i][1]+xDst
texty=normtext[i][2]+yDst
if maxheight==0 || normtext[i][2] maxheight
height=normtext[i][4]
text=normtext[i][0]
bitmap.draw_text(textx+2,texty,width+2,height,text)
bitmap.draw_text(textx,texty+2,width+2,height,text)
bitmap.draw_text(textx+2,texty+2,width+2,height,text)
bitmap.font.color=baseColor
bitmap.draw_text(textx,texty,width+2,height,text)
end
end
end
def drawTextEx(bitmap,x,y,width,numlines,text,baseColor)
normtext=getLineBrokenChunks(bitmap,text,width,nil,true)
renderLineBrokenChunksWithShadow(bitmap,x,y,normtext,numlines*32,baseColor)
end
Code:
def refresh
self.contents=pbDoEnsureBitmap(self.contents,self.width-self.borderX,self.height-self.borderY)
self.contents.clear
drawTextEx(self.contents,0,0,self.contents.width,0,@text.gsub(/\r/,""),@baseColor)
end
Attachments
Last edited: