Index: code/branches/gamestates2/data/gui/scripts/AudioMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/AudioMenu.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/AudioMenu.lua	(revision 6595)
@@ -2,5 +2,5 @@
 
 BasicGUI = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("AudioMenu")
 if _REQUIREDNAME == nil then
     AudioMenu = P
@@ -8,7 +8,4 @@
     _G[_REQUIREDNAME] = P
 end
-
-P.filename = "AudioMenu"
-P.layoutString = "AudioMenu.layout"
 
 function P:init()
@@ -43,5 +40,5 @@
     for k,v in pairs(themeList) do
         item = CEGUI.createListboxTextItem(v)
-        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
         CEGUI.toListbox(listboxwindow):addItem(item)
     end
Index: code/branches/gamestates2/data/gui/scripts/BasicGUI.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/BasicGUI.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/BasicGUI.lua	(revision 6595)
@@ -8,9 +8,14 @@
 end
 
+-- useless, even wrong? P is the class, not the object..
 P.overlay = nil
 
 -- constructor of the GUI
-function P:new (gui, fname)
-    local newElement = { window = gui, filename = fname, visible = false } or {}
+function P:new(_filename, _gui, _visible)
+    local newElement = {
+        filename = _filename,
+        gui = _gui,
+        visible = _visible or false
+    } or {}
     setmetatable(newElement, self) -- connects new element with class
     self.__index = self
@@ -18,10 +23,16 @@
 end
 
+-- Override this function if you need to
 function P:init()
--- this function is empty and intended for inheriting GUIs to use
+end
+
+-- Override this function if you need to
+-- But don't forget to stick to the naming convention ("GUI_" .. self.filename)
+function P:createInputState()
+    self.inputState = guiMgr:createInputState("GUI_" .. self.filename)
 end
 
 -- hide function for the GUI
-function P:hide ()
+function P:hide()
     self.window:hide()
     self.visible = false
@@ -29,11 +40,12 @@
 
 -- show function for the GUI
-function P:show ()
+function P:show()
     self.window:show()
     self.visible = true
 end
 
-function P:load ()
-    self.window = winMgr:loadWindowLayout(self.layoutString)
+function P:load()
+    self.window = winMgr:loadWindowLayout(self.filename .. ".layout")
+    self:createInputState()
     self:init()
     return self
Index: code/branches/gamestates2/data/gui/scripts/ControlsMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/ControlsMenu.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/ControlsMenu.lua	(revision 6595)
@@ -2,5 +2,5 @@
 
 BasicGUI = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("ControlsMenu")
 if _REQUIREDNAME == nil then
     ControlsMenu = P
@@ -8,7 +8,4 @@
     _G[_REQUIREDNAME] = P
 end
-
-P.filename = "ControlsMenu"
-P.layoutString = "ControlsMenu.layout"
 
 function P.ControlsMouseControlsButton_clicked(e)
Index: code/branches/gamestates2/data/gui/scripts/CreditsMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/CreditsMenu.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/CreditsMenu.lua	(revision 6595)
@@ -2,5 +2,5 @@
 
 BasicGUI = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("CreditsMenu")
 if _REQUIREDNAME == nil then
     CreditsMenu = P
@@ -8,7 +8,4 @@
     _G[_REQUIREDNAME] = P
 end
-
-P.filename = "CreditsMenu"
-P.layoutString = "CreditsMenu.layout"
 
 function P.CreditsBackButton_clicked(e)
Index: code/branches/gamestates2/data/gui/scripts/DecisionPopup.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/DecisionPopup.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/DecisionPopup.lua	(revision 6595)
@@ -2,15 +2,9 @@
 
 BasicGUI = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("DecisionPopup")
 if _REQUIREDNAME == nil then
     DecisionPopup = P
 else
     _G[_REQUIREDNAME] = P
-end
-
-P.filename = "DecisionPopup"
-P.layoutString = "DecisionPopup.layout"
-
-function P:init()
 end
 
Index: code/branches/gamestates2/data/gui/scripts/GameplayMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/GameplayMenu.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/GameplayMenu.lua	(revision 6595)
@@ -2,5 +2,5 @@
 
 BasicGUI = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("GameplayMenu")
 if _REQUIREDNAME == nil then
     GameplayMenu = P
@@ -8,7 +8,4 @@
     _G[_REQUIREDNAME] = P
 end
-
-P.filename = "GameplayMenu"
-P.layoutString = "GameplayMenu.layout"
 
 function P:init()
