Giter Site home page Giter Site logo

advancedtext's Introduction

AdvancedText

Extends RichTextLabel and adds support for Markdown and RenPy. Our RenPy Markup and Markdown have some extra stuff so read docs to learn it. This new version is designed in way so any one can crate its own TextParser to use with AdvancedText nodes. Read Docs

Features

Nodes

  • AdvancedTextLabel - RichTextLabel that allow to use one of included TextParsers
  • AdvancedTextButton - AdvancedTextLabel that behaves like a button

Resources

  • TextParser - base class for our TextParsers
  • ExtendedBBCodeParser:
    • base of for our RenPy Markup and Markdown parsers
    • includes support for things mentioned in Features
  • RenPyMarkup - RenPy Markup Parser with extra tags so it is 100% replaceable with Godot's BBCode
  • MarkdownParser - Markdown Parser with extra stuff so it is mostly replaceable with Godot's BBCode

advancedtext's People

Contributors

jeremi360 avatar matteopiovanelli-laser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

advancedtext's Issues

support for Rakugo

  • Rakugo game settings ⇾ moved to Project Settings
  • Rakugo global vars ⇾ moved to Rakugo Project

Add Select Node Mode

Add mode that to edit text in selected node for scene tree of type:

  • AdvancedTextLabel
  • RitchTextLabel
  • CodeEdit
  • TextEdit

This mode hide files panel:
image

Switch between modes:
image

This code is in MakrupTextEditor.gd

Restore Previous Files Session

This code is partally done in addons/advanced-text/MarkupTextEditor/EditorHelper.gd , and it is in MakrupTextEditor.gd.

This should:

  • write/load editor setting to ProjectSettings
  • save open files on editor close to EditorHelper.files_ram
  • restore files on editor open from EditorHelper.files_ram

use emojis.gd for highlight emojis

As highlight emojis using color region for ":" as start and end for region breaks highlight other than markdown one.
So we can try to use for these emojis.gd - this also will be better than using coloring regions as it highlights only correct emojis.

Add Preview Switcher

  • Switch that enable/disable preview at all
  • Switch to switch between bottom and right preview
    image

Fix using vars from dict, maybe use json

For some reason is not possible to save exported dict, so for using vars from dict in text we can:

  1. just have dict with predefined var just for test
  2. json to load dict from
  3. array of helper class that has name (str) and value (str) that can be converted to dict

I think option 1. will be enough, probably most users will overwrite it in using code anyway.

support for handling links to other *.md, *.txt files

It will replace current file/markup text with one from link if link start with res:// or user:// and ends with *.md or *.txt.
Maybe it should be part of an example scene called Text Browser, as it will need some buttons to navigate back and forward.

Adds support headers

Adds support for 4 headers:

  • Adds AdvancedTextLabel fields for fonts for 1, 2 and 3 headers.
  • Adds support for it each markup:
    • Markdown standard # times header level
    • BBCode [H1] - where number is header level
    • Ren'Py {H1} - where number is header level

Expand Markdown

  • use alt text for image size, for example: ![32x32](res://path/to/image.png)

Add CSS like syntax for some BBCode that don't have markup equivalent:

  • table css mix markdown
@table=2 {
|cell|cell|
}
  • text alignment tags
@center {
  Centered Text
}
  • effects
@wave amp=50 freq=2{
  Waving Text
}

Separate RakugoTextPasser / RakugoTextLabel ⇾ AdvancedTextLabel

We should separate RakugoTextParser / RakugoTextLabel from Rakugo.
and create out of it AdvancedTextLabel - one plugin will be easier to maintain then 3,
all of them will had the almost same code for Node based on RichTextLabel and Markup Text Edit Tool
It will allow for easier maintaining and updating this code.
So we need:

Docs for AdvancedText

Try to use:

Stuff that need docs 🔴 (first):

  • AdvancedTextLabel
  • CodeEdit
  • MarkupEditor tool - only how to use it
  • Makrups ⇽ can be taken and update from RakugoDocs

Stuff that need docs 🟢 (later):

  • How JSON config files for CodeEdit works
  • BBCode Parser
  • RenPy Parser (after splitting convert_renpy_markup() to smaller methods)
  • Markdown Parser (after splitting convert_markdown() to smaller methods)
  • MarkupEditor tool - code (after splitting its code to smaller scripts/scenes)

Fix Help Popup don’t showing up

Fix bugs that make Help Popup doesn't show up after pressing button.
It should show help tab for chosen markup mode in text edit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.