Some adaptations for 32-bit systems. Resolves #17

This commit is contained in:
Oliver 2018-01-12 08:35:30 +01:00
parent 967b863aac
commit 5f33d0cbc0
3 changed files with 3 additions and 3 deletions

View File

@ -185,7 +185,7 @@ func (i *InputField) Draw(screen tcell.Screen) {
// Draw input area.
fieldLength := i.fieldLength
if fieldLength == 0 {
fieldLength = math.MaxInt64
fieldLength = math.MaxInt32
}
if rightLimit-x < fieldLength {
fieldLength = rightLimit - x

View File

@ -450,7 +450,7 @@ func (t *TextView) reindexBuffer(width int) {
t.longestLine = 0
color := t.textColor
if !t.wrap {
width = math.MaxInt64
width = math.MaxInt32
}
for index, str := range t.buffer {
// Find all color tags in this line.

View File

@ -158,7 +158,7 @@ func Print(screen tcell.Screen, text string, x, y, maxWidth, align int, color tc
// PrintSimple prints white text to the screen at the given position.
func PrintSimple(screen tcell.Screen, text string, x, y int) {
Print(screen, text, x, y, math.MaxInt64, AlignLeft, Styles.PrimaryTextColor)
Print(screen, text, x, y, math.MaxInt32, AlignLeft, Styles.PrimaryTextColor)
}
// WordWrap splits a text such that each resulting line does not exceed the