Descent3/ui/UIObject.cpp

67 lines
1.2 KiB
C++
Raw Normal View History

2024-04-16 03:43:29 +00:00
/*
* $Logfile: /DescentIII/Main/ui/UIObject.cpp $
* $Revision: 3 $
* $Date: 4/14/99 1:53a $
* $Author: Jeff $
*
* Generic object code
*
* $Log: /DescentIII/Main/ui/UIObject.cpp $
2024-04-16 18:56:40 +00:00
*
2024-04-16 03:43:29 +00:00
* 3 4/14/99 1:53a Jeff
* fixed case mismatched #includes
2024-04-16 18:56:40 +00:00
*
2024-04-16 03:43:29 +00:00
* 2 5/08/98 3:58p Samir
* added ability to move a UI object.
2024-04-16 18:56:40 +00:00
*
2024-04-16 03:43:29 +00:00
* 1 12/30/97 4:36p Samir
* Initial revision
2024-04-16 18:56:40 +00:00
*
2024-04-16 03:43:29 +00:00
* $NoKeywords: $
*/
#include "UIlib.h"
2024-04-16 18:56:40 +00:00
UIObject::UIObject() {
m_X = m_Y = 0;
m_W = m_H = 0;
m_Created = false;
2024-04-16 03:43:29 +00:00
}
2024-04-16 18:56:40 +00:00
UIObject::~UIObject() {}
2024-04-16 03:43:29 +00:00
// obj = NULL, then this object has no parent: it is an independent entity.
2024-04-16 18:56:40 +00:00
void UIObject::Create(int x, int y, int w, int h) {
ASSERT(!m_Created);
2024-04-16 03:43:29 +00:00
2024-04-16 18:56:40 +00:00
m_X = x;
m_Y = y;
m_W = w;
m_H = h;
m_Created = true;
2024-04-16 03:43:29 +00:00
}
// moves the object.
2024-04-16 18:56:40 +00:00
void UIObject::Move(int x, int y, int w, int h) {
m_X = x;
m_Y = y;
m_W = w;
m_H = h;
mprintf((0, "new [%d,%d]\n", m_X, m_Y));
2024-04-16 03:43:29 +00:00
}
//@@
//@@// enables ui draw commands.
//@@void UIObject::StartDraw()
//@@{
//@@ m_OwnerVP->set_clipping_rect(m_X,m_Y,m_X+m_W-1,m_Y+m_H-1);
2024-04-16 18:56:40 +00:00
//@@ ui_StartDraw(m_OwnerVP);
2024-04-16 03:43:29 +00:00
//@@}
//@@
//@@
//@@// disables ui draw commands.
//@@void UIObject::EndDraw()
//@@{
2024-04-16 18:56:40 +00:00
//@@ ui_EndDraw();
2024-04-16 03:43:29 +00:00
//@@}