Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions data/particles/background_particles.otps
Original file line number Diff line number Diff line change
@@ -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
Binary file added data/particles/particle2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 19 additions & 1 deletion modules/client_background/background.otui
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -21,3 +33,9 @@ Panel
padding: 2
color: #ffffff
font: verdana-11px-monochrome

UIParticles
id: particles
effect: background-effect
anchors.fill: parent
phantom: true
1 change: 1 addition & 0 deletions modules/client_entergame/characterlist.otui
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ MainWindow
id: charactersWindow
!text: tr('Character List')
visible: false
draggable: false
@onEnter: CharacterList.doLogin()
@onEscape: CharacterList.hide(true)
@onSetup: |
Expand Down
1 change: 1 addition & 0 deletions modules/client_entergame/entergame.otui
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
EnterGameWindow < MainWindow
!text: tr('Enter Game')
size: 236 298
draggable: false

EnterGameButton < Button
width: 64
Expand Down
1 change: 1 addition & 0 deletions modules/client_entergame/waitinglist.otui
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ MainWindow
id: waitingWindow
!text: tr('Waiting List')
size: 260 180
draggable: false
@onEscape: CharacterList.cancelWait()

Label
Expand Down
3 changes: 2 additions & 1 deletion src/framework/core/graphicalapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ void GraphicalApplication::run()
continue;
}

g_particles.poll();

if (foreground->canRepaint())
foreCondition.notify_one();

Expand Down Expand Up @@ -222,7 +224,6 @@ void GraphicalApplication::run()
void GraphicalApplication::poll()
{
Application::poll();
g_particles.poll();

#ifdef FRAMEWORK_SOUND
g_sounds.poll();
Expand Down
2 changes: 1 addition & 1 deletion src/framework/ui/uiwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion src/framework/ui/uiwidgetimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down