Creating Custom Overlays

Learn how to draw custom UI boxes and text directly onto the game screen using RuneLite's Overlay system.

4 steps
Progress1 / 4 steps
1

Creating the Overlay Class

Step 1 of 4

Objective

Create a new file to handle the drawing logic.

Explanation

In RuneLite, we usually keep drawing logic in a separate file to keep the code clean. 1. Create a new file in the same folder as your plugin called 'ExampleOverlay.java'. 2. This class must 'extend Overlay' and use 'PanelComponent' for that classic RuneLite look.

Your Code

java
AdvertisementSet slotId on <AdUnit /> to show ads.