-- -----------------------------------------------------------------------------
-- SimNetwork
-- statusBar.lua
-- handling code for status bar
-- -----------------------------------------------------------------------------

if not SimNetwork_GLOBAL	then dofile("global.lua")	end
if not SimNetwork_INPUT		then dofile("input.lua")	end
if not SimNetwork_DATA 		then dofile("data.lua")		end

SimNetwork_STATUSBAR = true

function createCableStatusBar(entity)
	local statusBar = E.create_pivot()
	
	statusBarGreen = create_overlay(entity.spriteGreen)
	statusBarBlue = create_overlay(entity.spriteBlue)

	--size of green bar is 100%
	E.set_entity_scale(statusBarGreen,5,1,0)
	E.set_entity_position(statusBarGreen,0,0,0)
	--size of blue bar is 0%
	E.set_entity_scale(statusBarBlue,2,1,0)
	E.set_entity_position(statusBarBlue,0,0,0)
	
	E.parent_entity(statusBarBlue,statusBar)
	E.parent_entity(statusBarGreen,statusBar)

	return statusbar

end