mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Halo: Highlight selected face
This is a slightly modified and cleaned up version of #3774 by RealBadAngel. By sofar: Remove color change (just make it lighter) and some minor cleanups.
This commit is contained in:
parent
8a1a9fdc24
commit
68f5b877c7
6 changed files with 39 additions and 2 deletions
|
@ -544,6 +544,12 @@ void Hud::drawSelectionMesh()
|
|||
video::SMaterial oldmaterial = driver->getMaterial2D();
|
||||
driver->setMaterial(m_selection_material);
|
||||
setMeshColor(m_selection_mesh, m_selection_mesh_color);
|
||||
video::SColor face_color(0,
|
||||
MYMIN(255, m_selection_mesh_color.getRed() * 1.5),
|
||||
MYMIN(255, m_selection_mesh_color.getGreen() * 1.5),
|
||||
MYMIN(255, m_selection_mesh_color.getBlue() * 1.5));
|
||||
setMeshColorByNormal(m_selection_mesh, m_selected_face_normal,
|
||||
face_color);
|
||||
scene::IMesh* mesh = cloneMesh(m_selection_mesh);
|
||||
translateMesh(mesh, m_selection_pos_with_offset);
|
||||
u32 mc = m_selection_mesh->getMeshBufferCount();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue