• 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.

[JASS] SIMPLESTATUSBAR: How to Put BarTexture below the Border?

KPC

KPC

Level 7
Joined
Jun 15, 2018
Messages
195
UI-Frame JASS code, using SIMPLESTATUSBAR:
JASS:
globals
    framehandle back
    framehandle bar
endglobals

function CreateButton1 takes nothing returns nothing
    call BlzLoadTOCFile("war3mapImported\\Templates.toc")

    set back = BlzCreateFrame("EscMenuControlBackdropTemplate", BlzGetFrameByName("ConsoleUIBackdrop", 0), 0, 0)
    call BlzFrameSetAbsPoint(back, FRAMEPOINT_CENTER, 0.15, 0.4)
    call BlzFrameSetSize(back, 0.177, 0.02)

    set bar = BlzCreateFrameByType("SIMPLESTATUSBAR", "", BlzGetFrameByName("ConsoleUI", 0), "", 0)
    call BlzFrameSetPoint(bar, FRAMEPOINT_TOPLEFT, back, FRAMEPOINT_TOPLEFT, 0.004, -0.004)
    call BlzFrameSetPoint(bar, FRAMEPOINT_BOTTOMRIGHT, back, FRAMEPOINT_BOTTOMRIGHT, -0.004, 0.004)
    call BlzFrameSetTexture(bar, "ui\\feedback\\xpbar\\human-bigbar-fill", 0, false)
    call BlzFrameSetValue(bar, 50)
endfunction

How to make the BarTexture* display under the Border (Bar Frame)?
Now the BarTexture is on/above the golden Border (overlay)

*BarTexture - progress bar, in the example code we give it a texture and it is white on the image
1733152996790.png

@Uncle @Tasyen maybe you guys know?
 

KPC

KPC

Level 7
Joined
Jun 15, 2018
Messages
195
change the parent of the backdrop. The current parent BlzGetFrameByName("ConsoleUIBackdrop", 0) is rendered lower than simpleframes.
Your proposed solution works, when changing the background parent to BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0)
Like that:
JASS:
set back = BlzCreateFrame("EscMenuControlBackdropTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), 0, 0)

The following effect was obtained:
1733188915160.png


The texture of the bar should be white, so I assume something may be wrong. Perhaps I should use a different parent for the background, or perhaps I have the wrong parent for the SIMLESTATUSBAR. Do you know any solution?

Such an effect is expected:
1733189507350.png
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
Your proposed solution works, when changing the background parent to BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0)
Like that:
JASS:
set back = BlzCreateFrame("EscMenuControlBackdropTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), 0, 0)

The following effect was obtained:
View attachment 500015

The texture of the bar should be white, so I assume something may be wrong. Perhaps I should use a different parent for the background, or perhaps I have the wrong parent for the SIMLESTATUSBAR. Do you know any solution?

Such an effect is expected:
View attachment 500016
Did you try changing the Level? It's going to be one or the other or both.
 
  • Like
Reactions: KPC
The level change wont work. Because Level only changes order of frames managed by one parent/simpletop. And your frames are already above/below each other based on their parent. Imo render order is most influneced by the child index the anchestor of your frame has inside ORIGIN_FRAME_GAME_UI. And changing the level of the simpletop has to many sideeffects. A simpletop is a frame that manges simpleframes.
I made a graphic. the way I understand how level works. This image is based on my tests with many scriptdialogbuttons. [JASS/AI] - The Big UI-Frame Tutorial
frame-level2-jpg.386533

CA has a higher level than B, but it is rendered lower because it's parent C is lower than B.

Your proposed solution works, when changing the background parent to BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0)
Like that:
JASS:
set back = BlzCreateFrame("EscMenuControlBackdropTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), 0, 0)

The following effect was obtained:
View attachment 500015

The texture of the bar should be white, so I assume something may be wrong. Perhaps I should use a different parent for the background, or perhaps I have the wrong parent for the SIMLESTATUSBAR. Do you know any solution?

Such an effect is expected:
View attachment 500016
The used backdrop frameblueprint has a transparency texture in the center (fdf BackdropBackground) which will be over the filled bar altering its visuals.
Code:
Frame "BACKDROP" "EscMenuControlBackdropTemplate" {
    DecorateFileNames,
    BackdropTileBackground,
    BackdropBackground  "EscMenuEditBoxBackground",
    BackdropCornerFlags "UL|UR|BL|BR|T|L|B|R",
    BackdropCornerSize  0.0125,
    BackdropBackgroundSize  0.256,
    BackdropBackgroundInsets 0.005 0.005 0.005 0.005,
    BackdropEdgeFile  "EscMenuEditBoxBorder",
    BackdropBlendAll,
}

Either use some box texture with no center texture
or make a fdf frameblueprint without that whole BackdropBackground feature / a total invisible BackdropBackground.
or make the background a simpleframe texture like in mybar.


Or maybe you make STATUSBAR frames instead, not sure what your goal is. this things display models and the game has built in bar models for it. Has downsides and upsides. it fits better in rendering order when your other frames are not simple, you need for each color/bar an unique model as far I know. making colored clones of manabar is easy in magos model editor.
 
Last edited:
Top