public override void Draw() { // draw bg if (backColor != SVGA.color) { Graphics2D.FillRectangle(bounds, backColor); } // draw border int bs = this.style.SIZE_BORDER; uint bord = this.style.C_BORDER; if (bs > 0) { Graphics2D.DrawRectangle(bounds, bs, bord); } // draw text int shadSize = this.style.SIZE_TEXT_SHADOW; uint shadCol = this.style.C_TEXT_SHADOW; if (text.Length > 0) { if (shadSize > 0 && shadCol != SVGA.color) { Graphics2D.DrawStringShadow(x, y, text, textColor, shadCol, shadSize, Fonts.FONT_MONO); } else { Graphics2D.DrawString(x, y, text, textColor, Fonts.FONT_MONO); } } }
public override void Draw() { // update/draw controls ctrlMgr.Update(); // draw menu btn icon Graphics2D.DrawBitmap(new Rectangle(4, 4, 14, 14), Bitmap.MENU_ICON, Color.magenta, true); Graphics2D.DrawStringShadow(24, 6, "PurpleMoon OS", Color.white, Color.black, 1, Fonts.FONT_MONO_BIG); }
public override void Draw() { if (state != WindowState.minimized) { DrawWindow(); // draw icon Graphics2D.DrawBitmap(new Rectangle(x + 4, y + 26, 32, 32), Bitmap.LOGO_32, Color.magenta, true); // draw title Graphics2D.DrawStringShadow(x + 40, y + 39, Kernel.OS_NAME, Color.white, Color.black, 1, Fonts.FONT_MONO_BIG); // draw version Graphics2D.DrawStringShadow(x + 4, y + 62, "Alpha " + Kernel.OS_VER, Color.silver, Color.black, 1, Fonts.FONT_MONO); // draw kernel version Graphics2D.DrawStringShadow(x + 4, y + 74, "Kernel: " + Kernel.KERNEL_VER, Color.silver, Color.black, 1, Fonts.FONT_MONO); // draw info Graphics2D.DrawStringShadow(x + 4, y + 90, Kernel.KERNEL_INFO, Color.white, Color.black, 1, Fonts.FONT_MONO); btnExit.Draw(); } }
public override void Draw() { // get style colors uint bg = style.C_BG; uint fg = style.C_TEXT; uint bord = style.C_BORDER; uint bordOuter = style.C_BORDER_OUTER; uint bordInner = style.C_BORDER_INNER; uint fgShadow = style.C_TEXT_SHADOW; uint fgHover = style.C_TEXT_HOVER; uint fgDown = style.C_TEXT_DOWN; uint dis = style.C_DISABLED; uint shadow = style.C_SHADOW; uint hov = style.C_HOVER; uint dwn = style.C_DOWN; // get style sizes int bordSize = style.SIZE_BORDER; int shadowSize = style.SIZE_SHADOW; int fgShadowSize = style.SIZE_TEXT_SHADOW; int borderStyle = style.BORDER_STYLE; // current colors if (hover && !down) { bgCurrent = hov; bordCurrent = fgHover; } else if (hover && down) { bgCurrent = dwn; bordCurrent = fgDown; } else if (!hover && !down) { if (!toggled) { bgCurrent = bg; } else { bgCurrent = bord; } bordCurrent = bord; } if (!enabled) { bgCurrent = dis; } // draw box Graphics2D.FillRectangle(box, bgCurrent); // draw border Graphics2D.DrawRectangle(box, 1, bordCurrent); // draw text if (text.Length > 0 && this.txtWidth > 0) { if (fgShadowSize > 0) { if (font == FontIndex.mono7x9) { Graphics2D.DrawStringShadow(x + box.width + 8, y + 2, text, fg, fgShadow, fgShadowSize, Fonts.FONT_MONO); } } else { if (font == FontIndex.mono7x9) { Graphics2D.DrawString(x + box.width + 8, y + 2, text, fg, Fonts.FONT_MONO); } } } }