@@ -20,5 +17,5 @@
     for k,v in pairs(themeList) do
         item = CEGUI.createListboxTextItem(v)
-        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
         CEGUI.toCombobox(dropdown):addItem(item)
     end
Index: code/branches/gamestates2/data/gui/scripts/GraphicsMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/GraphicsMenu.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/GraphicsMenu.lua	(revision 6595)
@@ -2,5 +2,5 @@
 
 BasicGUI = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("GraphicsMenu")
 if _REQUIREDNAME == nil then
     GraphicsMenu = P
@@ -8,7 +8,4 @@
     _G[_REQUIREDNAME] = P
 end
-
-P.filename = "GraphicsMenu"
-P.layoutString = "GraphicsMenu.layout"
 
 function P:init()
@@ -62,5 +59,5 @@
     for k,v in pairs(resolutionList) do
         item = CEGUI.createListboxTextItem(v)
-        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
         CEGUI.toListbox(listboxwindow):addItem(item)
     end
Index: code/branches/gamestates2/data/gui/scripts/InGameMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/InGameMenu.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/InGameMenu.lua	(revision 6595)
@@ -2,5 +2,5 @@
 
 BasicGUI = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("InGameMenu")
 if _REQUIREDNAME == nil then
     InGameMenu = P
@@ -8,11 +8,4 @@
     _G[_REQUIREDNAME] = P
 end
-
-P.filename = "InGameMenu"
-P.layoutString = "InGameMenu.layout"
-
-function P:init()
-end
-
 
 -- events for ingamemenu
Index: code/branches/gamestates2/data/gui/scripts/InfoPopup.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/InfoPopup.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/InfoPopup.lua	(revision 6595)
@@ -2,5 +2,5 @@
 
 BasicGUI = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("InfoPopup")
 
 if _REQUIREDNAME == nil then
@@ -8,10 +8,4 @@
 else
     _G[_REQUIREDNAME] = P
-end
-
-P.filename = "InfoPopup"
-P.layoutString = "InfoPopup.layout"
-
-function P:init()
 end
 
@@ -26,5 +20,5 @@
 end
 
-function P.setText( text )
+function P.setText(text)
     winMgr:getWindow("orxonox/InfoPopup_text"):setText( text )
 end
@@ -42,5 +36,5 @@
 -- events for ingamemenu
 function P.close(e)
-    hideGUI("InfoPopup")
+    hideGUI(P.filename)
 end
 
Index: code/branches/gamestates2/data/gui/scripts/InitialiseGUI.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/InitialiseGUI.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/InitialiseGUI.lua	(revision 6595)
@@ -1,15 +1,31 @@
+winMgr   = CEGUI.WindowManager:getSingleton()
+guiMgr   = orxonox.GUIManager:getInstance()
+inputMgr = orxonox.InputManager:getInstance()
+
 local schemeMgr = CEGUI.SchemeManager:getSingleton()
-winMgr = CEGUI.WindowManager:getSingleton()
-local logger = CEGUI.Logger:getSingleton()
-local system = CEGUI.System:getSingleton()
-local cursor = CEGUI.MouseCursor:getSingleton()
-
-schemeMgr:loadScheme("TaharezLookSkin.scheme")
--- load scheme with our own images
+local system    = CEGUI.System:getSingleton()
+local cursor    = CEGUI.MouseCursor:getSingleton()
+
+-- Load all required skins
+schemeMgr:loadScheme("TaharezGreenLook.scheme")
+--schemeMgr:loadScheme("TaharezLook.scheme")
+--schemeMgr:loadScheme("WindowsLook.scheme")
+--schemeMgr:loadScheme("VanillaLook.scheme")
+--schemeMgr:loadScheme("SleekSpaceLook.scheme")
+
+-- Connect skin specific window types with our own window types
+-- By loading a different file (if there is) you can change the skin
+-- of the menus or the HUD independently
+schemeMgr:loadScheme("TaharezGreenMenuWidgets.scheme")
+menuImageSet = "TaharezGreenLook"
+schemeMgr:loadScheme("TaharezGreenHUDWidgets.scheme")
+hudImageSet = "TaharezGreenLook"
+
+-- Just a remaining test hack
 schemeMgr:loadScheme("OrxonoxGUIScheme.scheme")
 
-system:setDefaultMouseCursor("TaharezLook", "MouseArrow")
+system:setDefaultMouseCursor(menuImageSet, "MouseArrow")
 system:setDefaultFont("BlueHighway-12")
