RUST Magic Panel v1.0.8

No permission to download
You can download a maximum of 0 files within 24 hours

About​

Magic Panel is a 100% API driven panel display plugin for Rust. Each panel is a separate plugin that will register how that panel will function. Panels dynamically position themselves within a dock based on the dock assigned and the order specified.

Configuration​

The settings and options can be configured in the MagicPanel file under the config directory. The use of an editor and validator is recommended to avoid formatting issues and syntax errors.

Config location​

The config for MagicPanel and all associated panels can be found in the following path: oxide/config/MagicPanel/MagicPanel.json

Default Configuration​

Code:
Please, Log in or Register to view codes content!

Configuration Options​

MagicPanel.json Explanation​


Individual Panel Config Explanation​


Panel Alignment​

  • Left: The x Position will be the left position for the dock
  • Center: The x Position will be the the middle of the dock
  • Right: The x Position will be the right position for the dock
    • The order of the panel will be reversed with the right most panel being the lowest order value

Dock Positioning / Size​

Position​

The dock postion is controlled by the X Position and Y Start Position fields in the configuration.
The values range between 0 and 1. The bottom left of the screen is X: 0, Y: 0 and the top right is X: 1, Y: 1.
The middle of the screen would be X: 0.5, Y: 0.5
The Y position is the bottom position of the dock.
The X position depends on the panel alignment.
If the panel alignment is left then it will be the left most position.
If the panel alignment is center then it will be the middle of the dock.
If the panel alignment is right then it will be the right most position of the dock.

Size​

The size of the panel is control by the hight and number of panels. The height tall the dock will be and the panels will scale to this height.

The width is dynamically calculated based on the number of panels and the dock padding.

Panel Order​

Panels are dynamically placed into a dock based on their order specified in each panels configuration.
This order will be left being the lowest value for both left and center.
For right alignment docks the right will be the lowest value.

Chat Commands​

  • /mp - shows the magic panel help text
  • /mp off- hides all panels for the player
  • /mp on - shows all panels to the player

Localization​

The default messages are in the MagicPanel file under the lang/en directory. To add support for another language, create a new language folder (e.g. de for German) if not already created, copy the default language file to the new folder and then customize the messages.
Code:
Please, Log in or Register to view codes content!

Developer API​

There are two types of panels for Magic Panel. A global panel which displays the same data to every player and a player panel which displays data only to a specific player

Classes needed for the API​

These classes are used when sending information to Magic Panel and should be added to your Panel Plugin

Registration for the API​

JSON serialized and sent to Magic Panel. This tells Magic Panel information about the panel itself
Code:
Please, Log in or Register to view codes content!

Panel Class​

This contains all the information how to build out the specific panel and contains the image and text information
Code:
Please, Log in or Register to view codes content!

Base Panel Class​

This contains the basic information for each image and text
Code:
Please, Log in or Register to view codes content!

Image Panel Class​

Tells Magic Panel how to display the image
Code:
Please, Log in or Register to view codes content!

Text Panel Class​

Tells magic panel how to display the text
Code:
Please, Log in or Register to view codes content!

Type Padding​

Applies padding to different parts of the panel
Code:
Please, Log in or Register to view codes content!

Update Enum​

Passed into Magic Panel when updating telling it which panels should be updated
Code:
Please, Log in or Register to view codes content!

Hooks​

Register Player Panel​

Registers a Player panel in Magic Panel
Code:
Please, Log in or Register to view codes content!

Register Global Panel​

Registers a Global Panel in Magic Panel
Code:
Please, Log in or Register to view codes content!

Update Global Panel​

Tells Magic Panel to update the specified global panel
Code:
Please, Log in or Register to view codes content!

Update Player Panel​

Tells Magic Panel to update the specified global panel
Code:
Please, Log in or Register to view codes content!

Show Panel​

Show a hidden global panel
Code:
Please, Log in or Register to view codes content!

Show Panel​

Show a hidden player panel
Code:
Please, Log in or Register to view codes content!

Hide Panel​

Hides a global panel
Code:
Please, Log in or Register to view codes content!

Hide Panel​

Hides a player panel
Code:
Please, Log in or Register to view codes content!
Author
Box2
Downloads
0
Views
10
First release
Last update
Rating
0.00 star(s) 0 ratings

Share this resource

Similar resources

Добавление на сервер магических героев
0.00 star(s) 0 ratings
Downloads
0
Updated
Simple components multiplier and loot system
0.00 star(s) 0 ratings
Downloads
0
Updated
На карте можно создать грибы и задать им магические свойства.
0.00 star(s) 0 ratings
Downloads
0
Updated
Простая настройка "хлебных крошек" с различными опциями.
0.00 star(s) 0 ratings
Downloads
0
Updated
A small GUI panel of clickable commands for admins
0.00 star(s) 0 ratings
Downloads
0
Updated