Jump to content

JKUIML


Recommended Posts

Hey, what do you think about JK menus markup lang?

 

For example:

<menuDef name="quitMenu" visible="0" fullScreen="1" rect="0 0 640 480" focusColor="1 1 1 1" descX="320" descY="426" onESC="play('sound/interface/esc.wav'); close(quitMenu); open(mainMenu); setcvar(r_fullscreen, 0)">
	<itm forecolor="0 0 1 1"></itm>
	<itm visible="0"></itm>
</menuDef>

<template name="itm">
	<itemDef name="really_background" group="none" style="WINDOW_STYLE_SHADER" rect="156 154 320 240" background="gfx/menus/main_centerblue" forecolor="1 1 1 1" visible="1" decoration />
</template>

Result: 

 

{
	menuDef
	{
		name				quitMenu
		visible				0
		fullscreen			1
		rect				0 0 640 480
		focuscolor			1 1 1 1
		descx				320
		descy				426
		onesc
		{				
			play			'sound/interface/esc.wav' ;
			close			quitMenu ;
			open			mainMenu ;
			setcvar			r_fullscreen	0 ;
		}

		itemdef
		{
			name				really_background
			group				none
			style				WINDOW_STYLE_SHADER
			rect				156 154 320 240
			background			gfx/menus/main_centerblue
			forecolor			0 0 1 1
			visible				1
			decoration			
		}

		itemdef
		{
			name				really_background
			group				none
			style				WINDOW_STYLE_SHADER
			rect				156 154 320 240
			background			gfx/menus/main_centerblue
			forecolor			1 1 1 1
			visible				0
			decoration			
		}
	}
}

 

 

Link to comment

I'll be blunt. Simply translating Raven's menu format to XML is pointless. You need to add more semantics/meaning to the tags, e.g. you need tags such as <textbox> <image> <listbox> instead of everything being an "ItemDef" which is confusing.

Good idea, thanks :)

I will add basic templates.

And some other things, such as hex / named / hsl colors and default values.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...