NovaOS Development Documentation

Namespace

ui

Summary

NovaOS's UI tools (not toolkit, just UI tools)

.

NovaOS's UI tools (not toolkit, just UI tools)

Methods

static

center(element)

Centers an element on the screen.

Parameters

  • element HTMLElement

    The element to center.

Source

static

crtheme(hex)

Changes the theme of the UI to a color.

Parameters

  • hex string

    The hex color to set the theme to.

Source

static

cv(varName, varValue)

Changes a CSS variable value.

Parameters

  • varName string

    The name of the CSS variable to change.

  • varValue string

    The value to set the CSS variable to.

Source

static

dest(dr1, animopt)

Fades out an element with a custom animation duration.

Parameters

  • dr1 String

    A reference to an existing element, in JQUERY format

  • anim Number <optional>
    170

    The duration of the animation in milliseconds.

Source

static

hexdark(hex) → {Boolean}

Determines if a HEX Colour is dark or light

Parameters

  • hex String

Returns

  • Boolean

    True if the colour is dark, false if the colour is light

Source

static

hextool(hex, percent) → {String}

Adjusts brightness of a HEX Colour by a specific percent value

Parameters

  • hex String
  • percent Number

Returns

  • String

    Adjusted HEX Colour

Source

static

hextorgb(hex) → {String}

Converts a HEX Colour to RGB

Parameters

  • hex String

Returns

  • String

    RGB Colour

Source

static

hide(dr1, animopt) → {void}

Hides an element.

Parameters

  • dr1 String

    A reference to an existing element, in JQUERY format

  • anim Number <optional>
    210

    The duration of the animation in milliseconds.

Returns

  • void

Source

static

hidecls(className)

Hides an element with a custom animation duration.

Parameters

  • className String

    The Classname of the element to hide.

Source

static

masschange(classn, val)

Mass changes the text content of elements with a specific class.

Parameters

  • classn String

    The class of the elements to change.

  • val String

    The value to set the text content to.

Source

static

play(filename, volumeopt) → {void}

Plays an audio file from an HTTP server.

Parameters

  • filename String

    The path to the audio file.

  • volume Number <optional>
    1

    The volume to play the audio at.

Returns

  • void

Source

static

show(dr1, animopt) → {void}

Shows an element.

Parameters

  • dr1 String

    A reference to an existing element, in JQUERY format

  • anim Number <optional>
    210

    The duration of the animation in milliseconds.

Returns

  • void

Source

static

showcls(className)

Shows an element with a custom animation duration.

Parameters

  • className String

    The Classname of the element to show.

Source

static

showfi(dr1, animopt) → {void}

Fades in an an element with a custom animation duration.

Parameters

  • dr1 String

    A reference to an existing element, in JQUERY format

  • anim Number <optional>
    170

    The duration of the animation in milliseconds.

Returns

  • void

Source

static

sw(d1, d2)

Fades between two elements.

Parameters

  • d1 string

    The ID of the first element.

  • d2 string

    The ID of the second element.

Source

static

sw2(d1, d2)

Fades between two elements.

Parameters

  • d1 String

    A reference to an existing element, in JQUERY format

  • d2 String

    A reference to an existing element, in JQUERY format

Source

static

theme(background1, background2, shade1, shade2, accent)

Changes the theme of the UI.

Parameters

  • background1 string

    The primary background color.

  • background2 string

    The secondary background color.

  • shade1 string

    The primary shade color.

  • shade2 string

    The secondary shade color.

  • accent string

    The accent color.

Source

static

toggle(elementId, time3opt) → {void}

Toggles the visibility of an element.

Parameters

  • elementId String

    The ID of the element to toggle.

  • time3 Number <optional>
    210

    The duration of the animation in milliseconds.

Returns

  • void

Source