• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Frame texture.

Level 8
Joined
Aug 26, 2016
Messages
142
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