mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-12 17:32:21 -04:00
Add settings (#85)
* Add settings * Fix luacheck * Fix unupdatable sorting fields values (settings) * Better settings names * Better sort settings behaviour * Rework set_setting() * Rework settings storage * Better get sorting filters (inbox/outbox) * Fix reseting/saving settings
This commit is contained in:
parent
a8632255b3
commit
720029a73e
16 changed files with 322 additions and 103 deletions
13
ui/options.lua
Normal file
13
ui/options.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
-- helper function for tabbed options
|
||||
|
||||
function mail.show_options(playername)
|
||||
local index = mail.selected_idxs.optionstab[playername] or 1
|
||||
if not mail.selected_idxs.optionstab[playername] then
|
||||
mail.selected_idxs.optionstab[playername] = 1
|
||||
end
|
||||
if index == 1 then
|
||||
mail.show_settings(playername)
|
||||
elseif index == 2 then
|
||||
mail.show_about(playername)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue