Monogatari Documentation
HomepageGitHubDiscordTwitter
master
master
  • Welcome
  • Getting Started
    • Step 1: Setup Your Environment
    • Step 2: Download Monogatari
    • Step 3: Get Familiarized
    • Step 4: Make Your First Visual Novel
  • Upgrading from v1.4.1
  • F.A.Q.
  • Diagnosing Errors
  • Building Blocks
    • Script & Labels
    • Characters
    • Variables & Data Storage
    • Actions
      • Life Cycle
    • Components
      • Life Cycle
      • Built-in Properties
      • Built-in Functions
  • Script Actions
    • Choices
    • Clear
    • Conditionals
    • Dialogs
    • End
    • Gallery
    • Hide Canvas
    • Hide Character
    • Hide Image
    • Hide Particles
    • Hide Video
    • Input
    • Functions
    • Jump
    • Next
    • Placeholder
    • Play Music
    • Play Sound
    • Play Voice
    • Show Canvas
    • Show Background
    • Show Character
    • Show Image
    • Show Message
    • Show Notification
    • Show Particles
    • Show Scene
    • Show Video
    • Stop Music
    • Stop Sound
    • Stop Voice
    • Vibrate
    • Wait
  • Components
    • Credits Screen
    • Quick Menu
    • Loading Screen
    • Main Screen
    • Choice Container
    • Save Slot
    • Text-Box
  • Configuration Options
    • Game Configuration
      • Asset Preloading
      • Internationalization
      • Saving
      • Skip Main Menu
      • Storage
    • Player Preferences
    • Split Files
  • Style & Design
    • Responsiveness
    • CSS Classes
    • HTML Data Attributes
    • Icons
    • Image Menus
  • Releasing Your Game
    • Chrome App
    • Desktop App
    • Mobile
    • Web
  • Advanced: Monogatari Development
    • Core Libraries
      • Artemis
      • Kayros
      • Pandora
    • Actions
    • Components
    • Translations
    • Events
  • Releases
    • v2.0.0.alpha.8
    • v2.0.0.alpha.7
    • v2.0.0.alpha.6
    • v2.0.0.alpha.5
    • v2.0.0.alpha.4
    • v2.0.0.alpha.3
Powered by GitBook
On this page
  • Overview
  • Built-in Attributes

Was this helpful?

  1. Style & Design

HTML Data Attributes

Overview

Built-in Attributes

If you've already seen the HTML, you'll notice many "data" attributes in the elements; this are used by the engine so you may change the structure and using the right datas everything will just work.

This table will resume the general datas and what are they for.

Data

Function

data-action

All data-actions well... do something, they are handled by the $("[data-action]").click() function in the engine.

data-ui

The data-uis are part of the user interface, things that the user will see.

data-component

The data-uis are part of the user interface, however the user will not see them.

data-menu

The data-menus are the screens and menus of your game.

data-background

Put an image url on it and it will apply that image as a background to that element.

data-close

Closes another element by it's data-ui name.

data-target

This is mainly used for internal functions, just to target the specific media player.

data-string

Used for Multilanguage Games, will change the text of the element with the proper translation from the strings.js file.

data-jump

Used in choices, to state what a choice will do when it's clicked.

Now, that gives you some idea of what everything is for, now you need to understand what every one of them is used for.

Data

Function

data-action="open-menu"

Opens the menu/screen from the data-open next to it and closes the others.

data-action="back"

While playing, it will go back to the previous statement, while on a menu, it will just go back to the main screen.

data-action="close"

Will trigger the close of an element, using the data-close next to it.

data-action="close-video"

Closes the Video element.

data-action="set-language"

Used for the language setting.

data-action="set-volume"

Changes the volume of the element given in the data-target next to it.

data-action="jump"

Declares an element that when clicked will make the game jump to the label declared inside it's data-jump.

data-jump="[label]"

Declares the label the game will jump to when this data-action="jump" element is clicked.

data-component="modal"

Defines a modal window like the one used for the messages.

data-ui="inner-menu"

Defines a menu inside another menu/screen.

data-ui="slots"

Defines the place where the save and load slots will be displayed.

data-ui="text"

Defines the place where the "Say" text and character's name is displayed.

data-ui="who"

Defines the place where the character's name is displayed.

data-ui="say"

Defines the place where the "Say" text is displayed.

PreviousCSS ClassesNextIcons

Last updated 4 years ago

Was this helpful?