Classes

Concepts

Libraries

Objects

contractor »

conversationAnswerData »

engineStatData »

issueData »

playerPlatformSpecialistData »

projectReviewConclusion »

projectReviewRemark »

randomEventData »

statusIcon »

handleClick

Description

Abstract. Called when the player clicks on the status icon.

Arguments

1 number x

the X click coordinate.

2 number y

the Y click coordinate.

3 number key

the pressed key.

Example

statusIcons.register({
	id = "level_up",
	quad = quadLoader:getQuad("level_up"),
	text = _T("STATUS_ICON_LEVEL_UP", "POINTS unspent attribute points"),
	textSingular = _T("STATUS_ICON_LEVEL_UP_SINGULAR", "1 unspent attribute point"),
	setupText = function(self, employee)
		local pts = employee:getAttributePoints()
		
		if pts > 1 then
			return _format(self.text, "POINTS", pts)
		else
			return self.textSingular
		end
	end,
	
	handleClick = function(self, x, y, key)
		if key == gui.mouseKeys.LEFT then
			local employee = statusIcons.descbox:getEmployee()
			
			if employee then
				employee:createEmployeeMenu()
			end
		end
	end
})