DevAtlas Viewport and Customization Engine
  • API Overview
  • Documentation Notes
  • Reserved Features
  • Viewport Engine
    • Loading Windows
      • changeViewport()
      • Loading Customization Engine Plugins
    • Account Functions
      • logInAPI()
  • Customization Engine
    • Viewport Window
      • Viewport Window Definition
      • Viewport Window JS Object
      • Viewport Window JSON
    • Sidebar Icon
    • Announcements
Powered by GitBook
On this page
  1. Customization Engine

Sidebar Icon

A sidebar icon is a <span> with a class of sidebarIcon, that has the following CSS code:

style="background-image: url('path/to/icon/image.png');background-size: contain;"

and the following onclick attribute:

onclick="changeViewport('VIEWPORT_WINDOW_ID')"

This code will load a window using the Viewport Engine when the icon is clicked. The icon element MUST be directly followed by a <br> element. If you want something else to happen when the icon is clicked, change the code in the onclick attribute.

Optionally, you can also add a title parameter with a string that will be displayed when the user hovers over the icon.

WARNING: Do not change the style code except for the path to the image!


Example:

<span class="sidebarIcon" id="icon_ID" style="background-image: url('path/to/image.png');background-size: contain;" onclick="changeViewport('window_ID')"></span><br>
PreviousViewport Window JSONNextAnnouncements

Last updated 4 months ago