diff -r 1cf8b0c408c6 lib/irrlicht/include/IGUIContextMenu.h
--- a/lib/irrlicht/include/IGUIContextMenu.h	Tue Sep 02 14:43:04 2008 +0200
+++ b/lib/irrlicht/include/IGUIContextMenu.h	Tue Sep 02 15:00:06 2008 +0200
@@ -59,7 +59,7 @@
 		\return Returns the index of the new item */
 		virtual u32 addItem(const wchar_t* text, s32 commandId=-1, bool enabled=true,
 			bool hasSubMenu=false,
-			bool checked=false
+			bool checked=false, bool autoChecking=false
 			) = 0;
 		
 		//! Find a item which has the given CommandId starting from given index
@@ -134,6 +134,13 @@
 		\param idx: Zero based index of the menu item
 		\return Returns a pointer to the submenu of an item. */
 		virtual IGUIContextMenu* getSubMenu(u32 idx) const = 0;
+		
+		//! should the element change the checked status on clicking
+		virtual void setItemAutoChecking(u32 idx, bool autoChecking) = 0;
+
+		//! does the element change the checked status on clicking
+		virtual bool getItemAutoChecking(u32 idx) const = 0;
+		
 	};
 
 } // end namespace gui
diff -r 1cf8b0c408c6 lib/irrlicht/source/Irrlicht/CGUIContextMenu.cpp
--- a/lib/irrlicht/source/Irrlicht/CGUIContextMenu.cpp	Tue Sep 02 14:43:04 2008 +0200
+++ b/lib/irrlicht/source/Irrlicht/CGUIContextMenu.cpp	Tue Sep 02 15:00:06 2008 +0200
@@ -74,11 +74,12 @@
 
 
 //! Adds a menu item.
-u32 CGUIContextMenu::addItem(const wchar_t* text, s32 id, bool enabled, bool hasSubMenu, bool checked)
+u32 CGUIContextMenu::addItem(const wchar_t* text, s32 id, bool enabled, bool hasSubMenu, bool checked, bool autoChecking)
 {
 	SItem s;
 	s.Enabled = enabled;
 	s.Checked = checked;
+	s.AutoChecking = autoChecking;
 	s.Text = text;
 	s.IsSeparator = (text == 0);
 	s.SubMenu = 0;
@@ -140,7 +141,7 @@
 //! Adds a separator item to the menu
 void CGUIContextMenu::addSeparator()
 {
-	addItem(0, -1, true, false, false);
+	addItem(0, -1, true, false, false, false);
 }
 
 
@@ -162,6 +163,26 @@
 
 	Items[idx].Text = text;
 	recalculateSize();
+}
+
+
+//! should the element change the checked status on clicking
+void CGUIContextMenu::setItemAutoChecking(u32 idx, bool autoChecking)
+{
+	if ( idx >= Items.size())
+		return;
+
+	Items[idx].AutoChecking = autoChecking;
+}
+
+
+//! does the element change the checked status on clicking
+bool CGUIContextMenu::getItemAutoChecking(u32 idx) const
+{
+	if (idx >= Items.size())
+		return false;
+
+	return Items[idx].AutoChecking;
 }
 
 
@@ -395,6 +416,11 @@
 			Items[HighLighted].IsSeparator ||
 			Items[HighLighted].SubMenu)
 			return 2;
+
+		if ( Items[HighLighted].AutoChecking )
+		{
+			Items[HighLighted].Checked = Items[HighLighted].Checked ? false : true;
+		}
 
 		SEvent event;
 		event.EventType = EET_GUI_EVENT;
@@ -737,6 +763,10 @@
 			out->addInt(tmp.c_str(), Items[i].CommandId);
 			tmp = "Enabled"; tmp += i;
 			out->addBool(tmp.c_str(), Items[i].Enabled);
+			tmp = "Checked"; tmp += i;
+			out->addBool(tmp.c_str(), Items[i].Checked);
+			tmp = "AutoChecking"; tmp += i;
+			out->addBool(tmp.c_str(), Items[i].AutoChecking);
 		}
 	}
 }
@@ -766,9 +796,10 @@
 		core::stringc tmp;
 		core::stringw txt;
 		core::stringw txtID;
-		s32 commandid;
-		bool enabled;
-		bool checked;
+		s32 commandid = -1;
+		bool enabled=true;
+		bool checked=false;
+		bool autochecking=false;
 
 		tmp = "IsSeparator"; tmp += i;
 		if ( in->getAttributeAsBool(tmp.c_str()) )
@@ -790,8 +821,11 @@
 			tmp = "Checked"; tmp += i;
 			checked = in->getAttributeAsBool(tmp.c_str());
 
-			addItem(core::stringw(txt.c_str()).c_str(), commandid, enabled, false, checked);
-			Items[i].TextID = txtID;
+			tmp = "AutoChecking"; tmp += i;
+			autochecking = in->getAttributeAsBool(tmp.c_str());
+
+			s32 id = addItem(core::stringw(txt.c_str()).c_str(), commandid, enabled, false, checked, autochecking);
+			Items[id].TextID = txtID;
 		}
 	}
 
diff -r 1cf8b0c408c6 lib/irrlicht/source/Irrlicht/CGUIContextMenu.h
--- a/lib/irrlicht/source/Irrlicht/CGUIContextMenu.h	Tue Sep 02 14:43:04 2008 +0200
+++ b/lib/irrlicht/source/Irrlicht/CGUIContextMenu.h	Tue Sep 02 15:00:06 2008 +0200
@@ -42,7 +42,7 @@
 
 		//! Adds a menu item.
 		virtual u32 addItem(const wchar_t* text, s32 commandid,
-				bool enabled, bool hasSubMenu, bool checked);
+				bool enabled, bool hasSubMenu, bool checked, bool autoChecking);
 
 		//! Find a item which has the given CommandId starting from given index
 		//! return -1 if no such item was found
@@ -103,6 +103,12 @@
 		//! Sets the visible state of this element.
 		virtual void setVisible(bool visible);
 
+		//! should the element change the checked status on clicking
+		virtual void setItemAutoChecking(u32 idx, bool autoChecking);
+
+		//! does the element change the checked status on clicking
+		virtual bool getItemAutoChecking(u32 idx) const;
+
 		//! Returns command id of a menu item
 		virtual s32 getItemCommandId(u32 idx) const;
 
@@ -130,6 +136,7 @@
 			bool IsSeparator;
 			bool Enabled;
 			bool Checked;
+			bool AutoChecking;
 			core::dimension2d<s32> Dim;
 			s32 PosY;
 			CGUIContextMenu* SubMenu;
