project: we are actually up to date now, thanks blue!
This commit is contained in:
@@ -526,6 +526,16 @@ public interface Client extends GameShell
|
||||
@Nullable
|
||||
Widget getWidget(int groupId, int childId);
|
||||
|
||||
/**
|
||||
* Gets a widget by it's packed ID.
|
||||
*
|
||||
* <p>
|
||||
* Note: Use {@link #getWidget(WidgetInfo)} or {@link #getWidget(int, int)} for
|
||||
* a more readable version of this method.
|
||||
*/
|
||||
@Nullable
|
||||
Widget getWidget(int packedID);
|
||||
|
||||
/**
|
||||
* Gets an array containing the x-axis canvas positions
|
||||
* of all widgets.
|
||||
@@ -784,6 +794,15 @@ public interface Client extends GameShell
|
||||
*/
|
||||
void setVarbit(Varbits varbit, int value);
|
||||
|
||||
/**
|
||||
* Gets the varbit composition for a given varbit id
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Nullable
|
||||
VarbitComposition getVarbit(int id);
|
||||
|
||||
/**
|
||||
* Gets the value of a given variable.
|
||||
*
|
||||
@@ -817,10 +836,11 @@ public interface Client extends GameShell
|
||||
void setVarbitValue(int[] varps, int varbit, int value);
|
||||
|
||||
/**
|
||||
* Gets the varbit composition for a given varbit id
|
||||
* Mark the given varp as changed, causing var listeners to be
|
||||
* triggered next tick
|
||||
* @param varp
|
||||
*/
|
||||
@Nullable
|
||||
VarbitComposition getVarbitDefinition(int id);
|
||||
void queueChangedVarp(int varp);
|
||||
|
||||
/**
|
||||
* Gets the widget flags table.
|
||||
@@ -898,16 +918,6 @@ public interface Client extends GameShell
|
||||
*/
|
||||
IterableHashTable<MessageNode> getMessages();
|
||||
|
||||
/**
|
||||
* Gets the viewport widget.
|
||||
* <p>
|
||||
* The viewport is the area of the game above the chatbox
|
||||
* and to the left of the mini-map.
|
||||
*
|
||||
* @return the viewport widget
|
||||
*/
|
||||
Widget getViewportWidget();
|
||||
|
||||
/**
|
||||
* Gets the object composition corresponding to an objects ID.
|
||||
*
|
||||
@@ -926,6 +936,18 @@ public interface Client extends GameShell
|
||||
*/
|
||||
NPCComposition getNpcDefinition(int npcId);
|
||||
|
||||
/**
|
||||
* Gets the {@link StructComposition} for a given struct ID
|
||||
*
|
||||
* @see StructID
|
||||
*/
|
||||
StructComposition getStructComposition(int structID);
|
||||
|
||||
/**
|
||||
* Gets the client's cache of in memory struct compositions
|
||||
*/
|
||||
NodeCache getStructCompositionCache();
|
||||
|
||||
/**
|
||||
* Gets an array of all world areas
|
||||
*
|
||||
@@ -1017,6 +1039,18 @@ public interface Client extends GameShell
|
||||
*/
|
||||
List<GraphicsObject> getGraphicsObjects();
|
||||
|
||||
/**
|
||||
* Gets the music volume
|
||||
* @return volume 0-255 inclusive
|
||||
*/
|
||||
int getMusicVolume();
|
||||
|
||||
/**
|
||||
* Sets the music volume
|
||||
* @param volume 0-255 inclusive
|
||||
*/
|
||||
void setMusicVolume(int volume);
|
||||
|
||||
/**
|
||||
* Play a sound effect at the player's current location. This is how UI,
|
||||
* and player-generated (e.g. mining, woodcutting) sound effects are
|
||||
@@ -1160,6 +1194,20 @@ public interface Client extends GameShell
|
||||
*/
|
||||
String[] getStringStack();
|
||||
|
||||
/**
|
||||
* Gets the cs2 vm's active widget
|
||||
*
|
||||
* This is used for all {@code cc_*} operations with a {@code 0} operand
|
||||
*/
|
||||
Widget getScriptActiveWidget();
|
||||
|
||||
/**
|
||||
* Gets the cs2 vm's "dot" widget
|
||||
*
|
||||
* This is used for all {@code .cc_*} operations with a {@code 1} operand
|
||||
*/
|
||||
Widget getScriptDotWidget();
|
||||
|
||||
/**
|
||||
* Checks whether a player is on the friends list.
|
||||
*
|
||||
@@ -1329,11 +1377,21 @@ public interface Client extends GameShell
|
||||
* <p>
|
||||
* This method must be ran on the client thread and is not reentrant
|
||||
*
|
||||
* This method is shorthand for {@code client.createScriptEvent(args).run()}
|
||||
*
|
||||
* @param args the script id, then any additional arguments to execute the script with
|
||||
* @see ScriptID
|
||||
*/
|
||||
void runScript(Object... args);
|
||||
|
||||
/**
|
||||
* Creates a blank ScriptEvent for executing a ClientScript2 script
|
||||
*
|
||||
* @param args the script id, then any additional arguments to execute the script with
|
||||
* @see ScriptID
|
||||
*/
|
||||
ScriptEvent createScriptEvent(Object ...args);
|
||||
|
||||
/**
|
||||
* Checks whether or not there is any active hint arrow.
|
||||
*
|
||||
@@ -2063,20 +2121,4 @@ public interface Client extends GameShell
|
||||
void setOutdatedScript(String outdatedScript);
|
||||
|
||||
List<String> getOutdatedScripts();
|
||||
|
||||
void queueChangedVarp(int varp);
|
||||
|
||||
VarbitComposition getVarbit(int id);
|
||||
|
||||
Widget getWidget(int param1);
|
||||
|
||||
Widget getScriptActiveWidget();
|
||||
|
||||
ScriptEvent createScriptEvent(Object[] args);
|
||||
|
||||
int getViewportColor();
|
||||
|
||||
NodeCache getStructCompositionCache();
|
||||
|
||||
void setMusicVolume(int i);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import javax.annotation.Nullable;
|
||||
/**
|
||||
* Represents the template of a specific item type.
|
||||
*/
|
||||
public interface ItemComposition
|
||||
public interface ItemComposition extends ParamHolder
|
||||
{
|
||||
/**
|
||||
* Gets the items name.
|
||||
|
||||
@@ -27,4 +27,5 @@ package net.runelite.api;
|
||||
public interface IterableHashTable<T extends Node> extends Iterable<T>
|
||||
{
|
||||
T get(long hash);
|
||||
void put(T node, long hash);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ package net.runelite.api;
|
||||
/**
|
||||
* Information about a specific {@link NpcID}
|
||||
*/
|
||||
public interface NPCComposition
|
||||
public interface NPCComposition extends ParamHolder
|
||||
{
|
||||
/**
|
||||
* Gets the name of the NPC.
|
||||
|
||||
@@ -27,7 +27,7 @@ package net.runelite.api;
|
||||
/**
|
||||
* Information about a specific {@link ObjectID}
|
||||
*/
|
||||
public interface ObjectComposition
|
||||
public interface ObjectComposition extends ParamHolder
|
||||
{
|
||||
/**
|
||||
* Gets ID for the object.
|
||||
|
||||
@@ -43,15 +43,27 @@ public interface Preferences
|
||||
*/
|
||||
void setRememberedUsername(String username);
|
||||
|
||||
/**
|
||||
* Gets the sound effect volume
|
||||
* @return volume 0-127 inclusive
|
||||
*/
|
||||
int getSoundEffectVolume();
|
||||
|
||||
void setSoundEffectVolume(int i);
|
||||
/**
|
||||
* Sets the sound effect volume
|
||||
* @param volume 0-127 inclusive
|
||||
*/
|
||||
void setSoundEffectVolume(int volume);
|
||||
|
||||
/**
|
||||
* Gets the area sound effect volume
|
||||
* @return volume 0-127 inclusive
|
||||
*/
|
||||
int getAreaSoundEffectVolume();
|
||||
|
||||
void setAreaSoundEffectVolume(int i);
|
||||
|
||||
int getMusicVolume();
|
||||
|
||||
void setClientMusicVolume(int i);
|
||||
/**
|
||||
* Sets the area sound effect volume
|
||||
* @param volume 0-127 inclusive
|
||||
*/
|
||||
void setAreaSoundEffectVolume(int volume);
|
||||
}
|
||||
|
||||
@@ -348,6 +348,20 @@ public final class ScriptID
|
||||
@ScriptArguments()
|
||||
public static final int BANKMAIN_SEARCHING = 514;
|
||||
|
||||
/**
|
||||
* Chooses the click handler for a {@link ParamID#SETTING_SLIDER_CUSTOM_ONOP} = 1 settings slider
|
||||
*
|
||||
* The active widget is set to the track created by {@link ParamID#SETTING_FOREGROUND_CLICKZONE}
|
||||
* <ul>
|
||||
* <li>int {@link ParamID#SETTING_ID}</li>
|
||||
* <li>int (WidgetID) Slider handle ID</li>
|
||||
* <li>int (widget index) Slider handle index</li>
|
||||
* <li>int track width</li>
|
||||
* <li>int y offset</li>
|
||||
* <li>int x offset</li>
|
||||
* <li>int (WidgetID) drag parent</li>
|
||||
* </ul>
|
||||
*/
|
||||
@ScriptArguments(integer = 7)
|
||||
public static final int SETTINGS_SLIDER_CHOOSE_ONOP = 3885;
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Adam <Adam@sigterm.info>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.api.events;
|
||||
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* An event where the hidden state of a {@link Widget} has been modified.
|
||||
*/
|
||||
@Data
|
||||
public class WidgetHiddenChanged implements Event
|
||||
{
|
||||
/**
|
||||
* The affected widget.
|
||||
*/
|
||||
private Widget widget;
|
||||
/**
|
||||
* The new hidden state of the widget.
|
||||
*/
|
||||
private boolean hidden;
|
||||
}
|
||||
@@ -72,9 +72,6 @@ public interface Callbacks
|
||||
*/
|
||||
void drawAboveOverheads();
|
||||
|
||||
void drawLayer(Widget layer, List<WidgetItem> widgetItems);
|
||||
|
||||
void drawInterface(int interfaceId, List<WidgetItem> widgetItems);
|
||||
/**
|
||||
* Client top-most draw method, rendering over top of most of game interfaces.
|
||||
*
|
||||
@@ -85,6 +82,20 @@ public interface Callbacks
|
||||
*/
|
||||
void draw(MainBufferProvider mainBufferProvider, Graphics graphics, int x, int y);
|
||||
|
||||
/**
|
||||
* Called after an interface has been drawn
|
||||
* @param interfaceId the interface id
|
||||
* @param widgetItems Widget items within the interface
|
||||
*/
|
||||
void drawInterface(int interfaceId, List<WidgetItem> widgetItems);
|
||||
|
||||
/**
|
||||
* Called after a widget layer has been drawn
|
||||
* @param layer The layer
|
||||
* @param widgetItems Widget items within the layer
|
||||
*/
|
||||
void drawLayer(Widget layer, List<WidgetItem> widgetItems);
|
||||
|
||||
/**
|
||||
* Mouse pressed event. If this event will be consumed it will not be propagated further to client.
|
||||
*
|
||||
|
||||
@@ -70,6 +70,10 @@ public interface Widget
|
||||
|
||||
int getButtonType();
|
||||
|
||||
boolean isWidgetItemDragged(int index);
|
||||
|
||||
Point getWidgetItemDragOffsets();
|
||||
|
||||
/**
|
||||
* Gets the type of content displayed by the widget.
|
||||
*/
|
||||
@@ -1017,16 +1021,6 @@ public interface Widget
|
||||
*/
|
||||
void setOnReleaseListener(Object ...args);
|
||||
|
||||
boolean isWidgetItemDragged(int index);
|
||||
|
||||
Point getWidgetItemDragOffsets();
|
||||
|
||||
static boolean getDragParent(Widget widget)
|
||||
{
|
||||
System.out.println("ERROR: IMPLEMENT"); //Would throw but that breaks widget inspector
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a script to be ran when a drag operation is finished on this widget
|
||||
*
|
||||
@@ -1057,5 +1051,4 @@ public interface Widget
|
||||
* @param args A ScriptID, then the args for the script
|
||||
*/
|
||||
void setOnVarTransmitListener(Object ...args);
|
||||
}
|
||||
}
|
||||
@@ -927,7 +927,6 @@ public enum WidgetInfo
|
||||
|
||||
HEALTH_OVERLAY_BAR(WidgetID.HEALTH_OVERLAY_BAR_GROUP_ID, WidgetID.EncounterHealthBar.CONTAINER),
|
||||
SETTINGS_INIT(WidgetID.SETTINGS_GROUP_ID, WidgetID.Settings.INIT),
|
||||
SETTINGS_SIDE_CAMERA_ZOOM_SLIDER_TRACK(WidgetID.SETTINGS_SIDE_GROUP_ID, WidgetID.SettingsSide.CAMERA_ZOOM_SLIDER_TRACK),
|
||||
TRAILBLAZER_AREA_TELEPORT(WidgetID.TRAILBLAZER_AREAS_GROUP_ID, WidgetID.TrailblazerAreas.TELEPORT),
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user