diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-24 22:49:47 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-24 22:49:47 +1000 |
commit | 7eb010d4a1c6a90d5040b3ec2e7d189fb387b9b2 (patch) | |
tree | 44445bce5cee5387511ac0045072539f5a928294 /source/windowing | |
parent | aa08eaac993a309d3aebc2cd4321513a1e413254 (diff) |
Pretty much working now
Diffstat (limited to 'source/windowing')
-rw-r--r-- | source/windowing/StarGuiContext.cpp | 2 | ||||
-rw-r--r-- | source/windowing/StarImageWidget.cpp | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/source/windowing/StarGuiContext.cpp b/source/windowing/StarGuiContext.cpp index 463e341..70ef67b 100644 --- a/source/windowing/StarGuiContext.cpp +++ b/source/windowing/StarGuiContext.cpp @@ -313,7 +313,7 @@ bool GuiContext::trySetCursor(Drawable const& drawable, Vec2I const& offset, int auto assets = Root::singleton().assets(); auto& imagePath = drawable.imagePart().image; - return applicationController()->setCursorImage(imagePath, assets->image(imagePath), pixelRatio, offset); + return applicationController()->setCursorImage(AssetPath::join(imagePath), assets->image(imagePath), pixelRatio, offset); } RectF GuiContext::renderText(String const& s, TextPositioning const& position) { diff --git a/source/windowing/StarImageWidget.cpp b/source/windowing/StarImageWidget.cpp index c189eac..ef82c33 100644 --- a/source/windowing/StarImageWidget.cpp +++ b/source/windowing/StarImageWidget.cpp @@ -41,9 +41,10 @@ void ImageWidget::setRotation(float rotation) { } String ImageWidget::image() const { - if (!m_drawables.size()) + if (m_drawables.empty()) return ""; - return m_drawables[0].imagePart().image; + else + return AssetPath::join(m_drawables[0].imagePart().image); } void ImageWidget::setDrawables(List<Drawable> drawables) { |