// NOTE: FG/BG colors are hard-wired
//
-DraggableWindow::DraggableWindow(uint32 x/*= 0*/, uint32 y/*= 0*/, uint32 w/*= 0*/, uint32 h/*= 0*/,
+DraggableWindow::DraggableWindow(uint32_t x/*= 0*/, uint32_t y/*= 0*/, uint32_t w/*= 0*/, uint32_t h/*= 0*/,
void (* f)(Element *)/*= NULL*/):
Element(x, y, w, h, 0x4D, 0xFF, 0x84, 0xFF, 0x1F, 0x84, 0x84, 0xFF), handler(f),
clicked(false),
list.push_back(closeButton);
#ifdef BACKGROUND_IMG_TEST
-uint16 imgWidth = (floppyDiskImg[0] << 8) | floppyDiskImg[1];
-uint16 imgHeight = (floppyDiskImg[2] << 8) | floppyDiskImg[3];
+uint16_t imgWidth = (floppyDiskImg[0] << 8) | floppyDiskImg[1];
+uint16_t imgHeight = (floppyDiskImg[2] << 8) | floppyDiskImg[3];
img = SDL_CreateRGBSurfaceFrom(&floppyDiskImg[4], imgWidth, imgHeight, 32, imgWidth * 4,
MASK_R, MASK_G, MASK_B, MASK_A);
#endif
DraggableWindow::~DraggableWindow()
{
- for(uint32 i=0; i<list.size(); i++)
+ for(uint32_t i=0; i<list.size(); i++)
if (list[i])
delete list[i];
SDL_FreeSurface(cbHover);
}
-void DraggableWindow::HandleKey(SDLKey key)
+void DraggableWindow::HandleKey(SDL_Scancode key)
{
- if (key == SDLK_ESCAPE)
+ if (key == SDL_SCANCODE_ESCAPE)
{
SDL_Event event;
event.type = SDL_USEREVENT, event.user.code = WINDOW_CLOSE;
}
// Handle the items this window contains...
- for(uint32 i=0; i<list.size(); i++)
+ for(uint32_t i=0; i<list.size(); i++)
list[i]->HandleKey(key);
}
-void DraggableWindow::HandleMouseMove(uint32 x, uint32 y)
+void DraggableWindow::HandleMouseMove(uint32_t x, uint32_t y)
{
if (clicked)
{
}
// Handle the items this window contains...
- for(uint32 i=0; i<list.size(); i++)
+ for(uint32_t i=0; i<list.size(); i++)
// Make coords relative to upper right corner of this window...
list[i]->HandleMouseMove(x - extents.x, y - extents.y);
}
-void DraggableWindow::HandleMouseButton(uint32 x, uint32 y, bool mouseDown)
+void DraggableWindow::HandleMouseButton(uint32_t x, uint32_t y, bool mouseDown)
{
clicked = false;
}
// Handle the items this window contains...
- for(uint32 i=0; i<list.size(); i++)
+ for(uint32_t i=0; i<list.size(); i++)
{
// Make coords relative to upper right corner of this window...
list[i]->HandleMouseButton(x - extents.x, y - extents.y, mouseDown);
SDL_FillRect(screen, &(*i), bgColor);
// Handle the items this window contains...
- for(uint32 i=0; i<list.size(); i++)
+ for(uint32_t i=0; i<list.size(); i++)
list[i]->Draw();
#else
// These are *always* top level and parentless, so no need to traverse up through
SDL_BlitSurface(img, &src, screen, &dst);
extern char textChar2e[];
- uint8 * fontAddr = (uint8 *)textChar2e + ((128 + 32) * 7 * 8);
+ uint8_t * fontAddr = (uint8_t *)textChar2e + ((128 + 32) * 7 * 8);
SetNewFont(Font(fontAddr, 7, 8));
DrawStringOpaque(screen, extents.x + 8, extents.y + 6, 0xFF000000, 0xFFFFFFFF, "Ultima III - Boo");
DrawStringOpaque(screen, extents.x + 8, extents.y + 14, 0xFF000000, 0xFFFFFFFF, "0123456789012345");
#endif
// Handle the items this window contains...
- for(uint32 i=0; i<list.size(); i++)
+ for(uint32_t i=0; i<list.size(); i++)
list[i]->Draw();
#endif