From 7057f14b22ebd8b0c6fee81343da4d09ea762ba5 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Thu, 23 Nov 2023 22:16:00 -0600 Subject: [PATCH] Shrinking location crosshairs to 24x24, rotating 45 degrees --- scwx-qt/res/textures/images/crosshairs-24.png | Bin 0 -> 1054 bytes scwx-qt/scwx-qt.qrc | 2 +- scwx-qt/source/scwx/qt/map/overlay_layer.cpp | 4 +++- scwx-qt/source/scwx/qt/types/texture_types.cpp | 4 ++-- scwx-qt/source/scwx/qt/types/texture_types.hpp | 5 +++-- 5 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 scwx-qt/res/textures/images/crosshairs-24.png diff --git a/scwx-qt/res/textures/images/crosshairs-24.png b/scwx-qt/res/textures/images/crosshairs-24.png new file mode 100644 index 0000000000000000000000000000000000000000..f2a7ae2d4b2f2a3b8a02d4be1ac8acbe32888fba GIT binary patch literal 1054 zcmV+(1mXLMP)EX>4Tx04R}tkv&MmKpe$iQ>CI62RoGFkfC+5AS&W0RV;#q(pG5I!Q|2}XktiG zTpR`0f`cE6RRU7TlmpZjwRDn*k4K9P8q>4rtTPCUJ7 z>74h8L#!ex#OK6g23?T&k?XR{Z=A~x3p_Jqn?%w`A)9&vFjy`g-ef3&{00006VoOIv0RI600RN!9r;`8x010qNS#tmY z4c7nw4c7reD4Tcy00J&aL_t(Y$HkVtPUAoj$A3q6D?yve;=1&~DO@2%>39J|5Klnu ziU)9w-yo~dBAOuWT9!acs-)y1gOnytklUPcSI!k@BVR6o6CrnhX$sHm&aCGfUdKLg z0T|#Jker?Yo6Gij2fhFurIdtWD7{`!CX>l;)bIBt3`0>$3DC*!{DGYnycY1FwLW=z zdZJpba&vQo<2YnlMwVqbj>Gl!HPvdB$Hzys)+fLNaQfEE&ppqRBuT_tE3WGb&;^cx z+reNUgTX+6+nm>RU01BNk|c?Eo+rThI^`|T^JF|8OArJCjDUJcepNDXRpQryuR##V zcswqQoUZcuB1w`$`8}YP&a~q=mNl~$*OfF)i|pD5xCp~gj4?$(H$~SN zBViZ{aIpg%9vmDHMG-4}`yRBTD56%Y0UQE6PbQP1LT~d7X|M6~IvnM9u5ulc>zsYc zKghD|<@9_$r_pHq04l(@H~GhW YpGJ_uNN)f^djJ3c07*qoM6N<$g8uX3(f|Me literal 0 HcmV?d00001 diff --git a/scwx-qt/scwx-qt.qrc b/scwx-qt/scwx-qt.qrc index 0caeac1a..3e7e55dd 100644 --- a/scwx-qt/scwx-qt.qrc +++ b/scwx-qt/scwx-qt.qrc @@ -59,6 +59,6 @@ res/palettes/wct/ZDR.pal res/textures/lines/default-1x7.png res/textures/lines/test-pattern.png - res/textures/images/crosshairs-32.png + res/textures/images/crosshairs-24.png diff --git a/scwx-qt/source/scwx/qt/map/overlay_layer.cpp b/scwx-qt/source/scwx/qt/map/overlay_layer.cpp index 3f7377b4..89c6248b 100644 --- a/scwx-qt/source/scwx/qt/map/overlay_layer.cpp +++ b/scwx-qt/source/scwx/qt/map/overlay_layer.cpp @@ -41,7 +41,7 @@ public: activeBoxInner_ {std::make_shared(context)}, icons_ {std::make_shared(context)}, locationIconName_ { - types::GetTextureName(types::ImageTexture::Crosshairs32)} + types::GetTextureName(types::ImageTexture::Crosshairs24)} { } ~OverlayLayerImpl() = default; @@ -101,6 +101,8 @@ void OverlayLayer::Initialize() p->locationIcon_ = p->icons_->AddIcon(); gl::draw::GeoIcons::SetIconTexture( p->locationIcon_, p->locationIconName_, 0); + gl::draw::GeoIcons::SetIconAngle(p->locationIcon_, + units::angle::degrees {45.0}); gl::draw::GeoIcons::SetIconLocation( p->locationIcon_, coordinate.latitude(), coordinate.longitude()); p->icons_->FinishIcons(); diff --git a/scwx-qt/source/scwx/qt/types/texture_types.cpp b/scwx-qt/source/scwx/qt/types/texture_types.cpp index 348ae781..5f2123ad 100644 --- a/scwx-qt/source/scwx/qt/types/texture_types.cpp +++ b/scwx-qt/source/scwx/qt/types/texture_types.cpp @@ -16,8 +16,8 @@ struct TextureInfo }; static const std::unordered_map imageTextureInfo_ { - {ImageTexture::Crosshairs32, - {"images/crosshairs-32", ":/res/textures/images/crosshairs-32.png"}}}; + {ImageTexture::Crosshairs24, + {"images/crosshairs-24", ":/res/textures/images/crosshairs-24.png"}}}; static const std::unordered_map lineTextureInfo_ { {LineTexture::Default1x7, diff --git a/scwx-qt/source/scwx/qt/types/texture_types.hpp b/scwx-qt/source/scwx/qt/types/texture_types.hpp index 7e1999b4..c40f7141 100644 --- a/scwx-qt/source/scwx/qt/types/texture_types.hpp +++ b/scwx-qt/source/scwx/qt/types/texture_types.hpp @@ -13,11 +13,12 @@ namespace types enum class ImageTexture { + Crosshairs24, Crosshairs32 }; typedef scwx::util::Iterator + ImageTexture::Crosshairs24, + ImageTexture::Crosshairs24> ImageTextureIterator; enum class LineTexture