blob: 28b7b2f39b2f170488841046dd10354c60dd153e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
/*
* AboutDialog.h
* -------------
* Purpose: About dialog with credits, system information and a fancy demo effect.
* Notes : (currently none)
* Authors: OpenMPT Devs
* The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
*/
#pragma once
#include "openmpt/all/BuildSettings.hpp"
OPENMPT_NAMESPACE_BEGIN
class RawGDIDIB;
class CRippleBitmap: public CWnd
{
public:
static constexpr DWORD UPDATE_INTERVAL = 15; // milliseconds
protected:
BITMAPINFOHEADER m_bi;
std::unique_ptr<RawGDIDIB> m_bitmapSrc, m_bitmapTarget;
std::vector<int32> m_offset1, m_offset2;
int32 *m_frontBuf, *m_backBuf;
DWORD m_lastFrame = 0; // Time of last frame
DWORD m_lastRipple = 0; // Time of last added ripple
bool m_frame = false; // Backbuffer toggle
bool m_damp = true; // Ripple damping status
bool m_activity = true; // There are actually some ripples
bool m_showMouse = true;
public:
CRippleBitmap();
~CRippleBitmap();
bool Animate();
protected:
void OnPaint();
BOOL OnEraseBkgnd(CDC *) { return TRUE; }
void OnMouseMove(UINT nFlags, CPoint point);
void OnMouseHover(UINT nFlags, CPoint point) { OnMouseMove(nFlags, point); }
void OnMouseLeave();
DECLARE_MESSAGE_MAP()
};
class CAboutDlg: public CDialog
{
protected:
CRippleBitmap m_bmp;
CTabCtrl m_Tab;
CEdit m_TabEdit;
UINT_PTR m_TimerID = 0;
static constexpr UINT_PTR TIMERID_ABOUT_DEFAULT = 3;
public:
static CAboutDlg *instance;
~CAboutDlg();
// Implementation
protected:
BOOL OnInitDialog() override;
void OnOK() override;
void OnCancel() override;
DECLARE_MESSAGE_MAP();
void DoDataExchange(CDataExchange* pDX) override;
afx_msg void OnTabChange(NMHDR *pNMHDR, LRESULT *pResult);
void OnTimer(UINT_PTR nIDEvent);
public:
static mpt::ustring GetTabText(int tab);
};
OPENMPT_NAMESPACE_END
|