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

Correctly sort savefiles in the load menu

Added 2 more rows of hotkeys for the mad people :)
parent 889a0577
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -387,12 +387,161 @@ defineAction{
name = _t"Fifth Hotkey 12",
}
-- Alt + Ctrl + Hotkeys
defineAction{
default = { "sym:_1:true:false:true:false" },
type = "HOTKEY_SIX_1",
group = "hotkeys",
name = _t"Six Hotkey 1",
}
defineAction{
default = { "sym:_2:true:false:true:false" },
type = "HOTKEY_SIX_2",
group = "hotkeys",
name = _t"Six Hotkey 2",
}
defineAction{
default = { "sym:_3:true:false:true:false" },
type = "HOTKEY_SIX_3",
group = "hotkeys",
name = _t"Six Hotkey 3",
}
defineAction{
default = { "sym:_4:true:false:true:false" },
type = "HOTKEY_SIX_4",
group = "hotkeys",
name = _t"Six Hotkey 4",
}
defineAction{
default = { "sym:_5:true:false:true:false" },
type = "HOTKEY_SIX_5",
group = "hotkeys",
name = _t"Six Hotkey 5",
}
defineAction{
default = { "sym:_6:true:false:true:false" },
type = "HOTKEY_SIX_6",
group = "hotkeys",
name = _t"Six Hotkey 6",
}
defineAction{
default = { "sym:_7:true:false:true:false" },
type = "HOTKEY_SIX_7",
group = "hotkeys",
name = _t"Six Hotkey 7",
}
defineAction{
default = { "sym:_8:true:false:true:false" },
type = "HOTKEY_SIX_8",
group = "hotkeys",
name = _t"Six Hotkey 8",
}
defineAction{
default = { "sym:_9:true:false:true:false" },
type = "HOTKEY_SIX_9",
group = "hotkeys",
name = _t"Six Hotkey 9",
}
defineAction{
default = { "sym:_0:true:false:true:false" },
type = "HOTKEY_SIX_10",
group = "hotkeys",
name = _t"Six Hotkey 10",
}
defineAction{
default = { "sym:_MINUS:true:false:true:false" },
type = "HOTKEY_SIX_11",
group = "hotkeys",
name = _t"Six Hotkey 11",
}
defineAction{
default = { "sym:_EQUALS:true:false:true:false" },
type = "HOTKEY_SIX_12",
group = "hotkeys",
name = _t"Six Hotkey 12",
}
-- Alt + Shift + Ctrl + Hotkeys
defineAction{
default = { "sym:_1:true:true:true:false" },
type = "HOTKEY_SEVEN_1",
group = "hotkeys",
name = _t"Seven Hotkey 1",
}
defineAction{
default = { "sym:_2:true:true:true:false" },
type = "HOTKEY_SEVEN_2",
group = "hotkeys",
name = _t"Seven Hotkey 2",
}
defineAction{
default = { "sym:_3:true:true:true:false" },
type = "HOTKEY_SEVEN_3",
group = "hotkeys",
name = _t"Seven Hotkey 3",
}
defineAction{
default = { "sym:_4:true:true:true:false" },
type = "HOTKEY_SEVEN_4",
group = "hotkeys",
name = _t"Seven Hotkey 4",
}
defineAction{
default = { "sym:_5:true:true:true:false" },
type = "HOTKEY_SEVEN_5",
group = "hotkeys",
name = _t"Seven Hotkey 5",
}
defineAction{
default = { "sym:_6:true:true:true:false" },
type = "HOTKEY_SEVEN_6",
group = "hotkeys",
name = _t"Seven Hotkey 6",
}
defineAction{
default = { "sym:_7:true:true:true:false" },
type = "HOTKEY_SEVEN_7",
group = "hotkeys",
name = _t"Seven Hotkey 7",
}
defineAction{
default = { "sym:_8:true:true:true:false" },
type = "HOTKEY_SEVEN_8",
group = "hotkeys",
name = _t"Seven Hotkey 8",
}
defineAction{
default = { "sym:_9:true:true:true:false" },
type = "HOTKEY_SEVEN_9",
group = "hotkeys",
name = _t"Seven Hotkey 9",
}
defineAction{
default = { "sym:_0:true:true:true:false" },
type = "HOTKEY_SEVEN_10",
group = "hotkeys",
name = _t"Seven Hotkey 10",
}
defineAction{
default = { "sym:_MINUS:true:true:true:false" },
type = "HOTKEY_SEVEN_11",
group = "hotkeys",
name = _t"Seven Hotkey 11",
}
defineAction{
default = { "sym:_EQUALS:true:true:true:false" },
type = "HOTKEY_SEVEN_12",
group = "hotkeys",
name = _t"Seven Hotkey 12",
}
defineAction{
default = { "sym:_PAGEUP:false:false:false:false" },
type = "HOTKEY_PREV_PAGE",
group = "hotkeys",
name = _t"Previous Hotkey Page",
}
defineAction{
default = { "sym:_PAGEDOWN:false:false:false:false" },
type = "HOTKEY_NEXT_PAGE",
......
......@@ -120,7 +120,7 @@ function _M:resize(x, y, w, h, iw, ih)
end
end
local page_to_hotkey = {"", "SECOND_", "THIRD_", "FOURTH_", "FIFTH_"}
local page_to_hotkey = {"", "SECOND_", "THIRD_", "FOURTH_", "FIFTH_", "SIX_", "SEVEN_"}
local frames_colors = {
ok = {0.3, 0.6, 0.3},
......
......@@ -29,7 +29,7 @@ module(..., package.seeall, class.make)
_M.quickhotkeys = {}
_M.quickhotkeys_specifics = {}
_M.nb_hotkey_pages = 5
_M.nb_hotkey_pages = 7
function _M:init(t)
self.hotkey = self.hotkey or {}
......@@ -308,7 +308,7 @@ function _M:updateQuickHotkeys(actor)
end
end
local page_to_hotkey = {"", "SECOND_", "THIRD_", "FOURTH_", "FIFTH_"}
local page_to_hotkey = {"", "SECOND_", "THIRD_", "FOURTH_", "FIFTH_", "SIX_", "SEVEN_"}
function _M:bindAllHotkeys(key, fct)
for page = 1, self.nb_hotkey_pages do for x = 1, 12 do
......
......@@ -122,8 +122,8 @@ function _M:generateList()
save.screenshot = { save.screenshot:glTexture() }
save.screenshot.w, save.screenshot.h = w, h
end
table.sort(nodes, function(a, b) return (a.timestamp or 0) > (b.timestamp or 0) end)
table.insert(nodes, save)
table.sort(nodes, function(a, b) return (a.timestamp or 0) > (b.timestamp or 0) end)
found = true
end
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