Add workaround for windows console

This commit is contained in:
Yasuhiro Matsumoto 2015-03-12 16:59:07 +09:00
parent 150c0ce27e
commit b5e5bd3974
6 changed files with 34 additions and 11 deletions

7
box.go
View File

@ -1,12 +1,5 @@
package termui
const TOP_RIGHT = '┐'
const VERTICAL_LINE = '│'
const HORIZONTAL_LINE = '─'
const TOP_LEFT = '┌'
const BOTTOM_RIGHT = '┘'
const BOTTOM_LEFT = '└'
type border struct {
X int
Y int

10
box_others.go Normal file
View File

@ -0,0 +1,10 @@
// +build !windows
package termui
const TOP_RIGHT = '┐'
const VERTICAL_LINE = '│'
const HORIZONTAL_LINE = '─'
const TOP_LEFT = '┌'
const BOTTOM_RIGHT = '┘'
const BOTTOM_LEFT = '└'

10
box_windows.go Normal file
View File

@ -0,0 +1,10 @@
// +build windows
package termui
const TOP_RIGHT = '+'
const VERTICAL_LINE = '|'
const HORIZONTAL_LINE = '-'
const TOP_LEFT = '+'
const BOTTOM_RIGHT = '+'
const BOTTOM_LEFT = '+'

View File

@ -2,10 +2,6 @@ package termui
import "fmt"
const VDASH = '┊'
const HDASH = '┈'
const ORIGIN = '└'
// only 16 possible combinations, why bother
var braillePatterns = map[[2]int]rune{
[2]int{0, 0}: '⣀',

7
chart_others.go Normal file
View File

@ -0,0 +1,7 @@
// +build !windows
package termui
const VDASH = '┊'
const HDASH = '┈'
const ORIGIN = '└'

7
chart_windows.go Normal file
View File

@ -0,0 +1,7 @@
// +build windows
package termui
const VDASH = '|'
const HDASH = '-'
const ORIGIN = '+'