Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
illuna-minetest
Commits
18bfa1c7
Commit
18bfa1c7
authored
10 years ago
by
TriBlade9
Committed by
RealBadAngel
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added configurable selectionbox width. Min width = 1, Max = 5
parent
86a0f560
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
minetest.conf.example
+3
-1
3 additions, 1 deletion
minetest.conf.example
src/defaultsettings.cpp
+1
-0
1 addition, 0 deletions
src/defaultsettings.cpp
src/drawscene.cpp
+4
-1
4 additions, 1 deletion
src/drawscene.cpp
with
8 additions
and
2 deletions
minetest.conf.example
+
3
−
1
View file @
18bfa1c7
...
@@ -157,8 +157,10 @@
...
@@ -157,8 +157,10 @@
#sound_volume = 0.7
#sound_volume = 0.7
# Whether node texture animations should be desynchronized per MapBlock
# Whether node texture animations should be desynchronized per MapBlock
#desynchronize_mapblock_texture_animation = true
#desynchronize_mapblock_texture_animation = true
# (useful if you've there's something to be displayed right or left of hotbar)
# Width of the selectionbox's lines (Between 1 and 5)
#selectionbox_width = 2
# maximum percentage of current window to be used for hotbar
# maximum percentage of current window to be used for hotbar
# (usefull if you've there's something to be displayed right or left of hotbar)
#hud_hotbar_max_width = 1.0
#hud_hotbar_max_width = 1.0
# Enable highlighting for nodes (disables selectionboxes)
# Enable highlighting for nodes (disables selectionboxes)
#enable_node_highlighting = false
#enable_node_highlighting = false
...
...
This diff is collapsed.
Click to expand it.
src/defaultsettings.cpp
+
1
−
0
View file @
18bfa1c7
...
@@ -128,6 +128,7 @@ void set_default_settings(Settings *settings)
...
@@ -128,6 +128,7 @@ void set_default_settings(Settings *settings)
settings
->
setDefault
(
"enable_sound"
,
"true"
);
settings
->
setDefault
(
"enable_sound"
,
"true"
);
settings
->
setDefault
(
"sound_volume"
,
"0.8"
);
settings
->
setDefault
(
"sound_volume"
,
"0.8"
);
settings
->
setDefault
(
"desynchronize_mapblock_texture_animation"
,
"true"
);
settings
->
setDefault
(
"desynchronize_mapblock_texture_animation"
,
"true"
);
settings
->
setDefault
(
"selectionbox_width"
,
"2"
);
settings
->
setDefault
(
"hud_hotbar_max_width"
,
"1.0"
);
settings
->
setDefault
(
"hud_hotbar_max_width"
,
"1.0"
);
settings
->
setDefault
(
"mip_map"
,
"false"
);
settings
->
setDefault
(
"mip_map"
,
"false"
);
...
...
This diff is collapsed.
Click to expand it.
src/drawscene.cpp
+
4
−
1
View file @
18bfa1c7
...
@@ -30,15 +30,18 @@ typedef enum {
...
@@ -30,15 +30,18 @@ typedef enum {
EYECOUNT
=
2
EYECOUNT
=
2
}
paralax_sign
;
}
paralax_sign
;
void
draw_selectionbox
(
video
::
IVideoDriver
*
driver
,
Hud
&
hud
,
void
draw_selectionbox
(
video
::
IVideoDriver
*
driver
,
Hud
&
hud
,
std
::
vector
<
aabb3f
>&
hilightboxes
,
bool
show_hud
)
std
::
vector
<
aabb3f
>&
hilightboxes
,
bool
show_hud
)
{
{
static
const
s16
selectionbox_width
=
rangelim
(
g_settings
->
getS16
(
"selectionbox_width"
),
1
,
5
);
if
(
!
show_hud
)
if
(
!
show_hud
)
return
;
return
;
video
::
SMaterial
oldmaterial
=
driver
->
getMaterial2D
();
video
::
SMaterial
oldmaterial
=
driver
->
getMaterial2D
();
video
::
SMaterial
m
;
video
::
SMaterial
m
;
m
.
Thickness
=
3
;
m
.
Thickness
=
selectionbox_width
;
m
.
Lighting
=
false
;
m
.
Lighting
=
false
;
driver
->
setMaterial
(
m
);
driver
->
setMaterial
(
m
);
hud
.
drawSelectionBoxes
(
hilightboxes
);
hud
.
drawSelectionBoxes
(
hilightboxes
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment