//NewNotification returns a new Notification display
func NewNotification(x, y, width, height int, level *tl.BaseLevel) *Notification {
	notification := Notification{
		Status: *NewStatus(x, y, width, height, level),
	}

	notification.textLine1 = tl.NewText(x, y, "No notifications", tl.ColorWhite, tl.ColorBlack)
	notification.textLine2 = tl.NewText(x, y, "", tl.ColorWhite, tl.ColorBlack)
	notification.textLine3 = tl.NewText(x, y, "", tl.ColorWhite, tl.ColorBlack)
	notification.textLine4 = tl.NewText(x, y, "", tl.ColorWhite, tl.ColorBlack)

	return &notification
}
Exemple #2
0
//NewPlayerStatus creates a new status display for the specified PlayerMech
func NewPlayerStatus(x, y, width, height int, playerMech *mech.PlayerMech, level *tl.BaseLevel) *Player {
	playerStatus := Player{
		Status: *NewStatus(x, y, width, height, level),
		player: playerMech,
	}

	playerStatus.textLine1 = tl.NewText(x, y, "line1", tl.ColorWhite, tl.ColorBlack)
	playerStatus.textLine2 = tl.NewText(x, y, "line2", tl.ColorWhite, tl.ColorBlack)
	playerStatus.textLine3 = tl.NewText(x, y, "line3", tl.ColorWhite, tl.ColorBlack)
	playerStatus.textLine4 = tl.NewText(x, y, "line4", tl.ColorWhite, tl.ColorBlack)
	playerStatus.textLine5 = tl.NewText(x, y, "line5", tl.ColorWhite, tl.ColorBlack)
	playerStatus.textLine6 = tl.NewText(x, y, "line6", tl.ColorWhite, tl.ColorBlack)
	playerStatus.textLine7 = tl.NewText(x, y, "line7", tl.ColorWhite, tl.ColorBlack)
	playerStatus.textLine8 = tl.NewText(x, y, "line7", tl.ColorWhite, tl.ColorBlack)

	return &playerStatus
}