API Docs for:
Show:

domestic.AcceptView Class

A view for accepting a trade from a player. It inherits from misc.BaseOverlay.

Constructor

domestic.AcceptView

()

Methods

addGetResource

(
  • resource
  • amount
)

Adds a resource to the display (what the player will receive from the offer)

Parameters:

  • resource String

    the element to display (a resource: "wood","brick","sheep","wheat","ore")

  • amount Int

addGiveResource

(
  • resource
  • amount
)

Adds a resource to the display (what the player will have to give up)

Parameters:

  • resource String

    the element to display (a resource: "wood","brick","sheep","wheat","ore")

  • amount Int

closeModal

()

makes the overlay invisible

Returns:

void

setAcceptEnabled

(
  • enabled
)

Enables or disables accepting a trade

Parameters:

  • enabled Boolean

setController

(
  • controller
)

sets the Controller for the view

Parameters:

Returns:

void

setPlayerName

(
  • playerName
)

Displays the name of the player that offered the trade.

Parameters:

  • playerName String

showModal

()

makes the overlay visible

Returns:

void