DevJoy.Scene.Note (DevJoy v2.0.0)

View Source

The note is visually represented as a titled text that can be used as a notice, chapter information, or any other type of information which appears before or after content, or even between dialogs to explain words used in dialog content.

Usage

The note always requires its content and title. You can also optionally specify additional data.

defmodule MyApp.SceneName do
  use DevJoy.Scene

  part :note do
    note "Note title", "Note content"

    note "Note title", [some: :data], "Note content"

    note "Note title", [some: :data] do
      "Note content"
    end
  end
end

Summary

Field types

The type representing the content of the note.

The type representing the additional data of the note.

The type representing the title of the note.

Main

The note structure contains the following keys

t()

The type representing the note structure.

Field types

content()

@type content() :: String.t()

The type representing the content of the note.

data()

@type data() :: Keyword.t()

The type representing the additional data of the note.

title()

@type title() :: String.t()

The type representing the title of the note.

Main

%DevJoy.Scene.Note{}

(struct)

The note structure contains the following keys:

  • content - a content of the note
  • data - a keyword list of additional note data
  • title - a title of the note

t()

@type t() :: %DevJoy.Scene.Note{content: content(), data: data(), title: title()}

The type representing the note structure.