• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Removing text shadows in Essentials 17.2

Arkadious

Developer of Fragmentum
50
Posts
8
Years
  • 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:
    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
    What should I change, or what other sections should I edit to change it. As always, any help is appreciated thanks.
     

    Attachments

    • lN4GU09 - Imgur.png
      lN4GU09 - Imgur.png
      19.1 KB · Views: 19
    Last edited:
    Back
    Top