Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[General] Dialog menu repositioning

Discussion in 'World Editor Help Zone' started by SpiritTauren, Mar 6, 2020.

  1. SpiritTauren

    SpiritTauren

    Joined:
    Mar 10, 2009
    Messages:
    208
    Resources:
    2
    Icons:
    1
    Skins:
    1
    Resources:
    2
    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.
    [​IMG]
    Now that I think of it: another option would be changing the dialog button size. Does anyone know how to do it?
     
    Last edited: Mar 6, 2020
  2. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,695
    Resources:
    37
    Tools:
    2
    Maps:
    3
    Spells:
    11
    Tutorials:
    20
    JASS:
    1
    Resources:
    37
    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.
     
  3. SpiritTauren

    SpiritTauren

    Joined:
    Mar 10, 2009
    Messages:
    208
    Resources:
    2
    Icons:
    1
    Skins:
    1
    Resources:
    2
    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 (Text):

    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: Mar 6, 2020
  4. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,695
    Resources:
    37
    Tools:
    2
    Maps:
    3
    Spells:
    11
    Tutorials:
    20
    JASS:
    1
    Resources:
    37
    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 (Text):
    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:
    Code (vJASS):
    call BlzLoadTOCFile(importedTOCFilePath)
    at map init.

    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.
     
  5. SpiritTauren

    SpiritTauren

    Joined:
    Mar 10, 2009
    Messages:
    208
    Resources:
    2
    Icons:
    1
    Skins:
    1
    Resources:
    2
    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: Mar 6, 2020