Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial Menu modding reference
#1
This post will contain definitions for Menufile elements.
i will keep filling this as im going.
leaving a example here on top:
Code:
#include "ui/menudef.h"
{
    menuDef
    {
        name            "selection_menu"
        visible            0
        fullscreen        0
        rect            0 0 640 480
        border            0

        onOpen
        {

        }
        
        onESC
        {
            close selection_menu;
        }
        
        itemDef
        {
            style            WINDOW_STYLE_FILLED
            rect            160 80 512 512
            backcolor        0.5 0.5 0.5 0.5
            visible            1
        }

        itemDef
        {
            rect            0 0 100 20
            visible            1
            type            ITEM_TYPE_BUTTON
            style            WINDOW_STYLE_FILLED
            origin            100 100
            backcolor        1 0 0 .5
            
            action
            {
                play "mouse_click";
                scriptMenuResponse "cats";
                close selection_menu;
            }
            
            onFocus
            {
                play "mouse_over";
            }
        }
    }
}

Please provide useful information as a respose.
Also give feedback if any of the information is wrong.


name
Quote:The name of the menu or element.
If this is the name of the menu, it has to match the name of the file.

example:
name "selection_menu"

rect
Quote:Creates a rect which can be filled with new elements, rect probably stands for "rectangle"

example:
rect 120 50 250 250

explanation:
rect <x> <y> <height> <width>

style
Quote:Defines the style of the menu-item within a rect.
Can be the following:
WINDOW_STYLE_FILLED
WINDOW_STYLE_SHADER
WINDOW_STYLE_EMPTY

example:
style WINDOW_STYLE_FILLED

type (very unfinished)
Quote:Sets the type of the element.
Can be the following:
ITEM_TYPE_BUTTON
ITEM_TYPE_TEXT

example:
type ITEM_TYPE_BUTTON

origin
Quote:Defines where the element originates from.

example:
origin 100 100

explanation:
origin <x> <y>

visible
Quote:Defines wether the element should be visible or not.
Values can be 1 or 0.
default: 1

example:
visible 0

forecolor
Quote:Defines the foregroundcolor of a rect, provided the rect is of the type WINDOW_STYLE_FILLED

example:
forecolor 0.1 0.1 0.1 0.5

explanation:
forecolor <red> <green> <blue> <alpha>


backcolor
Quote:Defines the background color of a rect, provided the rect is of the type WINDOW_STYLE_FILLED

example:
backcolor 0.5 0.5 0.5 0.5

explanation:
backcolor <red> <green> <blue> <alpha>

background
Quote:Sets a background for a rect provided the rect is of the type WINDOW_STYLE_SHADER
the value can be any valid material.

example:
background "hud_selection"

border
Quote:Defines wether a rect should have a border or not.
Values can be 1 or 0.
default: 0

example:
border 1

text
Quote:Sets a text for a ITEM_TYPE_TEXT element.

example:
text "Cat"

textscale
Quote:Sets the textscale for a ITEM_TYPE_TEXT element.
default: 1

example:
textscale 1.2

textfont (very unfinished)
Quote:Sets the font for a ITEM_TYPE_TEXT element.

values:
UI_FONT_NORMAL

example:
textfont UI_FONT_NORMAL

textaligny
Quote:Offset for the text on the y-axis.

default: 0

example:
textaligny 5

Tutorial by fixz - www.modbyte.se
Tutorial has been taken offline, i've no idea why but I saved a copy.

Good luck Smile
[Image: MaEIQ.png]
Reply

#2
Very usefull! Thanks OMA
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#3
Very nice Smile

Thank you.
Sorry for my English, I'm French...
Reply

#4
nice, thank you!
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Question Help Admin menu koren30 4 5,110 10-07-2013, 20:17
Last Post: Yamato
  [Tutorial] How-To, Mod menu picture-REVISED/no iwifix needed rotceh_dnih 52 31,996 09-28-2013, 02:08
Last Post: Monkey Arms
  [Request] Request for Assistance with Modding COD: BO using Mod Tools one1lion 9 6,642 09-17-2013, 21:04
Last Post: one1lion
  Help How do I open the admin menu for GeKKos QS Mod? conorr 1 3,070 08-15-2013, 13:52
Last Post: Yamato
  Help Modding Zombie Mode DarthKiller 3 4,867 07-09-2013, 21:08
Last Post: Nekochan
  Trying to compile a modified menu DidUknowiPwn 7 5,664 07-05-2013, 21:55
Last Post: DidUknowiPwn
  Preview Admin / Mod Menu Hologramm 5 6,893 05-29-2013, 00:35
Last Post: sleepunknot
  Map Menu in Black Ops 1 EliTeEishiii 2 3,036 04-21-2013, 18:54
Last Post: Nekochan
  Menu base EliTeEishiii 1 2,863 04-17-2013, 16:10
Last Post: Nekochan
  Why there are no modding for Frostbite Engine RaZ 2 3,314 03-30-2013, 17:14
Last Post: Pozzuh

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.