Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
69 lines (57 loc) · 4.97 KB

cp.choices.builder.md

File metadata and controls

69 lines (57 loc) · 4.97 KB

docs » cp.choices.builder


Choices Builder Module.

API Overview

  • Functions - API calls offered directly by the extension
  • new
  • Methods - API calls which can only be made on an object returned by a constructor
  • id
  • image
  • params
  • subText
  • text

API Documentation

Functions

Signature cp.choices.builder.new(choiceType) -> builder
Type Function
Description Creates a new choice builder instance.
Parameters
  • choice - The choice instance to configure.
Returns
  • The new choice builder.

Methods

Signature cp.choices.builder:id(value) -> builder
Type Method
Description Sets the ID of the choice.
Parameters
  • value - The ID.
Returns
  • The choice builder.
Signature cp.choices.builder:image(value) -> builder
Type Method
Description Sets the image of the choice.
Parameters
  • value - A hs.image image object that will be displayed next to the choice
Returns
  • The choice builder.
Signature cp.choices.builder:params(value) -> builder
Type Method
Description Specifies a table of parameter values for the choice. These
Parameters
  • value - The table of parameters.
Returns
  • The choice builder, added to the choices set.
Signature cp.choices.builder:subText(value) -> builder
Type Method
Description Specifies the subText value for the choice being built.
Parameters
  • value - The subText title for the choice.
Returns
  • The choice builder.
Signature cp.choices.builder:text(value) -> builder
Type Method
Description Specifies the text value for the choice being built.
Parameters
  • value - The text title for the choice.
Returns
  • The choice builder, added to the choices set.