RVAPI_ColorDialog (RV)

This project is abandoned.

Whether this project is out of date or its author marked it as abandoned, this project is no longer maintained.

If you wish to take this project over, please report it and state your intentions.

RVAPI Nice looking pickup color dialog for your projects.
Features:
1. HSB <-> RGB on the fly color conversion
2. Visual HSB color panel

Dependencies

Globals


RVAPI_ColorDialog.ColorTypes
  • COLOR_TYPE_RGB: red-green-blue color theme
  • COLOR_TYPE_RGBA: red-green-blue-alpha color theme. Will show additional "Alpha" bar

RVAPI_ColorDialog.Events
  • COLOR_EVENT_UPDATED: fires everytime user picks up a new color.
    Output:
    • Red - new color Red
    • Green - new color Green
    • Blue - new color Blue
    • Alpha - new color Alpha
  • COLOR_EVENT_CLOSED: use that event if you wish to track OnClose ColorDialog window event.
    Output:
    • ColorSaved - TRUE if "OK" button pressed, FALSE if "CANCEL" button pressed

API Functions

API_GetLink() Description: get a link information. By link we mean a pair of Owner and an owner Function values, which are unique per API_OpenDialog call. You can use those values to track the ColorDialog window visibility. Input: nothing
Output: CurrentCallbackOwner and CurrentCallbackFunction values


API_OpenDialog() Description: opens a color dialog window Input:
  • CallbackOwner - owner of the CallbackFunction. Place your addon table here, ex: MyAddon
  • CallbackFunction - callback function. Ex: MyAddon.ColorDialogCallback
  • SaveColor - save color if color dialog already opened
  • ColorR - red color
  • ColorG - green color
  • ColorB - blue color
  • ColorA - alpha
  • Layer - specific layer. It can be one of the Window.Layers constants. You can use it to make sure your color dialog is calling in modal mode.
  • ColorType - any of the RVAPI_ColorDialog.ColorTypes constants. See above.
Output: boolean value


API_CloseDialog() Description: close dialog window Input:
  • SaveColor - send the last selected color information to the CallbackFunction. In other words, use TRUE value to emulate OK button click.
Output: boolean value

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
Jan 06, 2010
Category
Last update
Mar 11, 2010
Development stage
Abandoned
License
MIT License
Downloads
7,552
Recent files

Authors