Frame texture.

Level 7
Joined
Aug 26, 2016
Messages
139
How to replace a texture that is already written in an .fdf file.
JASS:
set butS[1] = BlzCreateSimpleFrame("Button", gameUIS, 0)
    call BlzFrameSetAbsPoint(butS[1], FRAMEPOINT_CENTER, 0.1, 0.5)
    call BlzFrameSetTexture(butS[1], "ReplaceableTextures\\CommandButtons\\BTNColt1911.blp" , 0, true)
    call BlzFrameSetTexture(BlzGetFrameByName("Button", 0), "ReplaceableTextures\\CommandButtons\\BTNColt1911.blp", 0, true)
I tried two options with a variable and with the name of the .fdf frame, but the texture remains the one that was assigned in the file.
 
You need to target the Texture/Backdrop frame with the SetTexture call, the button itself does not display Textures, it has children doing that.

When you used the fdf actions: NormalTexture, PushedTexture or DisabledTexture: Then map script can not do it, map script lacks a function to access these (the frame child api does not contain Texture/String), nor has it a function to set texture for children of a button.
 
Top