Deprecated: Assigning the return value of new by reference is deprecated in /var/www/psdevWiki/inc/parserutils.php on line 161

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/psdevWiki/inc/parserutils.php on line 164

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/psdevWiki/inc/parserutils.php on line 294

Deprecated: Function split() is deprecated in /var/www/psdevWiki/inc/auth.php on line 97

Warning: Cannot modify header information - headers already sent by (output started at /var/www/psdevWiki/inc/parserutils.php:161) in /var/www/psdevWiki/inc/auth.php on line 180

Deprecated: Function split() is deprecated in /var/www/psdevWiki/inc/common.php on line 552

Warning: Cannot modify header information - headers already sent by (output started at /var/www/psdevWiki/inc/parserutils.php:161) in /var/www/psdevWiki/inc/actions.php on line 71
psp:lua_player:library:romero126:draw:battery [psDevWiki]
Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /var/www/psdevWiki/inc/template.php on line 154
 

Draw:Battery

Draw a Battery on the screen.

nil Draw:Battery(x, y, _color)
function Draw:Battery(x, y, _color)
	local x = x or 0
	local y = y or 0
	local _color = _color or Color.new(255,255,255)
	-- Draw Battery
	screen:drawLine(x+2, y, x+21, y, _color)
	screen:drawLine(x+2, y+11, x+21, y+11, _color)
	screen:drawLine(x, y+4, x, y+7, _color)
	screen:drawLine(x+1, y+4, x+1, y+7, _color)
	screen:drawLine(x+2, y, x+2, y+11, _color)
	screen:drawLine(x+21, y, x+21, y+11, _color)
 
	-- Draw Battery Info
	local Pow = math.ceil(System.powerGetBatteryLifePercent() / 33.33333)
	if (Pow > 0) then
		screen:fillRect(x+16, y+3, 3, 6, _color)
	end
	if (Pow > 1) then
		screen:fillRect(x+11, y+3, 3, 6, _color)
	end
	if (Pow > 2) then
		screen:fillRect(x+6, y+3, 3, 6, _color)						
	end
end
 

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /var/www/psdevWiki/inc/template.php on line 523
psp/lua_player/library/romero126/draw/battery.txt · Last modified: 2008/05/15 00:07
 
Recent changes RSS feed Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki