Making my own menu on the server


(NIRO) #1

I changed a existing menu from some clan.
It is working like clock, and running online.
(check it at: 84.244.130.38:27960) ETPRO server, Press ESC and see my button, press it and see for yourself

I do want to add that i changed like EVERYTHING.

But my idea was to make a nem wenu from nothing. (or maby)

I want to ask you guys: is there a existing menu file that i can use to begin.
one where there is nothing in it yet, just #define’s about size, color, border, etc.
(an empty menu)

And do you guys know good tuto’s for this?
and are those .menu files like c++, any programs i need???

p.s.

  • i am making a menu for Wolfensein Enemy Territory

Thanx,
Greetz,

NIRO


(Ragnar_40k) #2

Unzip pak0.pk3 and take a look into the ui subfolder.

Menu files are plain text. All coordinates are for a virtual 640x480 resolution. Color values are RGBA-style with values in the range [0, 1]. Just search a menu which is similar to the one you want and take it as template. The rest is just normal .pk3 creating (like for maps, voice chat packs etc.).


(Jaquboss) #3

also remmember that lot of things are declared in menudef.h it is c file but you can edit it with text editor as normal script
NOTE: Models in main menu are working only in 2.60 other clients are crashed


(NIRO) #4

Thank you for the posts, BUT.

i already said that i made one that is done and working (even online on our clan servers).
I want a .menu file that is totaly blanc.
Maby there is an .menu file in de UI directory containing not so many info so that i can delete all info and use that as the blanc menu.

Thanx anyways.


(Jaquboss) #5

ok here you are
i assume that blanc means blank and not Mt Blanc :slight_smile:

#include "ui/menudef.h"

// Defines //

#define WINDOW_X		10
#define WINDOW_Y		10
#define WINDOW_WIDTH	620
#define WINDOW_HEIGHT	430
#define GROUP_NAME		"grpWindowBlank"

// Macros //

#include "ui/menumacros.h"

// Customise Game Menu //
	
menuDef {
	name		"yourmenuname"
	visible	0
	fullscreen	0
	rect		WINDOW_X WINDOW_Y WINDOW_WIDTH WINDOW_HEIGHT
	style		WINDOW_STYLE_FILLED
	
	onESC {
		close yourmenuname;
#ifdef FUI				// FUI is defined while in main menu
		open main
#else
		open ingame_main
#endif // FUI
	}

// Window //

	WINDOW( "WRITE TEXT HERE", 94 )

// Subwindows //

// shared
#define SUBWINDOW_X		6
#define SUBWINDOW_WIDTH		600

// subwindow 1
#define SUBWINDOW1_Y		30
#define SUBWINDOW1_HEIGHT	370 
		
	SUBWINDOW( (SUBWINDOW_X), (SUBWINDOW1_Y), (SUBWINDOW_WIDTH), (SUBWINDOW1_HEIGHT), "EXAMPLE" ) // you may add content here, , note you may also delelete this line if you dont wish any subwindow

// 'BACK' button //

#ifdef FUI
	BUTTON( 6, WINDOW_HEIGHT-24, SUBWINDOW_WIDTH, 18, "BACK", .3, 14, close yourmenuname ; open main )
#else
	BUTTON( 6, WINDOW_HEIGHT-24, SUBWINDOW_WIDTH, 18, "BACK", .3, 14, close yourmenuname ; open ingame_main )
#endif // FUI

}


(NIRO) #6

THANX A LOT FOR THAT.

Yep, blank i mean (sorry i am from Holland, how doe you like me english?)

Its a great start of learning my wy into the programming.
I see that with this script i can even make the button in the MAIN menu and also in the INGAME_MAIN.

Next questions:

  • What program is this being made with? is it like c++ or java?
    Â Â Â Â I am editing it with ultra edit or simple text editor.
    Â Â Â Â That wy a can learn about all the commands that can be used. (like what the hell $evalfloat means in the rect command)

  • Do you know some good learning methodes/tuto’s (I really like this, maby i wanna work in something like this)


(Jaquboss) #7

http://tramdesign.planetwolfenstein.gamespy.com/tutorials/tut_menuscript.html