Quote:
Originally Posted by yazuka21
Can you tell me what exact I'm going to do ? 'cuz I'm not sure if I move the right code.
Avie, Like this ?
Code:
bResult = CWndNeuz::InitDialog(g_Neuz.GetSafeHwnd(), APP_TASKBAR1920W, WBS_TOPMOST | WBS_MANAGER | WBS_SOUND, CPoint(0, 0), pWndParent);
.
And did you mean Nerf like this ?
CWndTaskbar::OnInitialUpdate
Code:
POINT_QUEUE_X = pSkill->rect.left;
POINT_QUEUE_Y = pSkill->rect.top;
g_WndMng.m_pWndTaskBar = this;
/* {
rect = g_Neuz.GetDeviceRect();
m_pWndRoot->m_rectLayout = rect;
switch( m_nPosition )
{
case TASKBAR_TOP:
rect.bottom = TASKBAR_HEIGHT;
m_pWndRoot->m_rectLayout.top = rect.bottom;
break;
case TASKBAR_BOTTOM:
rect.top = rect.bottom - TASKBAR_HEIGHT;
m_pWndRoot->m_rectLayout.bottom = rect.top;
break;
case TASKBAR_LEFT:
rect.right = TASKBAR_HEIGHT;
m_pWndRoot->m_rectLayout.left = rect.right;
break;
case TASKBAR_RIGHT:
rect.left = rect.right - TASKBAR_HEIGHT;
m_pWndRoot->m_rectLayout.right = rect.left;
break;
}
SetWndRect( rect );
}*/
const int nWidth = m_rectWindow.Width();
const int nHeight = m_rectWindow.Height();
const int x = m_pWndRoot->m_rectWindow.left + (m_pWndRoot->m_rectWindow.Width() / 2) - (nWidth / 2);
SetWndRect(CRect(x, m_pWndRoot->m_rectWindow.bottom - nHeight, x + nWidth, m_pWndRoot->m_rectWindow.bottom));
AdjustWndBase();
Thanks.
HAHAHAHAHA
|
Nice laugh. Maybe you should learn something basic with
Bitwise Operators in C
First, you remove the change to the root rect to stop it changing the world. Next, you render taskbar in front of everything.
CWndTaskbar::OnInitialUpdate
Code:
/* {
rect = g_Neuz.GetDeviceRect();
m_pWndRoot->m_rectLayout = rect;
switch( m_nPosition )
{
case TASKBAR_TOP:
rect.bottom = TASKBAR_HEIGHT;
m_pWndRoot->m_rectLayout.top = rect.bottom;
break;
case TASKBAR_BOTTOM:
rect.top = rect.bottom - TASKBAR_HEIGHT;
m_pWndRoot->m_rectLayout.bottom = rect.top;
break;
case TASKBAR_LEFT:
rect.right = TASKBAR_HEIGHT;
m_pWndRoot->m_rectLayout.left = rect.right;
break;
case TASKBAR_RIGHT:
rect.left = rect.right - TASKBAR_HEIGHT;
m_pWndRoot->m_rectLayout.right = rect.left;
break;
}
SetWndRect( rect );
}*/
Next, you want to always have the taskbar centered... right?
(CWndTaskbar::OnInitialUpdate)
Code:
int nWidth = m_rectWindow.Width();
int nHeight = m_rectWindow.Height();
int x = m_pWndRoot->m_rectWindow.left + (m_pWndRoot->m_rectWindow.Width() / 2) - (nWidth / 2);
SetWndRect(CRect(x, m_pWndRoot->m_rectWindow.bottom - nHeight, x + nWidth, m_pWndRoot->m_rectWindow.bottom));
AdjustWndBase();
Then, you want to support multiple resolution possibilities by switching == if checking to >= and <, etc.
CWndTaskbar::Initialize
Code:
if( g_Option.m_nResWidth >= 800 && g_Option.m_nResWidth < 1024)
And finally, you want to push it to the front, as taskbar should always be a front faced UI, for the most part.
Code:
bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR800, WBS_MANAGER | WBS_SOUND | WBS_NOFOCUS | WBS_TOPMOST, CPoint( 0, 0 ), pWndParent );
Edit:
But, yes, if you want the window to not be "topmost", you can open it after the world opening by moving:
below
Code:
ObjectExecutor( SHORTCUT_APPLET, APP_WORLD );
But then, the center code should still be done, and there would be no real reason to still keep the part uncommented in CWndTaskbar::OnInitialUpdate. Depends how you want your UI to be.