BrailleIOViewRange getMainDetailRegion(int left, int top, int width, int height) { BrailleIOViewRange bottom = new BrailleIOViewRange(left, top, width, height); bottom.SetBorder(1, 0, 0); bottom.SetMargin(1, 0, 0); bottom.SetPadding(1, 0, 0); return(bottom); }
BrailleIOViewRange getMainStatusRegion(int left, int top, int width, int height) { BrailleIOViewRange _status = new BrailleIOViewRange(left, top, width, height); _status.SetBorder(0, 0, 0, 1); _status.SetMargin(0, 0, 0, 2); _status.SetPadding(0, 0, 0, 1); return(_status); }
BrailleIOViewRange getMainTopRegion(int left, int top, int width, int height) { BrailleIOViewRange _top = new BrailleIOViewRange(left, top, width, height); _top.SetBorder(0, 0, 1); _top.SetMargin(0, 0, 1); _top.SetPadding(0, 11, 1, 0); _top.SetWidth((int)(width * 1.4)); // only that region content is not doing line breaks return(_top); }
BrailleIOViewRange getMainScreenCenter2Region(int left, int top, int width, int height) { BrailleIOViewRange center2 = new BrailleIOViewRange(left, top, width, height); center2.SetZoom(-1); center2.SetBorder(0); center2.SetContrastThreshold(STANDARD_CONTRAST_THRESHOLD); center2.SetMargin(7, 0); return(center2); }
// string path = ""; private void showExample() { BrailleIOScreen s = new BrailleIOScreen(); #region Center Region #region screenshot Image bmp = captureScreen(); #endregion BrailleIOViewRange center = new BrailleIOViewRange(0, 7, 120, 46, new bool[120, 40]); //center.Move(1,1); center.SetBitmap(bmp); center.SetZoom(-1); center.SetBorder(0); center.SetContrastThreshold(150); center.ShowScrollbars = true; s.AddViewRange("center", center); #endregion #region Top Reagion BrailleIOViewRange top = new BrailleIOViewRange(0, 0, 120, 7); top.SetBorder(0, 0, 1); top.SetMargin(0, 0, 1); top.SetPadding(0, 0, 1); top.SetText("ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\nabcdefghijklmnopqrstuvwxyz\r\n0123456789!\"#$%&<=>?@©®\r\n*+-~:;[],.'^_`(){}/|\\r\nß\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\n"); top.SetText("Tactile screen capture"); s.AddViewRange("top", top); #endregion #region Bottom Reagion BrailleIOViewRange bottom = new BrailleIOViewRange(0, 53, 120, 7); bottom.SetBorder(1, 0, 0); bottom.SetMargin(1, 0, 0); bottom.SetPadding(1, 0, 0); bottom.SetText("Detail area: status messages can be shown"); s.AddViewRange("bottom", bottom); #endregion io.AddView(BS_MAIN_NAME, s); io.ShowView(BS_MAIN_NAME); io.RenderDisplay(); }
/// <summary> /// Creates a new gamescreen /// </summary> /// <param name="ll">Language settings</param> /// <param name="width">Screen width</param> /// <param name="height">Screen height</param> public GameScreen(LL ll, int width, int height) : base("GameScreen") { this.ll = ll; this.SetWidth(width); this.SetHeight(height); mainRegion = new BrailleIOViewRange(0, 0, width, height); detailRegion = new BrailleIOViewRange(0, height - 18, width, 18); detailRegion.SetBorder(1); detailRegion.SetPadding(1); AddViewRange(mainRegion); AddViewRange(detailRegion); gameState = GameState.Exploration; }
/// <summary> /// Shows the center region in full screen (other regions are set invisible). /// </summary> /// <param name="width">The width.</param> /// <param name="height">The height.</param> /// <returns></returns> BrailleIOScreen buildFullScreen(int width, int height) { BrailleIOScreen fullScreen = new BrailleIOScreen(BS_FULLSCREEN_NAME); BrailleIOViewRange center = new BrailleIOViewRange(0, 0, width, height); center.SetZoom(-1); center.SetBorder(0); center.SetContrastThreshold(STANDARD_CONTRAST_THRESHOLD); center.ShowScrollbars = true; fullScreen.AddViewRange(VR_CENTER_NAME, center); if (io != null) { io.AddView(BS_FULLSCREEN_NAME, fullScreen); } fullScreen.SetVisibility(false); return(fullScreen); }
// string path = ""; private void showExample() { BrailleIOScreen s = new BrailleIOScreen(); #region Center Region #region screenshot Image bmp = captureScreen(); #endregion BrailleIOViewRange center = new BrailleIOViewRange(0, 0, 120, 60, new bool[120, 40]); center.SetMargin(7, 0, 0); center.Move(1, 1); center.SetBitmap(bmp); center.SetZoom(-1); center.SetBorder(0); center.SetContrastThreshold(150); s.AddViewRange("center", center); #endregion #region Top Region BrailleIOViewRange top = new BrailleIOViewRange(0, 0, 120, 7, new bool[0, 0]); top.SetBorder(0, 0, 1); top.SetMargin(0, 0, 1); top.SetPadding(0, 0, 1); top.SetText("ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\nabcdefghijklmnopqrstuvwxyz\r\n0123456789!\"#$%&<=>?@©®\r\n*+-~:;[],.'^_`(){}/|\\r\nß\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\n"); top.SetText("Tactile screen capture"); s.AddViewRange("top", top); #endregion IO.AddView(BS_MAIN_NAME, s); IO.ShowView(BS_MAIN_NAME); IO.RenderDisplay(); }
BrailleIOViewRange getMainStatusRegion(int left, int top, int width, int height) { BrailleIOViewRange _status = new BrailleIOViewRange(left, top, width, height); _status.SetBorder(0, 0, 0, 1); _status.SetMargin(0, 0, 0, 2); _status.SetPadding(0, 0, 0, 1); return _status; }
BrailleIOViewRange getMainDetailRegion(int left, int top, int width, int height) { BrailleIOViewRange bottom = new BrailleIOViewRange(left, top, width, height); bottom.SetBorder(1, 0, 0); bottom.SetMargin(1, 0, 0); bottom.SetPadding(1, 0, 0); return bottom; }
BrailleIOViewRange getMainTopRegion(int left, int top, int width, int height) { BrailleIOViewRange _top = new BrailleIOViewRange(left, top, width, height); _top.SetBorder(0, 0, 1); _top.SetMargin(0, 0, 1); _top.SetPadding(0, 11, 1, 0); _top.SetWidth((int)(width * 1.4)); // only that region content is not doing line breaks return _top; }
BrailleIOViewRange getMainScreenCenter2Region(int left, int top, int width, int height) { BrailleIOViewRange center2 = new BrailleIOViewRange(left, top, width, height); center2.SetZoom(-1); center2.SetBorder(0); center2.SetContrastThreshold(STANDARD_CONTRAST_THRESHOLD); center2.SetMargin(7, 0); return center2; }
/// <summary> /// Shows the center region in full screen (other regions are set invisible). /// </summary> /// <param name="width">The width.</param> /// <param name="height">The height.</param> /// <returns></returns> BrailleIOScreen buildFullScreen(int width, int height) { BrailleIOScreen fullScreen = new BrailleIOScreen(BS_FULLSCREEN_NAME); BrailleIOViewRange center = new BrailleIOViewRange(0, 0, width, height); center.SetZoom(-1); center.SetBorder(0); center.SetContrastThreshold(STANDARD_CONTRAST_THRESHOLD); center.ShowScrollbars = true; fullScreen.AddViewRange(VR_CENTER_NAME, center); if (io != null) io.AddView(BS_FULLSCREEN_NAME, fullScreen); fullScreen.SetVisibility(false); return fullScreen; }