[Solved] How to create bigger message log?

Level 5
Joined
May 10, 2024
Messages
57
Hi, Who knows how to display text box on entire game screen? Text must be scrollable if it does not fit in screen space. It should work exactly like Message Log in Warcraft 3.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
 
if you want that it looks like the normal LogDialog, otherwise just use what was posted already.

You could make a clone of UI/LogDialog.fdf, change all names probably add some prefix, load it and create the clone then you have a same looking one.
The close feature has to be done with triggers and text is added by targeting the textarea which is part of logDialog as described in the linked Tutorial.

Fdf for LogDialog from warcraft 3 V1.31
Code:
// -- INCLUDE FILES ---------------------------------------------------------

IncludeFile "UI\FrameDef\UI\EscMenuTemplates.fdf",

// -- LOCAL TEMPLATES -------------------------------------------------------

// -- FRAMES ----------------------------------------------------------------

Frame "FRAME" "LogDialog" {
    Width 0.384f,
    Height 0.432f,

    Frame "BACKDROP" "LogBackdrop" {
        SetAllPoints,
        DecorateFileNames,
        BackdropTileBackground,
        BackdropBackground  "EscMenuBackground",
        BackdropCornerFlags "UL|UR|BL|BR|T|L|B|R",
        BackdropCornerSize  0.048,
        BackdropBackgroundSize  0.128,
        BackdropBackgroundInsets 0.01 0.01 0.01 0.01,
        BackdropEdgeFile  "EscMenuBorder",
	    BackdropBlendAll,
    }

    Frame "TEXT" "LogTitle" INHERITS "EscMenuTitleTextTemplate" {
        SetPoint TOP, "LogDialog", TOP, 0.0, -0.03,
        FontJustificationH JUSTIFYCENTER,
        Text "MESSAGE_LOG",
    }


    // --- bottom controls
    Frame "GLUETEXTBUTTON" "LogOkButton" INHERITS WITHCHILDREN "EscMenuButtonTemplate" {
        Width 0.13,
        SetPoint BOTTOM, "LogDialog", BOTTOM, 0.0, 0.03,

        ButtonText "LogOkButtonText",
	    Frame "TEXT" "LogOkButtonText" INHERITS "EscMenuButtonTextTemplate" {
		    Text "OK",
	    }        
    }

    // --- Log history
    Frame "BACKDROP" "LogAreaBackdrop" {
        Width 0.32,
        Height 0.295,
        SetPoint BOTTOM, "LogOkButton", TOP, 0.0, 0.01125,

        DecorateFileNames,
        BackdropTileBackground,
        BackdropBackground  "EscMenuEditBoxBackground",
        BackdropCornerFlags "UL|UR|BL|BR|T|L|B|R",
        BackdropCornerSize  0.0125,
        BackdropBackgroundSize  0.256,
        BackdropBackgroundInsets 0.005 0.005 0.005 0.005,
        BackdropEdgeFile  "EscMenuEditBoxBorder",
	    BackdropBlendAll,

        Frame "TEXTAREA" "LogArea" {
            Height 0.265,
            Width 0.30675,
            SetPoint LEFT, "LogAreaBackdrop", LEFT, 0.00725, -0.000625,

            DecorateFileNames,
            FrameFont "MasterFont", 0.011, "",
            TextAreaLineGap 0.0015,
            TextAreaMaxLines 128,
            TextAreaLineHeight 0.01,
            TextAreaInset 0.002,

            TextAreaScrollBar "LogAreaScrollBar",
            Frame "SCROLLBAR" "LogAreaScrollBar" INHERITS WITHCHILDREN "EscMenuScrollBarTemplate" {
            }
        }
    }
}

A fdf clone I made which also has a EditBox and made the button smaller and pushed it to the left.
MyLogDialog.jpg
Code:
// -- INCLUDE FILES ---------------------------------------------------------

IncludeFile "UI\FrameDef\UI\EscMenuTemplates.fdf",

