###############################################################
#CGUI 
#Currently has these:
#-Buttons
#-Checkboxes
#-Radio Buttons
###############################################################
from xml.dom import minidom

layouts = ["test", "bg_gen"]

checkboxes = []
radiobuttons = []
#radioubuttongroups = {} - doesnt fucking work

for i in layouts:
	mapfile = minidom.parse(System.AppPath + "Media/" + i +".layout")

	#load all layers
	for Widget in mapfile.getElementsByTagName('Widget'):

		if Widget.attributes['type'].value == "Button":
			CGUI.WidgetSetEvent(str(Widget.attributes['name'].value), 8)

			#creating variables for checkboxes
			if Widget.attributes['skin'].value == "CheckBox":
				exec str(Widget.attributes['name'].value) + "=0"
				checkboxes.append(str(Widget.attributes['name'].value))

			if Widget.attributes['skin'].value == "RadioButton":
				exec str(Widget.attributes['name'].value) + " =0"
				radiobuttons.append(str(Widget.attributes['name'].value))