Drag[en]gine Script Module DragonScript 1.23
|
Default implementation of RatingModel. More...
Public Member Functions | |
Integer | getRating () |
Rating or null. | |
int | getTypeCount () |
Count of rating types. | |
DefaultRatingModel | new (int typeCount) |
Create default rating model. | |
DefaultRatingModel | new (int typeCount, Integer rating) |
Create default rating model with initial rating. | |
DefaultRatingModel | new (int typeCount, Integer rating, Dictionary countsPerType) |
Create default rating model with initial rating and counts per type. | |
void | setCountsPerType (Dictionary countsPerType) |
Set breakdown of submitted ratings per rating type. | |
void | setRating (Integer rating) |
Set rating or null. | |
![]() | |
void | addListener (RatingModelListener listener) |
Add listener. | |
Dictionary | getCountsPerType () |
Breakdown of submitted ratings per rating type. | |
void | removeListener (RatingModelListener listener) |
Remove listener. | |
Public Attributes | |
Dictionary | pCountsPerType |
Array | pListeners |
Integer | pRating |
int | pTypeCount |
Default implementation of RatingModel.
Integer Dragengine.Gui.DefaultRatingModel.getRating | ( | ) |
Rating or null.
If not null the value is in the range from 0 to getTypeCount() - 1.
Implements Dragengine.Gui.RatingModel.
int Dragengine.Gui.DefaultRatingModel.getTypeCount | ( | ) |
Count of rating types.
The maximum rating value the user can submit is getTypeCount() - 1.
Implements Dragengine.Gui.RatingModel.
DefaultRatingModel Dragengine.Gui.DefaultRatingModel.new | ( | int | typeCount | ) |
Create default rating model.
typeCount | Count of rating types. |
EInvalidParam | typeCount is less than 1 |
DefaultRatingModel Dragengine.Gui.DefaultRatingModel.new | ( | int | typeCount, |
Integer | rating | ||
) |
Create default rating model with initial rating.
typeCount | Count of rating types. |
rating | Rating in the range from 0 to getTypeCount() - 1 or null. |
EInvalidParam | typeCount is less than 1 |
DefaultRatingModel Dragengine.Gui.DefaultRatingModel.new | ( | int | typeCount, |
Integer | rating, | ||
Dictionary | countsPerType | ||
) |
Create default rating model with initial rating and counts per type.
typeCount | Count of rating types. |
rating | Rating in the range from 0 to getTypeCount() - 1 or null. |
countsPerType | Dictionary with rating type as key (int) and count for this rating type as value (float). For rating types not present in the dictionary a count of 0 will be used. |
EInvalidParam | typeCount is less than 1 |
void Dragengine.Gui.DefaultRatingModel.setCountsPerType | ( | Dictionary | countsPerType | ) |
Set breakdown of submitted ratings per rating type.
countsPerType | Dictionary with rating type as key (int) and count for this rating type as value (float). For rating types not present in the dictionary a count of 0 will be used. |
Implements Dragengine.Gui.RatingModel.
void Dragengine.Gui.DefaultRatingModel.setRating | ( | Integer | rating | ) |
Set rating or null.
rating | Rating in the range from 0 to getTypeCount() - 1 or null. |
Implements Dragengine.Gui.RatingModel.
Dictionary Dragengine.Gui.DefaultRatingModel.pCountsPerType |
Array Dragengine.Gui.DefaultRatingModel.pListeners |
Integer Dragengine.Gui.DefaultRatingModel.pRating |
int Dragengine.Gui.DefaultRatingModel.pTypeCount |