//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//controltype_switchbutton_menu_context
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void controltype_switchbutton_menu_context(Menu *m, control *c)
{
	//Get the details
	controltype_button_details *details = (controltype_button_details *) c->controldetails;

	//Show the menu
	menu_controloptions(m, c, CONTROLTYPE_TWOSTATEBUTTON_AGENTCOUNT, details->agents, "", controltype_switchbutton_agentnames, controltype_switchbutton_agenttypes);

	make_menuitem_nop(m, "");
	Menu* submenu = make_menu("Text Settings", c);
	make_menuitem_bol(submenu, "Left", config_getfull_control_setcontrolprop_c(c, "HAlign", "Left"), details->halign == 1);
	make_menuitem_bol(submenu, "Center", config_getfull_control_setcontrolprop_c(c, "HAlign", "Center"), details->halign == 0);
	make_menuitem_bol(submenu, "Right", config_getfull_control_setcontrolprop_c(c, "HAlign", "Right"), details->halign == 2);
	make_menuitem_nop(submenu, "");
	make_menuitem_bol(submenu, "Top, Word Wrapped", config_getfull_control_setcontrolprop_c(c, "VAlign", "TopWrap"), details->valign == 3);
	make_menuitem_bol(submenu, "Top", config_getfull_control_setcontrolprop_c(c, "VAlign", "Top"), details->valign == 1);
	make_menuitem_bol(submenu, "Center", config_getfull_control_setcontrolprop_c(c, "VAlign", "Center"), details->valign == 0);
	make_menuitem_bol(submenu, "Bottom", config_getfull_control_setcontrolprop_c(c, "VAlign", "Bottom"), details->valign == 2);
	make_submenu_item(m, "Text Settings", submenu);

}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//controltype_label_menu_context
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void controltype_label_menu_context(Menu *m, control *c)
{
	//Variables
	Menu *submenu;

	//Get the details
	controltype_label_details *details = (controltype_label_details *) c->controldetails;

	//Show the menu
	menu_controloptions(m, c, CONTROLTYPE_LABEL_AGENT_COUNT, details->agents, "", controltype_label_agentnames, controltype_label_agenttypes);

	make_menuitem_nop(m, "");

	submenu = make_menu("Text Settings", c);
	make_menuitem_bol(submenu, "Left", config_getfull_control_setcontrolprop_c(c, "HAlign", "Left"), details->halign == 1);
	make_menuitem_bol(submenu, "Center", config_getfull_control_setcontrolprop_c(c, "HAlign", "Center"), details->halign == 0);
	make_menuitem_bol(submenu, "Right", config_getfull_control_setcontrolprop_c(c, "HAlign", "Right"), details->halign == 2);

	make_menuitem_nop(submenu, "");

	make_menuitem_bol(submenu, "Top, Word Wrapped", config_getfull_control_setcontrolprop_c(c, "VAlign", "TopWrap"), details->valign == 3);
	make_menuitem_bol(submenu, "Top", config_getfull_control_setcontrolprop_c(c, "VAlign", "Top"), details->valign == 1);
	make_menuitem_bol(submenu, "Center", config_getfull_control_setcontrolprop_c(c, "VAlign", "Center"), details->valign == 0);
	make_menuitem_bol(submenu, "Bottom", config_getfull_control_setcontrolprop_c(c, "VAlign", "Bottom"), details->valign == 2);

	make_submenu_item(m, "Text Settings", submenu);

	if (details->is_frame)
	{
		bool temp;
		temp = !details->has_titlebar;
		make_menuitem_bol(m, "Has Title Bar", config_getfull_control_setcontrolprop_b(c, "HasTitleBar", &temp), false == temp);
		temp = !details->is_locked;
		make_menuitem_bol(m, "Lock Children", config_getfull_control_setcontrolprop_b(c, "IsLocked", &temp), false == temp);
		make_menuitem_nop(m, NULL);
		controltype_frame_insertpluginmenu(c, m);
	}
}