• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[General] Dialog menu repositioning

Status
Not open for further replies.
Level 8
Joined
Mar 10, 2009
Messages
213
Hey, what would be the easiest solution, if I want simply to re-position the dialog button menu?
I don't want any custom frames (unless it's the best/only way), etc. Is there any in-game/editor/interface constants option to slide the interface axis? I didn't find any, and the forum search results wouldn't return anything up to date.

Before the Reforged-associated changes, it used to appear in a top->down pattern. So I abused the fact, that you could have roughly 1-12 dialog lines without blocking cinematic transmission.
Now any dialog appears more centered.
full
Now that I think of it: another option would be changing the dialog button size. Does anyone know how to do it?
 
Last edited:
Now that I think of it: another option would be changing the dialog button size. Does anyone know how to do it?
In reforged one can import a fdf which redefines "ScriptDialogButton" with a smaller Height which would be loaded into the game before the Dialog is shown with a TOC.
 
Level 8
Joined
Mar 10, 2009
Messages
213
In reforged one can import a fdf which redefines "ScriptDialogButton" with a smaller Height which would be loaded into the game before the Dialog is shown with a TOC.
Thank you. I appreciate everything you do for the hive ppl <3 I'm reading this thread: [JASS/AI] - UI: Create a TextButton
It's hard to process something completely new in a short time period.

So, did I understand it right? Please, pardon me for my clumsiness.

1) Create a custom ScriptDialogButton.fdf file (which I'll reference in a TOC file) with:
Code:
Frame "GLUETEXTBUTTON" "ScriptDialogButton" INHERITS WITHCHILDREN "EscMenuButtonTemplate" {
    Width 0.001,
    Height 0.001
    UseActiveContext,
    ButtonText "ScriptDialogButtonText",
   Frame "TEXT" "ScriptDialogButtonText" INHERITS "EscMenuButtonTextTemplate" {
       Text "",
   }
}

2)Create A TOC file that references the custom ScriptButtonDialog.fdf

3)Load the TOC via custom script (whenever needed), then create the button.

Does one edit the "EscMenuButtonTemplate" in that case (at all)?

Or should the new size be directly inserted in "ScriptDialogButton.fdf" as shown above?
I'm kinda lost, =( I've got a feeling I placed the width and height in the wrong place.
But how do I adjust the ScriptDialogButton without losing inheritance of the rest of the elements?
Another question: how does one extract the original fdf/toc files from the game?
Thank you.
 
Last edited:
The goal is to replace the data for "ScriptDialogButton" which is used for the Dialog Buttons. You keep using the default Dialog Actions useable in GUI.
I would suggest this for the fdf
Code:
IncludeFile "UI\FrameDef\UI\EscMenuTemplates.fdf",

Frame "GLUETEXTBUTTON" "ScriptDialogButton" INHERITS WITHCHILDREN "EscMenuButtonTemplate" {
    Height 0.022,
    UseActiveContext,
    ButtonText "ScriptDialogButtonText",
    Frame "TEXT" "ScriptDialogButtonText" INHERITS "EscMenuButtonTextTemplate" {
        Text "",
    }
}
you keep "EscMenuButtonTemplate" as it is.
Then you import that fdf into your map name and path do not matter.

After that you create a TOC-File with 2 lines.
1. Line is the path you imported your fdf in your map
2.LIne is an empty line.
That Toc you import and use:
JASS:
call BlzLoadTOCFile(importedTOCFilePath)
at map init.

Another question: how does one extract the original fdf/toc files from the game?
you get cascview, open the warcraft reforged folder with cascview. Then navigates to war3.w3mod\ui\framedef\ui Here are the fdf used during the game. war3.w3mod\ui\framedef\glue contains the classic warcraft 3 menu.

The default TOC is inside war3.w3mod:ui\framedef\framedef.toc.

Edit: Overwritting Framedefinitions that way does not work in Warcraft 3 V1.31.1. One can even do that for other Frames, if one loads the TOC in function config or in the Lua root code.
 
Level 8
Joined
Mar 10, 2009
Messages
213
The goal is to replace the data for "ScriptDialogButton" which is used for the Dialog Buttons. You keep using the default Dialog Actions useable in GUI.
I would suggest this for the fdf
Code:
IncludeFile "UI\FrameDef\UI\EscMenuTemplates.fdf",
2.LIne is an empty line.
OMG, the 2 reasons I spent several hours trying to understand what's wrong. I'm most grateful for your help! Thank you for your precious time.
It's so much better now. I've got to admit, I like your tutorials (as well as some other guys' work). In the process of digging this info I've learned so much more about frame files in Wc3 just in 1 day.
 
Last edited:
Status
Not open for further replies.
Top