Size range has been extended, some textures have been added, others
modified and some renamed as well
3
.gitignore
vendored
@ -99,3 +99,6 @@ ENV/
|
|||||||
|
|
||||||
# mypy
|
# mypy
|
||||||
.mypy_cache/
|
.mypy_cache/
|
||||||
|
/.buildpath
|
||||||
|
/.project
|
||||||
|
/.settings/
|
||||||
|
13
init.lua
@ -17,6 +17,13 @@
|
|||||||
-- the "hotbar_slots" key in the configuration file.
|
-- the "hotbar_slots" key in the configuration file.
|
||||||
--
|
--
|
||||||
-- Changelog:
|
-- Changelog:
|
||||||
|
-- 0.1.2
|
||||||
|
-- - Some of the existing textures have been modfied to comply with an even
|
||||||
|
-- size (as recommended)
|
||||||
|
-- - The missing textures have been added.
|
||||||
|
-- - Some of the textures have been renamed to better support sorting.
|
||||||
|
-- - As a consequence, the size range has been extended from [1,16] to the
|
||||||
|
-- fully supported one [1,23]
|
||||||
-- 0.1.1
|
-- 0.1.1
|
||||||
-- - The code that did not properly show the error message when the
|
-- - The code that did not properly show the error message when the
|
||||||
-- received size was out of bounds has been corrected
|
-- received size was out of bounds has been corrected
|
||||||
@ -34,15 +41,15 @@
|
|||||||
|
|
||||||
local hb = {}
|
local hb = {}
|
||||||
hb.min = 1
|
hb.min = 1
|
||||||
hb.max = 16
|
hb.max = 23
|
||||||
hb.default = 16
|
hb.default = 16
|
||||||
hb.setting ="hotbar_slots"
|
hb.setting ="hotbar_slots"
|
||||||
hb.current = minetest.setting_get(hb.setting) or hb.default -- The first time
|
hb.current = minetest.setting_get(hb.setting) or hb.default -- The first time
|
||||||
hb.image = {}
|
hb.image = {}
|
||||||
hb.image.selected = "hotbar_slot_selected.png"
|
hb.image.selected = "hotbar_selected_slot.png"
|
||||||
hb.image.bg = {}
|
hb.image.bg = {}
|
||||||
for i = 1, hb.max do
|
for i = 1, hb.max do
|
||||||
table.insert(hb.image.bg, string.format("hotbar_slots_bg_%i.png", i))
|
table.insert(hb.image.bg, string.format("hotbar_slots_bg_%02i.png", i))
|
||||||
end
|
end
|
||||||
|
|
||||||
function hb.resize(size)
|
function hb.resize(size)
|
||||||
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 312 B |
Before Width: | Height: | Size: 467 B After Width: | Height: | Size: 467 B |
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 605 B |
BIN
textures/hotbar_slots_bg_04.png
Normal file
After Width: | Height: | Size: 689 B |
Before Width: | Height: | Size: 861 B After Width: | Height: | Size: 861 B |
Before Width: | Height: | Size: 965 B After Width: | Height: | Size: 965 B |
Before Width: | Height: | Size: 489 B After Width: | Height: | Size: 489 B |
Before Width: | Height: | Size: 550 B After Width: | Height: | Size: 550 B |
BIN
textures/hotbar_slots_bg_09.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 580 B After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 656 B After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 732 B After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 788 B After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 730 B |
Before Width: | Height: | Size: 552 B |