Commit 85df3299e9eefd3f976662f7ed5b1e4abbefc4fa

Authored by DarkGod
1 parent 889a0577

Correctly sort savefiles in the load menu

Added 2 more rows of hotkeys for the mad people :)
... ... @@ -387,12 +387,161 @@ defineAction{
387 387 name = _t"Fifth Hotkey 12",
388 388 }
389 389
  390 +-- Alt + Ctrl + Hotkeys
  391 +defineAction{
  392 + default = { "sym:_1:true:false:true:false" },
  393 + type = "HOTKEY_SIX_1",
  394 + group = "hotkeys",
  395 + name = _t"Six Hotkey 1",
  396 +}
  397 +defineAction{
  398 + default = { "sym:_2:true:false:true:false" },
  399 + type = "HOTKEY_SIX_2",
  400 + group = "hotkeys",
  401 + name = _t"Six Hotkey 2",
  402 +}
  403 +defineAction{
  404 + default = { "sym:_3:true:false:true:false" },
  405 + type = "HOTKEY_SIX_3",
  406 + group = "hotkeys",
  407 + name = _t"Six Hotkey 3",
  408 +}
  409 +defineAction{
  410 + default = { "sym:_4:true:false:true:false" },
  411 + type = "HOTKEY_SIX_4",
  412 + group = "hotkeys",
  413 + name = _t"Six Hotkey 4",
  414 +}
  415 +defineAction{
  416 + default = { "sym:_5:true:false:true:false" },
  417 + type = "HOTKEY_SIX_5",
  418 + group = "hotkeys",
  419 + name = _t"Six Hotkey 5",
  420 +}
  421 +defineAction{
  422 + default = { "sym:_6:true:false:true:false" },
  423 + type = "HOTKEY_SIX_6",
  424 + group = "hotkeys",
  425 + name = _t"Six Hotkey 6",
  426 +}
  427 +defineAction{
  428 + default = { "sym:_7:true:false:true:false" },
  429 + type = "HOTKEY_SIX_7",
  430 + group = "hotkeys",
  431 + name = _t"Six Hotkey 7",
  432 +}
  433 +defineAction{
  434 + default = { "sym:_8:true:false:true:false" },
  435 + type = "HOTKEY_SIX_8",
  436 + group = "hotkeys",
  437 + name = _t"Six Hotkey 8",
  438 +}
  439 +defineAction{
  440 + default = { "sym:_9:true:false:true:false" },
  441 + type = "HOTKEY_SIX_9",
  442 + group = "hotkeys",
  443 + name = _t"Six Hotkey 9",
  444 +}
  445 +defineAction{
  446 + default = { "sym:_0:true:false:true:false" },
  447 + type = "HOTKEY_SIX_10",
  448 + group = "hotkeys",
  449 + name = _t"Six Hotkey 10",
  450 +}
  451 +defineAction{
  452 + default = { "sym:_MINUS:true:false:true:false" },
  453 + type = "HOTKEY_SIX_11",
  454 + group = "hotkeys",
  455 + name = _t"Six Hotkey 11",
  456 +}
  457 +defineAction{
  458 + default = { "sym:_EQUALS:true:false:true:false" },
  459 + type = "HOTKEY_SIX_12",
  460 + group = "hotkeys",
  461 + name = _t"Six Hotkey 12",
  462 +}
  463 +
  464 +-- Alt + Shift + Ctrl + Hotkeys
  465 +defineAction{
  466 + default = { "sym:_1:true:true:true:false" },
  467 + type = "HOTKEY_SEVEN_1",
  468 + group = "hotkeys",
  469 + name = _t"Seven Hotkey 1",
  470 +}
  471 +defineAction{
  472 + default = { "sym:_2:true:true:true:false" },
  473 + type = "HOTKEY_SEVEN_2",
  474 + group = "hotkeys",
  475 + name = _t"Seven Hotkey 2",
  476 +}
  477 +defineAction{
  478 + default = { "sym:_3:true:true:true:false" },
  479 + type = "HOTKEY_SEVEN_3",
  480 + group = "hotkeys",
  481 + name = _t"Seven Hotkey 3",
  482 +}
  483 +defineAction{
  484 + default = { "sym:_4:true:true:true:false" },
  485 + type = "HOTKEY_SEVEN_4",
  486 + group = "hotkeys",
  487 + name = _t"Seven Hotkey 4",
  488 +}
  489 +defineAction{
  490 + default = { "sym:_5:true:true:true:false" },
  491 + type = "HOTKEY_SEVEN_5",
  492 + group = "hotkeys",
  493 + name = _t"Seven Hotkey 5",
  494 +}
  495 +defineAction{
  496 + default = { "sym:_6:true:true:true:false" },
  497 + type = "HOTKEY_SEVEN_6",
  498 + group = "hotkeys",
  499 + name = _t"Seven Hotkey 6",
  500 +}
  501 +defineAction{
  502 + default = { "sym:_7:true:true:true:false" },
  503 + type = "HOTKEY_SEVEN_7",
  504 + group = "hotkeys",
  505 + name = _t"Seven Hotkey 7",
  506 +}
  507 +defineAction{
  508 + default = { "sym:_8:true:true:true:false" },
  509 + type = "HOTKEY_SEVEN_8",
  510 + group = "hotkeys",
  511 + name = _t"Seven Hotkey 8",
  512 +}
  513 +defineAction{
  514 + default = { "sym:_9:true:true:true:false" },
  515 + type = "HOTKEY_SEVEN_9",
  516 + group = "hotkeys",
  517 + name = _t"Seven Hotkey 9",
  518 +}
  519 +defineAction{
  520 + default = { "sym:_0:true:true:true:false" },
  521 + type = "HOTKEY_SEVEN_10",
  522 + group = "hotkeys",
  523 + name = _t"Seven Hotkey 10",
  524 +}
  525 +defineAction{
  526 + default = { "sym:_MINUS:true:true:true:false" },
  527 + type = "HOTKEY_SEVEN_11",
  528 + group = "hotkeys",
  529 + name = _t"Seven Hotkey 11",
  530 +}
  531 +defineAction{
  532 + default = { "sym:_EQUALS:true:true:true:false" },
  533 + type = "HOTKEY_SEVEN_12",
  534 + group = "hotkeys",
  535 + name = _t"Seven Hotkey 12",
  536 +}
  537 +
