menu


(Chester) #1

I realise this is not quite related, however.

I am making a menu and want to have a window with the console running inside it.

Does anyone know if there is some command, like FEEDER_CONSOLE…??? That no one knows about or no one cares about? Nothing about it on Trams website: http://tramdesign.planetwolfenstein.gamespy.com/tutorials/tut_menuscript.html#s2

And also, if I do an ‘EXEC “consolecommand”’ but want to add the PLAYER_FEEDER_LIST name onto the end of the EXEC command…anyone know? Or do I have to use ‘UiScript’ for that? Obvious what I’m trying to do…


(dutchmeat) #2

I think the console is made by the engine, so it can’t be modified, or replicated.


(Elite) #3

But you can display the contents in another window… it’s a bit complicated with most approaches… i’ll try to help you out more after I get off work tonight, unless someone else does.


(Chester) #4

Well, thats what I want to do, display the contents into another window. So any help would be greatly appreciated. :slight_smile:


(Chester) #5

I was trying to do something like this. I don’t know if this is the right way of approaching the issue, but I did find out quite quickly that FEEDER_CONSOLE doesn’t exist. :lol:

	itemDef {
		name			"liveconsole"
		group			GROUP_NAME
		rect			6 6 196 232
		type			ITEM_TYPE_LISTBOX
		textfont		UI_FONT_COURBD_21
		textscale		.2
		textaligny		-3
		forecolor		.6 .6 .6 1
		outlinecolor	.5 .5 .5 .4
		border			WINDOW_BORDER_FULL
		bordercolor		.1 .1 .1 .5
		feeder			FEEDER_CONSOLE_LIST
		elementtype		LISTBOX_TEXT
		elementwidth	200
		elementheight	12
		columns			1 0 200 33
		visible			1
	}

And in the menu.c file, could I create something like:

	} 	} else if (feederID == FEEDER_CONSOLE_LIST) {
		if (uiInfo.uiDC.realTime > uiInfo.consoleRefresh) {
			uiInfo.consoleRefresh = uiInfo.uiDC.realTime + 3000;
			UI_CONSOLE_COMMAND();
		}


(Elite) #6

You can just wherever trap_SendServerCommand is called send the same text sent to where you want it displayed. A pointer to a char is always sent with it, so this shouldn’t be a problem. Probably the best place would be to just edit the trap_SendServerCommand function. ANother option is to track the G_LogPrintf function. either one should be a good starting point.


(Chester) #7

Alright, thank you. Always good to start from somewhere. :slight_smile:


(Elite) #8

Idk if you can place it in a menu, but you can just create a new window, similar to the stats/topshots/etc windows or however you want to display it. Perhaps even code a new window type yourself if that’s what you need and you can’t come across anything else in the source allready available.

ANyhow, not sure what else you need, but if you do just post again or w/e. Hopefully though you allready got a starting idea on where the text may come from to send to your new console/window thing.


(Pytox) #9

I got some questions about the menu,
where are you able to edit the buttons in the main menu and how
can you turn them in to text or an image instead of that square button?


(kamikazee) #10

All of it sits in ui/main.menu.


(Chester) #11

Alright. So I found this inside the ui_main.c file and was wondering if it would work to my purpose?


case UI_CONSOLE_COMMAND:
	return UI_ConsoleCommand(arg0);

NVM…