diff --git a/data/particles/background_particles.otps b/data/particles/background_particles.otps new file mode 100644 index 0000000000..d6a8b89947 --- /dev/null +++ b/data/particles/background_particles.otps @@ -0,0 +1,27 @@ +Particle + name: background_particle + + duration: 3.5 + min-position-radius: 0 + max-position-radius: 800 + velocity: 150 + min-velocity-angle: 30 + max-velocity-angle: 55 + colors: #FFFFFF00 #fa8c0f #05050500 + colors-stops: 0 0.80 1 + size: 20 20 + texture: /particles/particle2 + composition-mode: normal + +Effect + name: background-effect + description: Effect for background in the background module + + System + position: 0 0 + + Emitter + position: -5 -5 + burst-rate: 25 + burst-count: 1 + particle-type: background_particle \ No newline at end of file diff --git a/data/particles/particle2.png b/data/particles/particle2.png new file mode 100644 index 0000000000..a7348b7689 Binary files /dev/null and b/data/particles/particle2.png differ diff --git a/modules/client_background/background.otui b/modules/client_background/background.otui index e14fb9e7c9..c80f4b552f 100644 --- a/modules/client_background/background.otui +++ b/modules/client_background/background.otui @@ -1,7 +1,7 @@ Panel id: background image-source: /images/background - image-smooth: true + image-smooth: false image-fixed-ratio: true anchors.top: topMenu.bottom anchors.left: parent.left @@ -10,6 +10,18 @@ Panel margin-top: 1 focusable: false + UIWidget + anchors.top: parent.top + phantom: true + anchors.HorizontalCenter: parent.HorizontalCenter + text-align: center + text-auto-resize: true + margin-top: 50 + color: #e98d02 + text: OTCLient Redemption + font: verdana-11px-rounded + font-scale: 4 + UILabel id: clientVersionLabel background-color: #00000099 @@ -21,3 +33,9 @@ Panel padding: 2 color: #ffffff font: verdana-11px-monochrome + + UIParticles + id: particles + effect: background-effect + anchors.fill: parent + phantom: true \ No newline at end of file diff --git a/modules/client_entergame/characterlist.otui b/modules/client_entergame/characterlist.otui index d310b1fe1c..ddb0784016 100644 --- a/modules/client_entergame/characterlist.otui +++ b/modules/client_entergame/characterlist.otui @@ -45,6 +45,7 @@ MainWindow id: charactersWindow !text: tr('Character List') visible: false + draggable: false @onEnter: CharacterList.doLogin() @onEscape: CharacterList.hide(true) @onSetup: | diff --git a/modules/client_entergame/entergame.otui b/modules/client_entergame/entergame.otui index 9b6dff1fd3..edce9ba17e 100644 --- a/modules/client_entergame/entergame.otui +++ b/modules/client_entergame/entergame.otui @@ -1,6 +1,7 @@ EnterGameWindow < MainWindow !text: tr('Enter Game') size: 236 298 + draggable: false EnterGameButton < Button width: 64 diff --git a/modules/client_entergame/waitinglist.otui b/modules/client_entergame/waitinglist.otui index c7b86a61f4..d2cc66d112 100644 --- a/modules/client_entergame/waitinglist.otui +++ b/modules/client_entergame/waitinglist.otui @@ -2,6 +2,7 @@ MainWindow id: waitingWindow !text: tr('Waiting List') size: 260 180 + draggable: false @onEscape: CharacterList.cancelWait() Label diff --git a/src/framework/core/graphicalapplication.cpp b/src/framework/core/graphicalapplication.cpp index b4a200dfb0..dcd0ec97c5 100644 --- a/src/framework/core/graphicalapplication.cpp +++ b/src/framework/core/graphicalapplication.cpp @@ -151,6 +151,8 @@ void GraphicalApplication::run() continue; } + g_particles.poll(); + if (foreground->canRepaint()) foreCondition.notify_one(); @@ -222,7 +224,6 @@ void GraphicalApplication::run() void GraphicalApplication::poll() { Application::poll(); - g_particles.poll(); #ifdef FRAMEWORK_SOUND g_sounds.poll(); diff --git a/src/framework/ui/uiwidget.h b/src/framework/ui/uiwidget.h index 783f82a3a3..3bc6e733e2 100644 --- a/src/framework/ui/uiwidget.h +++ b/src/framework/ui/uiwidget.h @@ -545,7 +545,7 @@ class UIWidget : public LuaObject void setTextVerticalAutoResize(bool textAutoResize) { setProp(PropTextVerticalAutoResize, textAutoResize); updateText(); } void setTextOnlyUpperCase(bool textOnlyUpperCase) { setProp(PropTextOnlyUpperCase, textOnlyUpperCase); setText(m_text); } void setFont(const std::string_view fontName); - void setFontScale(float scale) { m_fontScale = scale; m_textCachedScreenCoords = {}; } + void setFontScale(float scale) { m_fontScale = scale; m_textCachedScreenCoords = {}; resizeToText(); } std::string getText() { return m_text; } std::string getDrawText() { return m_drawText; } diff --git a/src/framework/ui/uiwidgetimage.cpp b/src/framework/ui/uiwidgetimage.cpp index 05100242e4..bfb60d3f95 100644 --- a/src/framework/ui/uiwidgetimage.cpp +++ b/src/framework/ui/uiwidgetimage.cpp @@ -181,7 +181,7 @@ void UIWidget::setImageSource(const std::string_view source) return; } - m_imageTexture = g_textures.getTexture(m_imageSource = source); + m_imageTexture = g_textures.getTexture(m_imageSource = source, isImageSmooth()); if (!m_imageTexture) return;