• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Help with TEXTAREA frame

Level 17
Joined
Apr 13, 2008
Messages
1,597
Hey there.

I'm trying to create a textarea frame without custom FDFs

JASS:
// I tried loading the blizzard TOC file both before creation and in the map init
call BlzLoadTOCFile("UI\Frames\framedef\ui\escmenutemplates.fdf")

// If I create a text, it works fine:
//set DEqCStatSheet[pid] = BlzCreateFrameByType("TEXT", "CSheet"+"p"+I2S(pid), EquipmentBackDropFrame[pid], "", 0)

// This shows nothing when I use BlzFrameSetText on it
//set DEqCStatSheet[pid] = BlzCreateFrame("EscMenuTextAreaTemplate", EquipmentBackDropFrame[pid], 0, 0)

// This crashes when I make the parent visible:
set DEqCStatSheet[pid] = BlzCreateFrameByType("TEXTAREA", "CSheet"+"p"+I2S(pid), EquipmentBackDropFrame[pid], "EscMenuTextAreaTemplate", 0)

call BlzFrameSetAbsPoint(DEqCStatSheet[pid], FRAMEPOINT_TOPLEFT, 0.10, DEqHeroIconBottomRightY)
call BlzFrameSetAbsPoint(DEqCStatSheet[pid], FRAMEPOINT_BOTTOMRIGHT, 0.237, DEqBackDropBottomRightY)
call BlzFrameSetSize(DEqCStatSheet[pid], 0.25, 0.25)

What am I doing wrong?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,550
Hey there.

I'm trying to create a textarea frame without custom FDFs

JASS:
// I tried loading the blizzard TOC file both before creation and in the map init
call BlzLoadTOCFile("UI\Frames\framedef\ui\escmenutemplates.fdf")

// If I create a text, it works fine:
//set DEqCStatSheet[pid] = BlzCreateFrameByType("TEXT", "CSheet"+"p"+I2S(pid), EquipmentBackDropFrame[pid], "", 0)

// This shows nothing when I use BlzFrameSetText on it
//set DEqCStatSheet[pid] = BlzCreateFrame("EscMenuTextAreaTemplate", EquipmentBackDropFrame[pid], 0, 0)

// This crashes when I make the parent visible:
set DEqCStatSheet[pid] = BlzCreateFrameByType("TEXTAREA", "CSheet"+"p"+I2S(pid), EquipmentBackDropFrame[pid], "EscMenuTextAreaTemplate", 0)

call BlzFrameSetAbsPoint(DEqCStatSheet[pid], FRAMEPOINT_TOPLEFT, 0.10, DEqHeroIconBottomRightY)
call BlzFrameSetAbsPoint(DEqCStatSheet[pid], FRAMEPOINT_BOTTOMRIGHT, 0.237, DEqBackDropBottomRightY)
call BlzFrameSetSize(DEqCStatSheet[pid], 0.25, 0.25)

What am I doing wrong?
You're loading the .fdf file not the .toc file.
BlzLoad -> TOC <- File
I don't think you're ever supposed to load an .fdf but I could be wrong.
 
Level 17
Joined
Apr 13, 2008
Messages
1,597
Thank
Place UI\Frames\framedef\ui\escmenutemplates.fdf on a line by itself followed with an empty line in a custom .toc file. Then load the custom .toc file. Read up more on this in a tutorial by Tasyen.
Thank you, but I was under the impression that you can create TextAreas without any custom imports? That might not be the case.
I'm creating a system and I want to minimize the custom assets as much as I can.
 
Top