// -- LOCAL TEMPLATES -------------------------------------------------------

// -- FRAMES ----------------------------------------------------------------

Frame "FRAME" "MyLogDialog" {
    SetPoint TOP, "ConsoleUI", BOTTOMLEFT, 0.4, 0.56,
    Width 0.384f,
    Height 0.432f,

    Frame "BACKDROP" "MyLogBackdrop" {
        SetAllPoints,
        DecorateFileNames,
        BackdropTileBackground,
        BackdropBackground  "EscMenuBackground",
        BackdropCornerFlags "UL|UR|BL|BR|T|L|B|R",
        BackdropCornerSize  0.048,
        BackdropBackgroundSize  0.128,
        BackdropBackgroundInsets 0.01 0.01 0.01 0.01,
        BackdropEdgeFile  "EscMenuBorder",
	    BackdropBlendAll,
    }

    Frame "TEXT" "MyLogTitle" INHERITS "EscMenuTitleTextTemplate" {
        SetPoint TOP, "MyLogDialog", TOP, 0.0, -0.03,
        UseActiveContext,
        FontJustificationH JUSTIFYCENTER,
        Text "String_MyLogDialogTitle",
    }


    // --- bottom controls
    Frame "GLUETEXTBUTTON" "MyLogOkButton" INHERITS WITHCHILDREN "EscMenuButtonTemplate" {
        Width 0.13,
        SetPoint BOTTOMLEFT, "MyLogDialog", BOTTOMLEFT, 0.03, 0.03,
        UseActiveContext,

        ButtonText "LogOkButtonText",
	    Frame "TEXT" "LogOkButtonText" INHERITS "EscMenuButtonTextTemplate" {
		    Text "OK",
	    }        
    }
    Frame "EDITBOX" "MyLogEditBox" INHERITS WITHCHILDREN "EscMenuEditBoxTemplate" {
        Width 0.13,
        Height 0.037,
        SetPoint BOTTOMRIGHT, "MyLogDialog", BOTTOMRIGHT, -0.03, 0.03,
        UseActiveContext,

        EditText "String_MyLogDialogText",
        EditTextFrame "MyLogEditBoxText",
        Frame "TEXT" "MyLogEditBoxText" {
            DecorateFileNames,
            FrameFont "MasterFont", 0.015, "",
            FontColor 1.0 1.0 1.0,
            FontFlags "IGNORENEWLINES|IGNORECOLORCODES",
        }
    }

    // --- Log history
    Frame "BACKDROP" "MyLogAreaBackdrop" {
        Width 0.32,
        Height 0.295,
        SetPoint TOP, "MyLogTitle", BOTTOM, 0.0, -0.01125,
        UseActiveContext,

        DecorateFileNames,
        BackdropTileBackground,
        BackdropBackground  "EscMenuEditBoxBackground",
        BackdropCornerFlags "UL|UR|BL|BR|T|L|B|R",
        BackdropCornerSize  0.0125,
        BackdropBackgroundSize  0.256,
        BackdropBackgroundInsets 0.005 0.005 0.005 0.005,
        BackdropEdgeFile  "EscMenuEditBoxBorder",
	    BackdropBlendAll,

        Frame "TEXTAREA" "MyLogArea" {
            Height 0.265,
            Width 0.30675,
            SetPoint LEFT, "MyLogAreaBackdrop", LEFT, 0.00725, -0.000625,
            UseActiveContext,

            DecorateFileNames,
            FrameFont "MasterFont", 0.011, "",
            TextAreaLineGap 0.0015,
            TextAreaMaxLines 9999,
            TextAreaLineHeight 0.01,
            TextAreaInset 0.002,

            TextAreaScrollBar "MyLogAreaScrollBar",
            Frame "SCROLLBAR" "MyLogAreaScrollBar" INHERITS WITHCHILDREN "EscMenuScrollBarTemplate" {
            }
        }
    }
}
 
Last edited:
Top