Skip to content
Snippets Groups Projects
Commit bd0ef841 authored by DarkGod's avatar DarkGod
Browse files

Added new UI options to control the fullscreen stun & confusion notifications

parent 8c4190d9
No related branches found
No related tags found
No related merge requests found
......@@ -434,7 +434,9 @@ function _M:updateMainShader()
end
-- Blur shader
if self:attr("confused") and self.confused >= 1 then pf.blur.shad:uniBlur(2) effects[pf.blur.shad] = true
if config.settings.tome.fullscreen_confusion then
if self:attr("confused") and self.confused >= 1 then pf.blur.shad:uniBlur(2) effects[pf.blur.shad] = true
end
end
-- Moving Blur shader
......@@ -448,8 +450,10 @@ function _M:updateMainShader()
end
-- Wobbling shader
if self:attr("stunned") and self.stunned >= 1 then pf.wobbling.shad:uniWobbling(1) effects[pf.wobbling.shad] = true
elseif self:attr("dazed") and self.dazed >= 1 then pf.wobbling.shad:uniWobbling(0.7) effects[pf.wobbling.shad] = true
if config.settings.tome.fullscreen_stun then
if self:attr("stunned") and self.stunned >= 1 then pf.wobbling.shad:uniWobbling(1) effects[pf.wobbling.shad] = true
elseif self:attr("dazed") and self.dazed >= 1 then pf.wobbling.shad:uniWobbling(0.7) effects[pf.wobbling.shad] = true
end
end
game.posteffects_use = table.keys(effects)
......
......@@ -275,6 +275,26 @@ function _M:generateListUi()
self.c_list:drawItem(item)
end,}
local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"If disabled you will not get a fullscreen notification of stun/daze effects. Beware.#WHITE#"}
list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Fullscreen stun/daze notification.#WHITE##{normal}#", status=function(item)
return tostring(config.settings.tome.fullscreen_stun and "enabled" or "disabled")
end, fct=function(item)
config.settings.tome.fullscreen_stun = not config.settings.tome.fullscreen_stun
game:saveSettings("tome.fullscreen_stun", ("tome.fullscreen_stun = %s\n"):format(tostring(config.settings.tome.fullscreen_stun)))
self.c_list:drawItem(item)
if game.player.updateMainShader then game.player:updateMainShader() end
end,}
local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"If disabled you will not get a fullscreen notification of confusion effects. Beware.#WHITE#"}
list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Fullscreen confusion notification.#WHITE##{normal}#", status=function(item)
return tostring(config.settings.tome.fullscreen_confusion and "enabled" or "disabled")
end, fct=function(item)
config.settings.tome.fullscreen_confusion = not config.settings.tome.fullscreen_confusion
game:saveSettings("tome.fullscreen_confusion", ("tome.fullscreen_confusion = %s\n"):format(tostring(config.settings.tome.fullscreen_confusion)))
self.c_list:drawItem(item)
if game.player.updateMainShader then game.player:updateMainShader() end
end,}
self.list = list
end
......
......@@ -59,6 +59,8 @@ if type(config.settings.tome.immediate_melee_keys) == "nil" then config.settings
if type(config.settings.tome.immediate_melee_keys_auto) == "nil" then config.settings.tome.immediate_melee_keys_auto = true end
if type(config.settings.tome.allow_online_events) == "nil" then config.settings.tome.allow_online_events = true end
if type(config.settings.tome.small_frame_side) == "nil" then config.settings.tome.small_frame_side = true end
if type(config.settings.tome.fullscreen_stun) == "nil" then config.settings.tome.fullscreen_stun = true end
if type(config.settings.tome.fullscreen_confusion) == "nil" then config.settings.tome.fullscreen_confusion = true end
if not config.settings.tome.fonts then config.settings.tome.fonts = {type="fantasy", size="normal"} end
if not config.settings.tome.ui_theme2 then config.settings.tome.ui_theme2 = "metal" end
if not config.settings.tome.uiset_mode then config.settings.tome.uiset_mode = "Minimalist" end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment