void write_status(const wchar_t *text) { MGLrect dims; mglGetDimensions(NULL, &dims); glSetColour(0x336699); dims.left = SCN_WID * 48; glFillRect(dims.left, dims.top, dims.right, dims.bottom); RectInflate(&dims, -48, -48); glSetColour(0x000000); glDrawText(&dims, text, -1); }
void TFormMain::CellDraw(int x, int y) { cell_t* cell = &yeti->cells[y][x]; TRect r = RectNormalize(&Selection); if (x >= r.Left && y >= r.Top && x <= r.Right && y <= r.Bottom) { PaintBox->Canvas->Pen->Color = clWhite; } else { PaintBox->Canvas->Pen->Color = clBlack; } r = CellRect(x, y); if (CELL_IS_SOLID(cell)) { PaintBox->Canvas->Brush->Color = clRed; } else { int s = ((cell->top - cell->bot) >> 4); PaintBox->Canvas->Brush->Color = (TColor) RGB(s, s, s); } PaintBox->Canvas->Rectangle(r); if (cell->swi & CELL_SWI_LIGHT) { PaintBox->Canvas->Pen->Color = clWhite; PaintBox->Canvas->Rectangle(RectInflate(&r, -4, -4)); } if (cell->ent) { PaintBox->Canvas->Pen->Color = clLime; PaintBox->Canvas->Brush->Style = bsClear; PaintBox->Canvas->Ellipse(RectInflate(&r, -1, -1)); } }