diff options
author | George Hazan <ghazan@miranda.im> | 2019-03-12 13:43:31 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-03-12 13:43:31 +0300 |
commit | 8dd4143614ffa1a309f07f0b1a19921955f9c3f5 (patch) | |
tree | c99f5116020adb618d020fe4df7283fb5268d9ab /plugins/MirandaG15/src/CScreensaverScreen.cpp | |
parent | 6312425c1ad093cad87a688497728fdb12e24385 (diff) |
MirandaG15: warning fixes + massive code cleaning
Diffstat (limited to 'plugins/MirandaG15/src/CScreensaverScreen.cpp')
-rw-r--r-- | plugins/MirandaG15/src/CScreensaverScreen.cpp | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/plugins/MirandaG15/src/CScreensaverScreen.cpp b/plugins/MirandaG15/src/CScreensaverScreen.cpp index 0ba40da901..492274a2cc 100644 --- a/plugins/MirandaG15/src/CScreensaverScreen.cpp +++ b/plugins/MirandaG15/src/CScreensaverScreen.cpp @@ -5,8 +5,7 @@ //************************************************************************
// Constructor
//************************************************************************
-CScreensaverScreen::CScreensaverScreen() : m_dwActivation(0),
- m_dwDuration(0), m_iPosition(0)
+CScreensaverScreen::CScreensaverScreen()
{
}
@@ -22,7 +21,7 @@ CScreensaverScreen::~CScreensaverScreen() //************************************************************************
bool CScreensaverScreen::Initialize()
{
- if(!CScreen::Initialize())
+ if (!CScreen::Initialize())
return false;
m_Label.Initialize();
@@ -34,24 +33,21 @@ bool CScreensaverScreen::Initialize() m_Label.SetFontFaceName(L"Microsoft Sans Serif");
m_Label.SetFontPointSize(10);
m_Label.SetFontWeight(FW_BOLD);
-
+
m_Label2.SetAlignment(DT_CENTER);
m_Label2.SetWordWrap(TRUE);
m_Label2.SetText(L"");
m_Label2.SetFontFaceName(L"Microsoft Sans Serif");
m_Label2.SetFontPointSize(8);
- m_Label.SetOrigin(0,0);
- m_Label.SetSize(GetWidth(),20);
+ m_Label.SetOrigin(0, 0);
+ m_Label.SetSize(GetWidth(), 20);
- m_Label2.SetOrigin(0,23);
- m_Label2.SetSize(GetWidth(),20);
-
-
+ m_Label2.SetOrigin(0, 23);
+ m_Label2.SetSize(GetWidth(), 20);
AddObject(&m_Label);
AddObject(&m_Label2);
-
return true;
}
@@ -60,7 +56,7 @@ bool CScreensaverScreen::Initialize() //************************************************************************
bool CScreensaverScreen::Shutdown()
{
- if(!CScreen::Shutdown())
+ if (!CScreen::Shutdown())
return false;
return true;
@@ -71,19 +67,17 @@ bool CScreensaverScreen::Shutdown() //************************************************************************
bool CScreensaverScreen::Update()
{
- if(!CScreen::Update())
+ if (!CScreen::Update())
return false;
DWORD dwTimeElapsed = GetTickCount() - m_dwActivation;
int iOldPosition = m_iPosition;
- if(dwTimeElapsed > m_dwDuration)
- {
+ if (dwTimeElapsed > m_dwDuration) {
m_dwDuration = 4000;
m_Label.SetText(L"");
m_Label2.SetText(L"");
- switch(m_iPosition)
- {
+ switch (m_iPosition) {
case 0:
m_Label.SetFontPointSize(8);
m_Label.SetText(L"MirandaG15");
@@ -97,7 +91,7 @@ bool CScreensaverScreen::Update() m_dwDuration = 1800;
m_iPosition = -1;
break;
-
+
default:
CAppletManager::GetInstance()->ActivateEventScreen();
return true;
@@ -105,10 +99,10 @@ bool CScreensaverScreen::Update() m_iPosition++;
CAppletManager::GetInstance()->StartTransition(TRANSITION_MORPH);
}
-
- if(m_iPosition != iOldPosition)
+
+ if (m_iPosition != iOldPosition)
m_dwActivation = GetTickCount();
-
+
return true;
}
@@ -119,7 +113,7 @@ void CScreensaverScreen::Reset() {
m_dwDuration = 0;
m_iPosition = 0;
-
+
m_Label.SetFontPointSize(10);
m_Label.SetText(L"");
@@ -134,7 +128,7 @@ void CScreensaverScreen::Reset() //************************************************************************
bool CScreensaverScreen::Draw(CLCDGfx *pGfx)
{
- if(!CScreen::Draw(pGfx))
+ if (!CScreen::Draw(pGfx))
return false;
return true;
|