390 538 defineAction{
391 539 default = { "sym:_PAGEUP:false:false:false:false" },
392 540 type = "HOTKEY_PREV_PAGE",
393 541 group = "hotkeys",
394 542 name = _t"Previous Hotkey Page",
395 543 }
  544 +
396 545 defineAction{
397 546 default = { "sym:_PAGEDOWN:false:false:false:false" },
398 547 type = "HOTKEY_NEXT_PAGE",
... ...
... ... @@ -120,7 +120,7 @@ function _M:resize(x, y, w, h, iw, ih)
120 120 end
121 121 end
122 122
123   -local page_to_hotkey = {"", "SECOND_", "THIRD_", "FOURTH_", "FIFTH_"}
  123 +local page_to_hotkey = {"", "SECOND_", "THIRD_", "FOURTH_", "FIFTH_", "SIX_", "SEVEN_"}
124 124
125 125 local frames_colors = {
126 126 ok = {0.3, 0.6, 0.3},
... ...
... ... @@ -29,7 +29,7 @@ module(..., package.seeall, class.make)
29 29 _M.quickhotkeys = {}
30 30 _M.quickhotkeys_specifics = {}
31 31
32   -_M.nb_hotkey_pages = 5
  32 +_M.nb_hotkey_pages = 7
33 33
34 34 function _M:init(t)
35 35 self.hotkey = self.hotkey or {}
... ... @@ -308,7 +308,7 @@ function _M:updateQuickHotkeys(actor)
308 308 end
309 309 end
310 310
311   -local page_to_hotkey = {"", "SECOND_", "THIRD_", "FOURTH_", "FIFTH_"}
  311 +local page_to_hotkey = {"", "SECOND_", "THIRD_", "FOURTH_", "FIFTH_", "SIX_", "SEVEN_"}
312 312
313 313 function _M:bindAllHotkeys(key, fct)
314 314 for page = 1, self.nb_hotkey_pages do for x = 1, 12 do
... ...
... ... @@ -122,8 +122,8 @@ function _M:generateList()
122 122 save.screenshot = { save.screenshot:glTexture() }
123 123 save.screenshot.w, save.screenshot.h = w, h
124 124 end
125   - table.sort(nodes, function(a, b) return (a.timestamp or 0) > (b.timestamp or 0) end)
126 125 table.insert(nodes, save)
  126 + table.sort(nodes, function(a, b) return (a.timestamp or 0) > (b.timestamp or 0) end)
127 127 found = true
128 128 end
129 129 end
... ...