|
|
@ -14,6 +14,9 @@ void Window::InternalUpdate(FiestaOnlineEditor*pge,float fElapsedTime){ |
|
|
|
if(this==focusedWindow){ |
|
|
|
if(this==focusedWindow){ |
|
|
|
Update(pge,fElapsedTime); |
|
|
|
Update(pge,fElapsedTime); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(dragging){ |
|
|
|
|
|
|
|
pos=pge->GetMousePos()-dragPoint; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void Window::InternalRefresh(FiestaOnlineEditor*pge){ |
|
|
|
void Window::InternalRefresh(FiestaOnlineEditor*pge){ |
|
|
@ -55,3 +58,26 @@ void Window::Cleanup(){ |
|
|
|
delete sprWindow; |
|
|
|
delete sprWindow; |
|
|
|
delete decWindow; |
|
|
|
delete decWindow; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool Window::IsInBounds(vf2d point){ |
|
|
|
|
|
|
|
return point.x>=pos.x&&point.x<=pos.x+size.x&&point.y>=pos.y&&point.y<=pos.y+size.y+headerHeight; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Window::InternalMouseFocus(FiestaOnlineEditor*pge){ |
|
|
|
|
|
|
|
if(pge->GetMouse(0).bPressed){ |
|
|
|
|
|
|
|
if(pge->GetMouseY()<pos.y+headerHeight){ |
|
|
|
|
|
|
|
dragging=true; |
|
|
|
|
|
|
|
dragPoint=pge->GetMousePos()-pos; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(focusedWindow!=this){ |
|
|
|
|
|
|
|
Window*prevFocusedWindow=focusedWindow; |
|
|
|
|
|
|
|
focusedWindow=this; |
|
|
|
|
|
|
|
InternalRefresh(pge); |
|
|
|
|
|
|
|
prevFocusedWindow->InternalRefresh(pge); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(pge->GetMouse(0).bReleased){ |
|
|
|
|
|
|
|
dragging=false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void Window::MouseFocus(FiestaOnlineEditor*pge){} |