Commits

Jason McKesson committed ae3a47d

Added separate file for user-defined styles.

Comments (0)

Files changed (1)

modules/Styles.lua

 
 local default_style = "pointer_c"
 
+local status, userStyles = pcall(require, "UserStyles")
+
+if(status and type(userStyles) == "table") then
+	for styleName, style in pairs(userStyles) do
+		if(style_registry[styleName] ~= nil) then
+			print("User-defined style name " .. styleName .. " conflicts with an existing style.")
+		else
+			style_registry[styleName] = style
+		end
+	end
+end
+
 local function GetStyleList()
 	--Make sure the default is first.
 	local list = {default_style}