GUICanvasWMLSchemaExample

From The Battle for Wesnoth Wiki

Description

This is an example of WML validation Schema File from the GSoC Proposal
Source with annotation:
Wiki: http://wiki.wesnoth.org/GUICanvasWML
Proposal: http://wiki.wesnoth.org/GSoC_2011_Sytyi

Schema

 [draw]
     [circle]	                !<0,-1>
          color=color 	        !("") 
          debug=string 	        !("")
          radius=f_unsigned 	!(0) 
          x=f_unsigned          !(0)
          y=f_unsigned          !(0) 
     [/circle]
     [image]		        !<0,-1>
          debug=string 	        !("")
          h=f_unsigned	        !(0)
          name=f_string 	!("")
          resize_mode=<scale>|<stretch>|<tile> 	!(<scale>)
          w=f_unsigned 		!(0)
          vertical_mirror=f_bool !(false) 
          x=f_unsigned		!(0)
          y=f_unsigned		!(0)
     [/image]
     [line]		        !<0,-1>
          color=color 	        !("") 
          debug=string 	        !("")
          thickness=unsigned 	!(0)
          x1=f_unsigned		!(0)
          x2=f_unsigned		!(0)
          y1=f_unsigned		!(0)
          y2=f_unsigned		!(0)
     [/line]
     [precommit]		!<0,1>
          [blur]		!<0,-1>
              depth=unsigned 	!(0) 
          [/blur]
     [/precommit]
     [rectangle]		!<0,-1>
          border_thickness=unsigned !(0)
          border_color=color 	!("") 
          debug=string 	        !("")
          fill_color=color 	!("") 
          h=f_unsigned 		!(0)
          w=f_unsigned 		!(0)
          x=f_unsigned 		!(0)
          y=f_unsigned 		!(0)
     [/rectangle]
     [text]			!<0,-1>
          debug=string 	        !("")
          font_size=unsigned    !M
          font_style=<normal>|<oblique>|<italic>	!("") 
          h=f_unsigned 		!(0)
          maximum_width=f_int 	!(-1)
          maximum_height=f_int  !(-1)
          text_alignment=<left>|<right>|<center> !(<left>)  	
          text_markup=f_bool    !(false)		
          text=f_tstring 	!("")
          w=f_unsigned		!(0)
          x=f_unsigned		!(0)
          y=f_unsigned 		!(0)
     [/text]
 [/draw]

This page was last edited on 7 April 2014, at 11:42.