Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Illuna-Minetest
hudbars
Commits
85ba0cfd
Commit
85ba0cfd
authored
Mar 29, 2016
by
Milan
Browse files
positioning and resizing
parent
5b28ce44
Changes
1
Hide whitespace changes
Inline
Side-by-side
hudbars/init.lua
View file @
85ba0cfd
...
...
@@ -8,7 +8,7 @@ hb.registered_slots = {}
hb
.
settings
=
{}
local
enable_damage
=
minetest
.
setting_getbool
(
"enable_damage"
)
local
gui_scale
=
tonumber
(
minetest
.
setting_get
(
"gui_scaling"
))
or
1
-- use this to scale hud
local
gui_scale
=
1
.
4
1
-- use this to scale hud
function
hb
.
load_setting
(
sname
,
stype
,
defaultval
,
valid_values
)
local
sval
...
...
@@ -74,7 +74,7 @@ hb.settings.start_offset_right.y = hb.load_setting("hudbars_start_offset_right_y
hb
.
settings
.
vmargin
=
hb
.
load_setting
(
"hudbars_tick"
,
"number"
,
24
*
gui_scale
)
hb
.
settings
.
tick
=
hb
.
load_setting
(
"hudbars_tick"
,
"number"
,
1
)
-- was 0.1
hb
.
settings
.
tick
=
hb
.
load_setting
(
"hudbars_tick"
,
"number"
,
1
)
-- was 0.1
---was 1
-- experimental setting: Changing this setting is not officially supported, do NOT rely on it!
hb
.
settings
.
forceload_default_hudbars
=
hb
.
load_setting
(
"hudbars_forceload_default_hudbars"
,
"bool"
,
true
)
...
...
@@ -99,7 +99,7 @@ hb.settings.bar_type = hb.load_setting(
hb
.
settings
.
autohide_breath
=
hb
.
load_setting
(
"hudbars_autohide_breath"
,
"bool"
,
true
)
hb
.
direction
=
0
-- 0: left-right, 1: right-left, 2: top-bottom, 3: bottom-top -TENPLUS1
if
hb
.
settings
.
bar_type
==
"progress_bar"
then
hb
.
size
=
{
x
=
3
*
gui_scale
,
y
=
17
*
gui_scale
}
hb
.
size
=
{
x
=
17
*
gui_scale
,
y
=
17
*
gui_scale
}
else
hb
.
size
=
{
x
=
17
*
gui_scale
,
y
=
17
*
gui_scale
}
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment