diff CyborgMMO7.lua @ 61:adba10dfa908

Implemented the "Defaults" button for the key bindings options subpage.
author madcatzinc@35b17cf1-18cd-47ff-9ca3-31d6b526ef09
date Fri, 03 May 2013 23:24:58 +0000
parents a710bedc1ec4
children 8b8b0bade520
line wrap: on
line diff
--- a/CyborgMMO7.lua	Fri May 03 23:24:53 2013 +0000
+++ b/CyborgMMO7.lua	Fri May 03 23:24:58 2013 +0000
@@ -430,6 +430,15 @@
 	CyborgMMO_SetCyborgHeadButton(true)
 end
 
+function CyborgMMO_SetDefaultKeyBindings()
+	for mode=1,RAT7.MODES do
+		for button=1,RAT7.BUTTONS do
+			local k = (mode - 1) * RAT7.BUTTONS + button
+			CyborgMMO_ProfileKeyBindings[k] = CyborgMMO_DefaultKeyBindings[k]
+			CyborgMMO_SetBindingButtonText(string.format("CyborgMMO_OptionPageRebindMouseRow%XMode%d", button, mode))
+		end
+	end
+end
 
 function CyborgMMO_SetupModeCallbacks(modeNum)
 	local fn = function()