-system:setDefaultTooltip("TaharezLook/Tooltip")
+system:setDefaultTooltip("MenuWidgets/Tooltip")
 
 loadedGUIs = {}
@@ -51,6 +67,5 @@
 end
 
--- shows the specified and loads it if not loaded already
--- be sure to set the global variable "filename" before calling this function
+-- shows the specified GUI sheet and loads it if not loaded already
 function showGUI(filename, hidePrevious, bCursorVisible)
     if bCursorVisible == nil then
@@ -87,8 +102,10 @@
     else
         if nrOfActiveSheets == 0 then
-            orxonox.InputManager:getInstance():enterState("guiMouseOnly")
+            --orxonox.InputManager:getInstance():enterState("guiMouseOnly")
             orxonox.HumanController:pauseControl()
         end
     end
+    orxonox.InputManager:getInstance():enterState(currentGUI.inputState)
+
     nrOfActiveSheets = nrOfActiveSheets + 1
     table.insert(activeSheets, filename)
@@ -161,8 +178,9 @@
     bHidePrevious[filename] = nil
     if nrOfActiveSheets == 0 then
-        orxonox.InputManager:getInstance():leaveState("guiMouseOnly")
+        --orxonox.InputManager:getInstance():leaveState("guiMouseOnly")
         orxonox.HumanController:resumeControl()
         hideCursor()
     end
+    orxonox.InputManager:getInstance():leaveState(currentGUI.inputState)
 end
 
Index: code/branches/gamestates2/data/gui/scripts/KeyBindMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/KeyBindMenu.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/KeyBindMenu.lua	(revision 6595)
@@ -2,5 +2,5 @@
 
 BasicGUI = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("KeyBindMenu")
 
 if _REQUIREDNAME == nil then
@@ -9,7 +9,4 @@
     _G[_REQUIREDNAME] = P
 end
-
-P.filename = "KeyBindMenu"
-P.layoutString = "KeyBindMenu.layout"
 
 function P:init()
@@ -68,5 +65,5 @@
 
     --Calculate design parameters:
-    sampleWindow = winMgr:createWindow("TaharezLook/StaticText", "orxonox/KeyBindPane/SampleWindow")
+    sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/KeyBindPane/SampleWindow")
     sampleWindow:setText("SampleText")
 
@@ -125,5 +122,5 @@
     line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, lineHeight*(k-1))))
 
-    local command = winMgr:createWindow("TaharezLook/StaticText", "orxonox/KeyBindPane/Binding" .. k .. "/Command")
+    local command = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/KeyBindPane/Binding" .. k .. "/Command")
     command:setText(nameList[k])
     command:setSize(CEGUI.UVector2(CEGUI.UDim(0, commandWidth), CEGUI.UDim(1, 0)))
@@ -132,5 +129,5 @@
     offset = offset + commandWidth + spaceWidth
 
-    local plus = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Plus")
+    local plus = winMgr:createWindow("MenuWidgets/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Plus")
     plus:setSize(CEGUI.UVector2(CEGUI.UDim(0, addWidth), CEGUI.UDim(0.7, 0)))
     plus:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0)))
@@ -142,5 +139,5 @@
     local numButtons = orxonox.KeyBinderManager:getInstance():getCurrent():getNumberOfBindings(commandList[k]);
     for i=0,(numButtons-1) do
-        local button = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Button" .. i)
+        local button = winMgr:createWindow("MenuWidgets/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Button" .. i)
         local name = orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(commandList[k],i)
         name = P.KeyNameNiceifier(name)
@@ -156,5 +153,5 @@
         offset = offset + buttonWidth
 
-        local clear = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Clear" .. i)
+        local clear = winMgr:createWindow("MenuWidgets/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Clear" .. i)
         clear:setSize(CEGUI.UVector2(CEGUI.UDim(0, clearWidth), CEGUI.UDim(0.7, 0)))
         clear:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0)))
Index: code/branches/gamestates2/data/gui/scripts/MainMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/MainMenu.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/MainMenu.lua	(revision 6595)
@@ -2,5 +2,5 @@
 
 BasicGUI = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("MainMenu")
 if _REQUIREDNAME == nil then
     MainMenu = P
@@ -8,7 +8,4 @@
     _G[_REQUIREDNAME] = P
 end
-
-P.filename = "MainMenu"
-P.layoutString = "MainMenu.layout"
 
 -- events for MainMenu
