Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

MOAITextBox text became white blocks after system update popup or app suspend on Android #627

Closed
JohnCopic opened this Issue · 2 comments

4 participants

@JohnCopic

A MOAITextBox on screen did not restore properly after an app suspend and resume on Android, or after a system pop up

Code as follows:

--main.lua
...
viewport = MOAIViewport.new ()
viewport:setSize ( 800, 600 )
viewport:setScale( 800, -600 )

layer = MOAILayer2D.new ()
layer:setViewport ( viewport )

MOAISim.pushRenderPass ( layer )
MOAISim.openWindow ( "GAME!", 800, 600 )

dofile ( "score.lua" )
...
drawScore()

-- main.lua end

-- score.lua

score = 0

font = MOAIFont.new ()
font:loadFromTTF ( "gfx/arialbd.ttf", " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,.?!", 12, 163 )

textbox = MOAITextBox.new ()
textbox:setFont ( font )
textbox:setRect ( 0, 0, 400, 80 )
textbox:setLoc ( -380, -280 )
textbox:setYFlip ( false )
textbox:setAlignment ( MOAITextBox.LEFT_JUSTIFY )
layer:insertProp ( textbox )

function drawScore ()
local scoreString = string.format("%08d", score);
textbox:setString ( scoreString )
textbox:revealAll ()
end

--score.lua end

@patrickmeehan patrickmeehan was assigned
@ggsonic

encounter this problem too. with a earlier version source code fetched from origin/master on Dec7 2012,it works fine! But with a later version fetched on Feb7 2013 ,this problem happens. Hoping this bug can be fixed ASAP, and many Thanks for moai team's great work!

@adamvillalobos
Collaborator

Fixed with 7605c75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.