• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

How can I move the panel under the items?

Level 3
Joined
Apr 19, 2022
Messages
18
I try to move the items, but the panel stays in place. I have not found a way to access it to move it to the right.
 

Attachments

  • 5440813933364637843.jpg
    5440813933364637843.jpg
    107.1 KB · Views: 66
  • 5440388594163380967.jpg
    5440388594163380967.jpg
    135.8 KB · Views: 61
The visual slots are part of the background textures, and they are not directly accessable by map script/triggers, unnamed children of "ConsoleUI", or "ConsoleTopBar" & "ConsoleBottomBar" in Warcraft 3 V2.0. As written in the file ui\framedef\ui\ConsoleUI.fdf

The inventory visuals are mostly in ConsoleTexture03, but a small part is inside ConsoleTexture02
 
Tasyen, did I understand correctly that I can't interact with this panel via script? So, to move the inventory, I need to edit the fdf file?
The visual slots are part of the background textures, and they are not directly accessable by map script/triggers, unnamed children of "ConsoleUI", or "ConsoleTopBar" & "ConsoleBottomBar" in Warcraft 3 V2.0. As written in the file ui\framedef\ui\ConsoleUI.fdf

The inventory visuals are mostly in ConsoleTexture03, but a small part is inside ConsoleTexture02
 
The visual inventory is included in the background console textures, each melee race has one,
ui\console\human\humanuitile03.
ui\console\orc\orcuitile03
look at a ui skin texture like Fallout UI [Reforged] SD uitile03 has the inventory and the command card together.
You could edit the background image and import it into the map than move the inventory origin buttons to the right spot.

Trigger wise there is no direct access to that background texture, only indirect over its anchor points/relative position. moving the anchored would move all of the bottom right also the command bar, looks like you dont want that.

Or maybe you could do something with fdf. you could change size and dont display the inventory and add another texture that is only the inventory background. by changing the mention ui\framedef\ui\ConsoleUI.fdf (not sure if your version of warcraft 3 accepts changes to it as a map import)

TexCoord is the fdf action to only use a part of an image in rect form
.
Maybe my resource CustomConsoleUI helps you, it instructs to hide the default background over game interface and then provides a custom fdf which you could change, if your warcraft 3 version does not allow changes to ConsoleUI.fdf directly.
 
ve added a texture on top of the standard inventory (Frame), but I’m running into a new issue. I can’t make the inventory slots appear above the texture frame—the items stay underneath it. However, when I set the frame level of the texture using:

text

JASS:
call BlzFrameSetLevel(IconImage[index], -2) 
call BlzFrameSetLevel(IconButton[index], -2)
*it goes completely behind the panel and becomes invisible.

So my question is: how can I bring the standard inventory slots (InventoryButton_0 - 5) to the front?

My version of Warcraft 2.0.2

JASS:
globals
    constant real TOOLTIP_CHAR_WIDTH = 0.003
    constant real TOOLTIP_LINE_HEIGHT = 0.015
    constant real TOOLTIP_TEXT_PADDING = 0.008
    constant real TOOLTIP_MAX_WIDTH = 0.18
   
    framehandle array IconButton
    framehandle array IconHighlight
    framehandle array IconImage
    framehandle array TooltipFrame
    framehandle array TooltipText
    framehandle IconFrame = null
    integer ICON_ROWS = 3
    integer ICON_COLS = 1
   
    hashtable ButtonHash = InitHashtable()
    integer array IconButtonIndex
   
    real udg_TooltipCalculatedWidth
    real udg_TooltipCalculatedHeight
   
    private constant real ICON_SIZE = 0.116
    private constant real ICON_PADDING = 0.01
    private constant real ICON_X_POS = 0.553
    private constant real ICON_Y_POS = 0.0575
endglobals


function CreateIcon takes integer index, string iconPath, string tooltipText returns nothing
    local trigger trigEnter
    local trigger trigLeave
    local trigger trigClick
    local integer i = 0

    set IconButton[index] = BlzCreateFrameByType("BUTTON", "IconBtn" + I2S(index), BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), "", 0)
    call BlzFrameSetSize(IconButton[index], ICON_SIZE, ICON_SIZE)
    call BlzFrameSetAbsPoint(IconButton[index], FRAMEPOINT_CENTER, ICON_X_POS, ICON_Y_POS - index * (ICON_SIZE + ICON_PADDING))
   
    call SaveInteger(ButtonHash, 0, GetHandleId(IconButton[index]), index)
   
    set IconImage[index] = BlzCreateFrameByType("BACKDROP", "IconImage" + I2S(index), IconButton[index], "", 0)
    call BlzFrameSetAllPoints(IconImage[index], IconButton[index])
    call BlzFrameSetTexture(IconImage[index], iconPath, 0, true)
    call BlzFrameSetLevel(BlzGetFrameByName("InventoryButton_0", 0), 2) // Not visible. Why?
    call BlzFrameSetLevel(BlzGetFrameByName("InventoryButton_5", 0), 2) //Not visible. Why?
    call BlzFrameSetLevel(IconImage[index], 0)
    call BlzFrameSetLevel(IconButton[index], 0)

endfunction

private function Init takes nothing returns nothing
    local trigger t = CreateTrigger()
    local integer i = 0
    loop
        exitwhen i == bj_MAX_PLAYERS
        //call TriggerRegisterPlayerUnitEvent(t, Player(i), EVENT_PLAYER_UNIT_USE_ITEM, null)
        set i = i + 1
    endloop
    call TriggerAddAction(t, function OnUseItem)
    call CreateIcon(0, "war3mapImported\\9b1.blp", "")
    call ItemsBase()
endfunction

endlibrary
 

Attachments

  • 02b3fe67-3f5f-4de7-92ea-54b2e4b3164a.jpg
    02b3fe67-3f5f-4de7-92ea-54b2e4b3164a.jpg
    80.5 KB · Views: 53
  • 9b1.blp
    9b1.blp
    49.9 KB · Views: 51
Render/Layer order in warcraft 3 frames is done by parentship/layermaster(simpletop). And inside one layer the (simple)frames are reordered by set level.
the children of a frame or the simpleframes managed by a simpletop(layermaster) are above the parent layermaster but lower than the higher brother of the parent
these item buttons belong to simpleframes and are inside the simpletop that manages the "ConsoleUI" layer.
Frame LeveL2.jpg

you could use some other parent, not BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0).
try Parent of ORIGIN_FRAME_PORTRAIT
"ConsoleUIBackdrop",0
Minimap or parent of minimap.
Maybone one of them has the right render level.

If that does not work well you could make simpleframes to display they wanted images, that would allow you to put them inside the layer of the buttons and fine tune the order.
One can make a simpleframe image by code only with simplestatusbar.


Lua:
icon = BlzCreateFrameByType("SIMPLESTATUSBAR", "name", BlzGetFrameByName("ConsoleUI",0), "", 0)
BlzFrameSetValue(icon, 100)
BlzFrameClearAllPoints(icon)
BlzFrameSetTexture(icon, BlzGetAbilityIcon(FourCC'Hpal'), 0, false)
BlzFrameSetAbsPoint(icon, FRAMEPOINT_TOPLEFT, 0.4, 0.4)
BlzFrameSetSize(icon, 0.03, 0.03)
in V2.0 "ConsoleBottomBar" is probably a smarter parent here.
 
Back
Top