define an editor for the Graphics Display Kit texture
group GDtexture_edit_notify_templ
{
enum tile { choices = {"Clamp", "Wrap", "Boundary"}; };
enum alpha { choices = {"Replace", "Modulate", "Decal"}; };
enum filter { choices = {"Point", "Bilinear", "Trilinear"}; };
enum type { choices = {"Single Level", "Mip-Map"}; };
};
GDtexture_edit_notify_templ GDtexture_edit_templ
{
int shell_vis;
int reset;
GDtexture_templ+IPort2 &texture;
method+notify_inst+notify_val upd_func = "GDtexture_edit_update";
};
GDtexture_edit_templ GDtexture_edit
;
These templates define an editor for the Graphics Display Kit texture. GDtexture_edit_notify_templ and GDtexture_edit_templ define the elements that cause the texture editor's method to execute. GDtexture_edit is the version you instance.
As an alternative to using GDtexture_edit and having to define your own user interface for the editor, you can use TextureEditor, an application component. TextureEditor contains GDtexture_edit and defines a user interface.
The parameter controls whether the editor is active: 0 means it is not; 1 means it is.
shell_vis is only checked if the texture to which the editor is attached has changed. In this case, if shell_vis is not set to 1, the editor does not update. This inhibits updates to the editor's other subobjects -- which are normally attached to UI widgets -- when the user interface is not visible. The editor always executes when the values of the other parameters change. This means that the texture to which the editor is attached is always updated even if the user interface is not visible.
Typically you connect shell_vis to the same UIcmd object that the user selects to display the editor's user interface:
The texture map controlled by the editor. texture is a connection to an object that matches type GDtexture_templ.
This parameter controls what happens when the UV(W) values are outside the 0-1 range:
|
|
|
Clamp UV(W) values that are outside the 0-1 range. Render using the primary color. | ||
Clamp UV(W) values that are outside the 0-1 range. Render using the value at the texture's boundary. |
This parameter controls how to use the alpha value in the texture pixel to
control transparency:
|
|
|
Replace the alpha in the texture pixel with the object's transparency value | ||
Modulate the alpha in the texture pixel wth the object's transparency value |
This parameter controls the type of filtering to be done when the texure is shrunk or expanded:
|
|
|
This parameter controls what type of texture is created:
|
|
|
This parameter when set causes the texture attached to the editor to be reset to its default values.
Libraries.Graphics_Display.Editors.UI_Editors.TextureEditor