Add the ability to use models in widgets
Adds functions for setting rotation, id, and zoom of models
This commit is contained in:
@@ -240,13 +240,6 @@ public interface Widget
|
|||||||
*/
|
*/
|
||||||
void setName(String name);
|
void setName(String name);
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the model ID displayed in the widget.
|
|
||||||
*
|
|
||||||
* @return the model ID
|
|
||||||
*/
|
|
||||||
int getModelId();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the sprite ID displayed in the widget.
|
* Gets the sprite ID displayed in the widget.
|
||||||
*
|
*
|
||||||
@@ -292,6 +285,76 @@ public interface Widget
|
|||||||
*/
|
*/
|
||||||
int getIndex();
|
int getIndex();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the model ID displayed in the widget.
|
||||||
|
*
|
||||||
|
* @return the model ID
|
||||||
|
*/
|
||||||
|
int getModelId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the model ID displayed in the widget
|
||||||
|
*
|
||||||
|
* @param modelId the new model ID
|
||||||
|
*/
|
||||||
|
void setModelId(int modelId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the x rotation of the model displayed in the widget
|
||||||
|
*
|
||||||
|
* @return the x rotation
|
||||||
|
*/
|
||||||
|
int getRotationX();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the x rotation of the model displayed in the widget
|
||||||
|
*
|
||||||
|
* @param rotationX 0 = no rotation, 2047 = full rotation, outside range = crash
|
||||||
|
*/
|
||||||
|
void setRotationX(int rotationX);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the y rotation of the model displayed in the widget
|
||||||
|
*
|
||||||
|
* @return the y rotation
|
||||||
|
*/
|
||||||
|
int getRotationY();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the y rotation of the model displayed in the widget
|
||||||
|
*
|
||||||
|
* @param rotationY 0 = no rotation, 2047 = full rotation, outside range = crash
|
||||||
|
*/
|
||||||
|
void setRotationY(int rotationY);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the z rotation of the model displayed in the widget
|
||||||
|
*
|
||||||
|
* @return the z rotation
|
||||||
|
*/
|
||||||
|
int getRotationZ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the z rotation of the model displayed in the widget
|
||||||
|
*
|
||||||
|
* @param rotationZ 0 = no rotation, 2047 = full rotation, outside range = crash
|
||||||
|
*/
|
||||||
|
void setRotationZ(int rotationZ);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the amount zoomed in on the model displayed in the widget
|
||||||
|
*
|
||||||
|
* @return the amount zoomed in
|
||||||
|
*/
|
||||||
|
int getModelZoom();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the amount zoomed in on the model displayed in the widget
|
||||||
|
*
|
||||||
|
* @param modelZoom the new zoom amount
|
||||||
|
*/
|
||||||
|
void setModelZoom(int modelZoom);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the location the widget is being drawn on the canvas.
|
* Gets the location the widget is being drawn on the canvas.
|
||||||
* <p>
|
* <p>
|
||||||
|
|||||||
@@ -65,10 +65,6 @@ public interface RSWidget extends Widget
|
|||||||
@Import("boundsIndex")
|
@Import("boundsIndex")
|
||||||
int getBoundsIndex();
|
int getBoundsIndex();
|
||||||
|
|
||||||
@Import("modelId")
|
|
||||||
@Override
|
|
||||||
int getModelId();
|
|
||||||
|
|
||||||
@Import("itemIds")
|
@Import("itemIds")
|
||||||
int[] getItemIds();
|
int[] getItemIds();
|
||||||
|
|
||||||
@@ -156,15 +152,46 @@ public interface RSWidget extends Widget
|
|||||||
@Import("index")
|
@Import("index")
|
||||||
void setIndex(int index);
|
void setIndex(int index);
|
||||||
|
|
||||||
|
@Import("modelId")
|
||||||
|
@Override
|
||||||
|
int getModelId();
|
||||||
|
|
||||||
|
@Import("modelId")
|
||||||
|
@Override
|
||||||
|
void setModelId(int modelId);
|
||||||
|
|
||||||
@Import("rotationX")
|
@Import("rotationX")
|
||||||
|
@Override
|
||||||
int getRotationX();
|
int getRotationX();
|
||||||
|
|
||||||
|
@Import("rotationX")
|
||||||
|
@Override
|
||||||
|
void setRotationX(int rotationX);
|
||||||
|
|
||||||
@Import("rotationY")
|
@Import("rotationY")
|
||||||
|
@Override
|
||||||
int getRotationY();
|
int getRotationY();
|
||||||
|
|
||||||
|
@Import("rotationY")
|
||||||
|
@Override
|
||||||
|
void setRotationY(int rotationY);
|
||||||
|
|
||||||
@Import("rotationZ")
|
@Import("rotationZ")
|
||||||
|
@Override
|
||||||
int getRotationZ();
|
int getRotationZ();
|
||||||
|
|
||||||
|
@Import("rotationZ")
|
||||||
|
@Override
|
||||||
|
void setRotationZ(int rotationZ);
|
||||||
|
|
||||||
|
@Import("modelZoom")
|
||||||
|
@Override
|
||||||
|
int getModelZoom();
|
||||||
|
|
||||||
|
@Import("modelZoom")
|
||||||
|
@Override
|
||||||
|
void setModelZoom(int modelZoom);
|
||||||
|
|
||||||
@Import("contentType")
|
@Import("contentType")
|
||||||
@Override
|
@Override
|
||||||
int getContentType();
|
int getContentType();
|
||||||
|
|||||||
Reference in New Issue
Block a user