From 8c444baf8a9a45791e0ae1211a5787091d1ea75b Mon Sep 17 00:00:00 2001 From: cx384 Date: Thu, 18 Jan 2024 15:31:59 +0100 Subject: [PATCH] Minor code style improvement and image test fix --- games/devtest/mods/testhud/init.lua | 8 -------- src/client/hud.cpp | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/games/devtest/mods/testhud/init.lua b/games/devtest/mods/testhud/init.lua index 51ab6666a..7539d7957 100644 --- a/games/devtest/mods/testhud/init.lua +++ b/games/devtest/mods/testhud/init.lua @@ -209,14 +209,6 @@ minetest.register_chatcommand("zoomfov", { -- Images local hud_image_defs = { - { - type = "image", - position = {x=0.5, y=0.5}, - scale = {x = 10, y = 10}, - text = "crosshair.png", - alignment = {x=0, y=-0}, - offset = {x=0, y=0}, - }, { type = "image", position = {x=0.3, y=0.3}, diff --git a/src/client/hud.cpp b/src/client/hud.cpp index a4f91d8af..89330843c 100644 --- a/src/client/hud.cpp +++ b/src/client/hud.cpp @@ -818,7 +818,7 @@ void Hud::drawImage(const v2s32 &pos, const v2f &scale, const v2f &align, const rect += pos + align_offset + v2s32(offset.X * m_scale_factor, offset.Y * m_scale_factor); draw2DImageFilterScaled(driver, texture, rect, -core::rect(core::position2d(0,0), imgsize), + core::rect(core::position2d(0,0),imgsize), NULL, colors, true); }