Hi,
Have below code and still get white buttons with no text?:
CreateRenderImage( 666, 251, 38, 0, 0 )
SetRenderToImage( 666, 0 )
ButtonSprite[0] = CreateSprite ( 103 )
SetSpriteTransparency( ButtonSprite[0], 1 )
SetSpriteDepth ( ButtonSprite[0], 0 )
SetSpriteOffset( ButtonSprite[0], (GetSpriteWidth(ButtonSprite[0])/2) , (GetSpriteHeight(ButtonSprite[0])/2) )
SetSpritePositionByOffset( ButtonSprite[0], screenX, screenY )
text = ButtonText[buttonTextIndex]
outlineIndex as integer = 1
posX as integer
posY as integer
for posX = -2 to 2 step 1
for posY = -2 to 2 step 1
if GetTextExists(index+outlineIndex) = 0 then CreateText( index+outlineIndex, text )
SetTextFont( index+outlineIndex, font )
SetTextSize(index+outlineIndex, size)
SetTextDepth(index+outlineIndex, 0)
if posX = -2 and posY = -2 and buttonTextIndex = 0
dec screenY, ( GetTextTotalHeight(index+outlineIndex)/2 )
endif
SetTextColor(index+outlineIndex, outRed, outGreen, outBlue, alpha)
SetTextAlignment(index+outlineIndex, horizontalJustification)
SetTextPosition(index+outlineIndex, screenX+posX, screenY+posY)
if GetTextExists(index+outlineIndex) then SetTextVisible( index+outlineIndex, 1 )
inc outlineIndex, 1
next posY
next posX
if GetTextExists(index) = 0 then CreateText( index, text )
SetTextFont( index, font )
SetTextSize(index, size)
SetTextDepth(index, 0)
SetTextColor(index, red, green, blue, alpha)
SetTextAlignment(index, horizontalJustification)
SetTextPosition(index, screenX, screenY)
if GetTextExists(index) then SetTextVisible( index, 1 )
inc index, 26
Render()
ButtonWithText[buttonTextIndex] = CreateSprite( 666 )
SetSpriteTransparency( ButtonWithText[buttonTextIndex], 1 )
SetSpriteOffset( ButtonWithText[buttonTextIndex], (GetSpriteWidth(ButtonSprite[0])/2) , (GetSpriteHeight(ButtonSprite[0])/2) )
SetSpritePositionByOffset( ButtonWithText[buttonTextIndex], -9999, -9999 )
SetSpriteColorAlpha( ButtonWithText[buttonTextIndex], 255 )
SetSpriteScaleByOffset( ButtonWithText[buttonTextIndex], 1, 1 )
SetSpriteDepth( ButtonWithText[buttonTextIndex], 0 )
DeleteImage( 666 )
DeleteSprite( ButtonSprite[0] )
SetRenderToScreen()
next buttonTextIndex
endfunction
Any ideas?
I am on Linux, maybe it only works on Windows(R) ?