Add the ability to use models in widgets

Adds functions for setting rotation, id, and zoom of models
This commit is contained in:
Magic fTail
2018-12-16 01:23:31 +01:00
parent bb966d18a1
commit d2cd880fd3
2 changed files with 101 additions and 11 deletions

View File

@@ -240,13 +240,6 @@ public interface Widget
*/
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.
*
@@ -292,6 +285,76 @@ public interface Widget
*/
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.
* <p>

View File

@@ -65,10 +65,6 @@ public interface RSWidget extends Widget
@Import("boundsIndex")
int getBoundsIndex();
@Import("modelId")
@Override
int getModelId();
@Import("itemIds")
int[] getItemIds();
@@ -156,15 +152,46 @@ public interface RSWidget extends Widget
@Import("index")
void setIndex(int index);
@Import("modelId")
@Override
int getModelId();
@Import("modelId")
@Override
void setModelId(int modelId);
@Import("rotationX")
@Override
int getRotationX();
@Import("rotationX")
@Override
void setRotationX(int rotationX);
@Import("rotationY")
@Override
int getRotationY();
@Import("rotationY")
@Override
void setRotationY(int rotationY);
@Import("rotationZ")
@Override
int getRotationZ();
@Import("rotationZ")
@Override
void setRotationZ(int rotationZ);
@Import("modelZoom")
@Override
int getModelZoom();
@Import("modelZoom")
@Override
void setModelZoom(int modelZoom);
@Import("contentType")
@Override
int getContentType();