diff --git a/mods/nc_player_hud/hotbar.lua b/mods/nc_player_hud/hotbar.lua
index 5600890a..c82d9b60 100644
--- a/mods/nc_player_hud/hotbar.lua
+++ b/mods/nc_player_hud/hotbar.lua
@@ -8,10 +8,12 @@ local modname = minetest.get_current_modname()
local hotbar_slots = 8
local bar_scale = 32
+local bar_margin = 1
nodecore.register_playerstep({
label = "hotbar images",
action = function(player, data)
- local bar = "[combine:" .. (hotbar_slots * bar_scale) .. "x" .. bar_scale
+ local bar = "[combine:" .. (hotbar_slots * bar_scale + bar_margin * 2)
+ .. "x" .. (bar_scale + bar_margin * 2)
local inv = player:get_inventory()
for i = 1, hotbar_slots do
local stack = inv:get_stack("main", i)
@@ -20,9 +22,9 @@ nodecore.register_playerstep({
if def and def.hotbar_type then
suff = suff .. "_" .. def.hotbar_type
end
- bar = bar .. ":" .. (i * bar_scale - bar_scale) .. ",0="
- .. modname .. suff .. ".png\\^[resize\\:" .. bar_scale
- .. "x" .. bar_scale
+ bar = bar .. ":" .. (i * bar_scale - bar_scale + bar_margin)
+ .. "," .. bar_margin .. "=" .. modname .. suff
+ .. ".png\\^[resize\\:" .. bar_scale .. "x" .. bar_scale
end
if data.slots ~= hotbar_slots then
@@ -38,5 +40,5 @@ nodecore.register_playerstep({
})
nodecore.register_on_joinplayer("setup hotbar", function(player)
- player:hud_set_hotbar_selected_image("[combine:1x1")
+ player:hud_set_hotbar_selected_image(modname .. "_cursor.png")
end)
diff --git a/mods/nc_player_hud/textures/nc_player_hud_cursor.png b/mods/nc_player_hud/textures/nc_player_hud_cursor.png
new file mode 100644
index 00000000..497d4553
Binary files /dev/null and b/mods/nc_player_hud/textures/nc_player_hud_cursor.png differ
diff --git a/mods/nc_player_hud/textures/src/huds.svg b/mods/nc_player_hud/textures/src/huds.svg
index 45967ab9..12c2314d 100644
--- a/mods/nc_player_hud/textures/src/huds.svg
+++ b/mods/nc_player_hud/textures/src/huds.svg
@@ -10,9 +10,9 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="103.83915mm"
- height="146.90298mm"
- viewBox="0 0 103.83915 146.90299"
+ width="143.29617mm"
+ height="146.903mm"
+ viewBox="0 0 143.29617 146.90301"
version="1.1"
id="svg8"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
@@ -203,16 +203,6 @@
y1="257.21585"
x2="-178.47861"
y2="269.08185" />
-
image/svg+xml
-
+
@@ -515,9 +505,45 @@
inkscape:groupmode="layer"
id="layer1"
transform="translate(201.57008,-217.93825)">
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
@@ -966,11 +948,59 @@
d="m -136.89988,277.6105 4.12106,6.12876 -2.6417,2.95871 2.85303,3.69839 -6.34009,4.22673 0.63401,6.6571 1.05668,-6.23443 6.97412,-2.53603 3.59272,2.3247 -1.90204,4.86073 1.79636,4.0154 0.10568,-4.43807 6.97409,0.42267 -5.60042,-2.43036 1.47936,-3.69839 -5.38907,-3.38139 -1.58504,-3.59272 3.48707,-4.01539 c 0.28178,-3.24049 0.56355,-6.48098 0.84534,-9.72147 z"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter2794)" />
-
+
+
+
+
+
+
+
+
+
+
+