Index: code/branches/gamestates2/data/gui/scripts/MouseControlsMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/MouseControlsMenu.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/MouseControlsMenu.lua	(revision 6595)
@@ -2,5 +2,5 @@
 
 BasicGUI = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("MouseControlsMenu")
 if _REQUIREDNAME == nil then
     MouseControlsMenu = P
@@ -8,7 +8,4 @@
     _G[_REQUIREDNAME] = P
 end
-
-P.filename = "MouseControlsMenu"
-P.layoutString = "MouseControlsMenu.layout"
 
 function P:init()
Index: code/branches/gamestates2/data/gui/scripts/MultiplayerMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/MultiplayerMenu.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/MultiplayerMenu.lua	(revision 6595)
@@ -2,5 +2,5 @@
 
 BasicGUI = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("MultiplayerMenu")
 if _REQUIREDNAME == nil then
     MultiplayerMenu = P
@@ -8,7 +8,4 @@
     _G[_REQUIREDNAME] = P
 end
-
-P.filename = "MultiplayerMenu"
-P.layoutString = "MultiplayerMenu.layout"
 
 function P:init()
@@ -30,5 +27,5 @@
     for k,v in pairs(levelList) do
         item = CEGUI.createListboxTextItem(v)
-        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
         CEGUI.toListbox(listbox):addItem(item)
         if v .. ".oxw" == preselect then
Index: code/branches/gamestates2/data/gui/scripts/MultiplayerOptionsMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/MultiplayerOptionsMenu.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/MultiplayerOptionsMenu.lua	(revision 6595)
@@ -2,5 +2,5 @@
 
 BasicGUI = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("MultiplayerOptionsMenu")
 if _REQUIREDNAME == nil then
     MultiplayerOptionsMenu = P
@@ -9,7 +9,4 @@
 end
 
-P.filename = "MultiplayerOptionsMenu"
-P.layoutString = "MultiplayerOptionsMenu.layout"
-
 function P.MultiplayerOptionsBackButton_clicked(e)
     hideGUI(P.filename)
Index: code/branches/gamestates2/data/gui/scripts/PickupInventory.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/PickupInventory.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/PickupInventory.lua	(revision 6595)
@@ -2,5 +2,5 @@
 
 BasicGUI = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("PickupInventory")
 if _REQUIREDNAME == nil then
     PickupInventory = P
@@ -8,7 +8,4 @@
     _G[_REQUIREDNAME] = P
 end
-
-P.filename = "PickupInventory"
-P.layoutString = "PickupInventory.layout"
 
 P.lastEquipmentCount_ = 0
Index: code/branches/gamestates2/data/gui/scripts/QuestGUI.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/QuestGUI.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/QuestGUI.lua	(revision 6595)
@@ -1,4 +1,4 @@
 gui = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("QuestGUI")
 if _REQUIREDNAME == nil then
     QuestGUI = P
@@ -6,7 +6,4 @@
     _G[_REQUIREDNAME] = P
 end
-
-P.filename = "QuestGUI"
-P.layoutString = "QuestGUI.layout"
 
 function P:show()
Index: code/branches/gamestates2/data/gui/scripts/SettingsMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/SettingsMenu.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/SettingsMenu.lua	(revision 6595)
@@ -2,5 +2,5 @@
 
 BasicGUI = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("SettingsMenu")
 if _REQUIREDNAME == nil then
     SettingsMenu = P
@@ -8,7 +8,4 @@
     _G[_REQUIREDNAME] = P
 end
-
-P.filename = "SettingsMenu"
-P.layoutString = "SettingsMenu.layout"
 
 function P.SettingsGameplayButton_clicked(e)
Index: code/branches/gamestates2/data/gui/scripts/SingleplayerMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/SingleplayerMenu.lua	(revision 6594)
+++ code/branches/gamestates2/data/gui/scripts/SingleplayerMenu.lua	(revision 6595)
@@ -2,5 +2,5 @@
 
 BasicGUI = require("BasicGUI")
-local P = BasicGUI:new() --inherit everything from the gui package
+local P = BasicGUI:new("SingleplayerMenu")
 if _REQUIREDNAME == nil then
     SingleplayerMenu = P
@@ -8,7 +8,4 @@
     _G[_REQUIREDNAME] = P
 end
-
-P.filename = "SingleplayerMenu"
-P.layoutString = "SingleplayerMenu.layout"
 
 function P:init()
@@ -30,5 +27,5 @@
     for k,v in pairs(levelList) do
         item = CEGUI.createListboxTextItem(v)
-        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
         CEGUI.toListbox(listbox):addItem(item)
         if v .. ".oxw" == preselect then
