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

Latest commit

 

History

History
45 lines (35 loc) · 2.68 KB

cp.choices.md

File metadata and controls

45 lines (35 loc) · 2.68 KB

docs » cp.choices


Choices Module.

Submodules

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
  • getChoices
  • new

API Documentation

Functions

Signature cp.choices.new(type) -> choices
Type Function
Description Creates a new cp.choices instance for the specified type.
Parameters
  • type - The unique ID for the type.
Returns
  • The new choices instance.

Methods

Signature cp.choices:getChoices() -> array of choices
Type Method
Description Returns the array of choices that have been added to this instance.
Parameters
  • None
Returns
  • The array of choices.
Signature cp.choices:new(choiceType) -> choices.builder
Type Method
Description Adds a new choice with the specified. Additional settings
Parameters
  • text - The text title for the choice.
Returns
  • The choice builder, added to the choices set.