Shrinking location crosshairs to 24x24, rotating 45 degrees

This commit is contained in:
Dan Paulat 2023-11-23 22:16:00 -06:00
parent cf0b268822
commit 7057f14b22
5 changed files with 9 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -59,6 +59,6 @@
<file>res/palettes/wct/ZDR.pal</file> <file>res/palettes/wct/ZDR.pal</file>
<file>res/textures/lines/default-1x7.png</file> <file>res/textures/lines/default-1x7.png</file>
<file>res/textures/lines/test-pattern.png</file> <file>res/textures/lines/test-pattern.png</file>
<file>res/textures/images/crosshairs-32.png</file> <file>res/textures/images/crosshairs-24.png</file>
</qresource> </qresource>
</RCC> </RCC>

View file

@ -41,7 +41,7 @@ public:
activeBoxInner_ {std::make_shared<gl::draw::Rectangle>(context)}, activeBoxInner_ {std::make_shared<gl::draw::Rectangle>(context)},
icons_ {std::make_shared<gl::draw::GeoIcons>(context)}, icons_ {std::make_shared<gl::draw::GeoIcons>(context)},
locationIconName_ { locationIconName_ {
types::GetTextureName(types::ImageTexture::Crosshairs32)} types::GetTextureName(types::ImageTexture::Crosshairs24)}
{ {
} }
~OverlayLayerImpl() = default; ~OverlayLayerImpl() = default;
@ -101,6 +101,8 @@ void OverlayLayer::Initialize()
p->locationIcon_ = p->icons_->AddIcon(); p->locationIcon_ = p->icons_->AddIcon();
gl::draw::GeoIcons::SetIconTexture( gl::draw::GeoIcons::SetIconTexture(
p->locationIcon_, p->locationIconName_, 0); p->locationIcon_, p->locationIconName_, 0);
gl::draw::GeoIcons::SetIconAngle(p->locationIcon_,
units::angle::degrees<double> {45.0});
gl::draw::GeoIcons::SetIconLocation( gl::draw::GeoIcons::SetIconLocation(
p->locationIcon_, coordinate.latitude(), coordinate.longitude()); p->locationIcon_, coordinate.latitude(), coordinate.longitude());
p->icons_->FinishIcons(); p->icons_->FinishIcons();

View file

@ -16,8 +16,8 @@ struct TextureInfo
}; };
static const std::unordered_map<ImageTexture, TextureInfo> imageTextureInfo_ { static const std::unordered_map<ImageTexture, TextureInfo> imageTextureInfo_ {
{ImageTexture::Crosshairs32, {ImageTexture::Crosshairs24,
{"images/crosshairs-32", ":/res/textures/images/crosshairs-32.png"}}}; {"images/crosshairs-24", ":/res/textures/images/crosshairs-24.png"}}};
static const std::unordered_map<LineTexture, TextureInfo> lineTextureInfo_ { static const std::unordered_map<LineTexture, TextureInfo> lineTextureInfo_ {
{LineTexture::Default1x7, {LineTexture::Default1x7,

View file

@ -13,11 +13,12 @@ namespace types
enum class ImageTexture enum class ImageTexture
{ {
Crosshairs24,
Crosshairs32 Crosshairs32
}; };
typedef scwx::util::Iterator<ImageTexture, typedef scwx::util::Iterator<ImageTexture,
ImageTexture::Crosshairs32, ImageTexture::Crosshairs24,
ImageTexture::Crosshairs32> ImageTexture::Crosshairs24>
ImageTextureIterator; ImageTextureIterator;
enum class LineTexture enum class LineTexture