• 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 faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Get your art tools and paintbrushes ready and enter Hive's 34th Texturing Contest: Void! Click here to enter!

Help with TEXTAREA frame

Status
Not open for further replies.
Level 17
Joined
Apr 13, 2008
Messages
1,610
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 74
Joined
Aug 10, 2018
Messages
7,940
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,610
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.
 
Status
Not open for further replies.
Top