tab_about.lua 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. --Minetest
  2. --Copyright (C) 2013 sapier
  3. --
  4. --This program is free software; you can redistribute it and/or modify
  5. --it under the terms of the GNU Lesser General Public License as published by
  6. --the Free Software Foundation; either version 2.1 of the License, or
  7. --(at your option) any later version.
  8. --
  9. --This program is distributed in the hope that it will be useful,
  10. --but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. --GNU Lesser General Public License for more details.
  13. --
  14. --You should have received a copy of the GNU Lesser General Public License along
  15. --with this program; if not, write to the Free Software Foundation, Inc.,
  16. --51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  17. -- https://github.com/orgs/minetest/teams/engine/members
  18. local core_developers = {
  19. "Perttu Ahola (celeron55) <celeron55@gmail.com> [Project founder]",
  20. "sfan5 <sfan5@live.de>",
  21. "ShadowNinja <shadowninja@minetest.net>",
  22. "Nathanaëlle Courant (Nore/Ekdohibs) <nore@mesecons.net>",
  23. "Loic Blot (nerzhul/nrz) <loic.blot@unix-experience.fr>",
  24. "Andrew Ward (rubenwardy) <rw@rubenwardy.com>",
  25. "Krock/SmallJoker <mk939@ymail.com>",
  26. "Lars Hofhansl <larsh@apache.org>",
  27. "v-rob <robinsonvincent89@gmail.com>",
  28. "Desour/DS",
  29. "srifqi",
  30. "Gregor Parzefall (grorp)",
  31. }
  32. -- currently only https://github.com/orgs/minetest/teams/triagers/members
  33. local core_team = {
  34. "Zughy [Issue triager]",
  35. "wsor [Issue triager]",
  36. "Hugo Locurcio (Calinou) [Issue triager]",
  37. }
  38. -- For updating active/previous contributors, see the script in ./util/gather_git_credits.py
  39. local active_contributors = {
  40. "Wuzzy [Features, translations, documentation]",
  41. "numzero [Optimizations, work on OpenGL driver]",
  42. "ROllerozxa [Bugfixes, Mainmenu]",
  43. "Lars Müller [Bugfixes]",
  44. "AFCMS [Documentation]",
  45. "savilli [Bugfixes]",
  46. "fluxionary [Bugfixes]",
  47. "Bradley Pierce (Thresher) [Documentation]",
  48. "Stvk imension [Android]",
  49. "JosiahWI [Code cleanups]",
  50. "OgelGames [UI, Bugfixes]",
  51. "ndren [Bugfixes]",
  52. "Abdou-31 [Documentation]",
  53. }
  54. local previous_core_developers = {
  55. "BlockMen",
  56. "Maciej Kasatkin (RealBadAngel) [RIP]",
  57. "Lisa Milne (darkrose) <lisa@ltmnet.com>",
  58. "proller",
  59. "Ilya Zhuravlev (xyz) <xyz@minetest.net>",
  60. "PilzAdam <pilzadam@minetest.net>",
  61. "est31 <MTest31@outlook.com>",
  62. "kahrl <kahrl@gmx.net>",
  63. "Ryan Kwolek (kwolekr) <kwolekr@minetest.net>",
  64. "sapier",
  65. "Zeno",
  66. "Auke Kok (sofar) <sofar@foo-projects.org>",
  67. "Aaron Suen <warr1024@gmail.com>",
  68. "paramat",
  69. "Pierre-Yves Rollo <dev@pyrollo.com>",
  70. "hecks",
  71. "Jude Melton-Houghton (TurkeyMcMac) [RIP]",
  72. "Hugues Ross <hugues.ross@gmail.com>",
  73. "Dmitry Kostenko (x2048) <codeforsmile@gmail.com>",
  74. }
  75. local previous_contributors = {
  76. "Nils Dagsson Moskopp (erlehmann) <nils@dieweltistgarnichtso.net> [Minetest logo]",
  77. "red-001 <red-001@outlook.ie>",
  78. "Giuseppe Bilotta",
  79. "HybridDog",
  80. "ClobberXD",
  81. "Dániel Juhász (juhdanad) <juhdanad@gmail.com>",
  82. "MirceaKitsune <mirceakitsune@gmail.com>",
  83. "Jean-Patrick Guerrero (kilbith)",
  84. "MoNTE48",
  85. "Constantin Wenger (SpeedProg)",
  86. "Ciaran Gultnieks (CiaranG)",
  87. "Paul Ouellette (pauloue)",
  88. "stujones11",
  89. "Rogier <rogier777@gmail.com>",
  90. "Gregory Currie (gregorycu)",
  91. "JacobF",
  92. "Jeija <jeija@mesecons.net>",
  93. }
  94. local function prepare_credits(dest, source)
  95. local string = table.concat(source, "\n") .. "\n"
  96. local hypertext_escapes = {
  97. ["\\"] = "\\\\",
  98. ["<"] = "\\<",
  99. [">"] = "\\>",
  100. }
  101. string = string:gsub("[\\<>]", hypertext_escapes)
  102. string = string:gsub("%[.-%]", "<gray>%1</gray>")
  103. table.insert(dest, string)
  104. end
  105. return {
  106. name = "about",
  107. caption = fgettext("About"),
  108. cbf_formspec = function(tabview, name, tabdata)
  109. local logofile = defaulttexturedir .. "logo.png"
  110. local version = core.get_version()
  111. local hypertext = {
  112. "<tag name=heading color=#ff0>",
  113. "<tag name=gray color=#aaa>",
  114. }
  115. table.insert_all(hypertext, {
  116. "<heading>", fgettext_ne("Core Developers"), "</heading>\n",
  117. })
  118. prepare_credits(hypertext, core_developers)
  119. table.insert_all(hypertext, {
  120. "\n",
  121. "<heading>", fgettext_ne("Core Team"), "</heading>\n",
  122. })
  123. prepare_credits(hypertext, core_team)
  124. table.insert_all(hypertext, {
  125. "\n",
  126. "<heading>", fgettext_ne("Active Contributors"), "</heading>\n",
  127. })
  128. prepare_credits(hypertext, active_contributors)
  129. table.insert_all(hypertext, {
  130. "\n",
  131. "<heading>", fgettext_ne("Previous Core Developers"), "</heading>\n",
  132. })
  133. prepare_credits(hypertext, previous_core_developers)
  134. table.insert_all(hypertext, {
  135. "\n",
  136. "<heading>", fgettext_ne("Previous Contributors"), "</heading>\n",
  137. })
  138. prepare_credits(hypertext, previous_contributors)
  139. hypertext = table.concat(hypertext):sub(1, -2)
  140. local fs = "image[1.5,0.6;2.5,2.5;" .. core.formspec_escape(logofile) .. "]" ..
  141. "style[label_button;border=false]" ..
  142. "button[0.1,3.4;5.3,0.5;label_button;" ..
  143. core.formspec_escape(version.project .. " " .. version.string) .. "]" ..
  144. "button_url[1.5,4.1;2.5,0.8;homepage;minetest.net;https://www.minetest.net/]" ..
  145. "hypertext[5.5,0.25;9.75,6.6;credits;" .. minetest.formspec_escape(hypertext) .. "]"
  146. -- Render information
  147. local active_renderer_info = fgettext("Active renderer:") .. " " ..
  148. core.formspec_escape(core.get_active_renderer())
  149. fs = fs .. "style[label_button2;border=false]" ..
  150. "button[0.1,6;5.3,0.5;label_button2;" .. active_renderer_info .. "]"..
  151. "tooltip[label_button2;" .. active_renderer_info .. "]"
  152. -- Irrlicht device information
  153. local irrlicht_device_info = fgettext("Irrlicht device:") .. " " ..
  154. core.formspec_escape(core.get_active_irrlicht_device())
  155. fs = fs .. "style[label_button3;border=false]" ..
  156. "button[0.1,6.5;5.3,0.5;label_button3;" .. irrlicht_device_info .. "]"..
  157. "tooltip[label_button3;" .. irrlicht_device_info .. "]"
  158. if PLATFORM == "Android" then
  159. fs = fs .. "button[0.5,5.1;4.5,0.8;share_debug;" .. fgettext("Share debug log") .. "]"
  160. else
  161. fs = fs .. "tooltip[userdata;" ..
  162. fgettext("Opens the directory that contains user-provided worlds, games, mods,\n" ..
  163. "and texture packs in a file manager / explorer.") .. "]"
  164. fs = fs .. "button[0.5,5.1;4.5,0.8;userdata;" .. fgettext("Open User Data Directory") .. "]"
  165. end
  166. return fs
  167. end,
  168. cbf_button_handler = function(this, fields, name, tabdata)
  169. if fields.share_debug then
  170. local path = core.get_user_path() .. DIR_DELIM .. "debug.txt"
  171. core.share_file(path)
  172. end
  173. if fields.userdata then
  174. core.open_dir(core.get_user_path())
  175. end
  176. end,
  177. on_change = function(type)
  178. if type == "ENTER" then
  179. mm_game_theme.set_engine()
  180. end
  181. end,
  182. }