ToshihiroHiguchi / dialogic-ruby-text

Dialogic に日本語の「ルビ」機能を追加したものです。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dialogic ルビ機能追加

このリポジトリは、Godotの高機能会話ウィンドウアドオン Dialogicをフォークし、ルビ機能を追加したものです。

事前準備

DialogicとGodotの初期フォントは日本語が含まれていないため、日本語が表示できません。日本語フォントを別途用意してください。
Google Fontsとかいっぱいあっておすすめです。ゲーム組み込みもだいたいOKのはずです。(使う時はしっかり確認してください)

ルビ機能使い方

  1. Dialogic を addons ディレクトリに配置します。
    プロジェクト設定→プラグインから Dialogic を有効化します。
    その後プロジェクトを再起動してアドオンを反映させます。
  2. 上部に Dialogic タブが追加されています。開きます。
    image
  3. 左部のサイドバーの Theme → Default Theme を選択します。
    Dialog Text タブのFonts列に、Ruby Font, Ruby Alignment, Ruby OffsetColors列に Ruby Color が追加されています。 image
初期値 説明
Ruby Font res://addons/dialogic/Example Assets/Fonts/DefaultRubyFont.tres
FontDataのOverlock-Regular.ttfが英語フォントなので日本語フォントに変えること
ルビに使用するフォントリソースです。DynamicFont リソースを推奨します。
新しくフォントのリソースを作って設定するか(おすすめ)、 DefaultRubyFont の FontData を変更します。(おすすめしない)
extra_spacing_charはプログラム内で自動に設定されるため、変更しても意味がないかもです。
Ruby Alignment Center ルビを左寄せ、真ん中、右寄せ、Fillします。
Fillは使い物にならないかもです。(よくわかっていません)
Ruby Offset X:0 Y:0 ルビを指定したピクセルぶんずらします。
これで微調整してください。
Ruby Color ルビの色
  1. 左部のサイドバーの Timeline → 右クリック → Add Timeline を実行してタイムラインを追加してみます。名前をひかえておきます。
    (Themeエディタのプレビュー欄でもルビは表示されますが)
  2. テキストイベントを追加します。右部の Main Events から 💬Text をクリックします。
    image
  3. テキストを入力します。
    image 例文
[r=ごどー@Godot][r=えんじん@Engine]のアドオン[r=ダイアロジック@Dialogic]でルビを[r=ふ@振]るよ。[br][r=ハードラック@不運]と[r=ダンス@踊]っちまった。

書き方

[r=ルビふりがな@ルビをふる文字]

@がルビと文字の区切りです。(そのため、@をルビや文字に使うことはできません。)

@は全角、半角どちらでも可です。

[r=]はすべて半角です。

  1. 適当にNode2Dでシーンを作成し、スクリプトを作成 → アタッチします。
    スクリプトを書きます。Timelineの文字列は、先程作成したタイムラインの名前と同じにする必要があります。

image

extends Node2D

func _ready():
	var dia = Dialogic.start('timeline-1643877658')
	self.add_child(dia)
  1. シーンを保存してF6とかで実行します。 image

ライセンス MIT


参考にさせていただきました

Godot Engine上で振り仮名(ルビ)を実現する

https://gitlab.com/clvs7/godot-sample-project-furigana-ruby


↓以下は Dialogic 本リポジトリのReadMe


dialogic-cover

Create dialogs, characters and scenes to display conversations in your Godot games.

ChangelogInstallationDocumentationCredits

Version 1.4.2 - WIP Godot v3.4

Getting started

You can read a step by step guide on how to use Dialogic here

📚 Documentation

You can check the documentation from inside the plugin or here

Installation

To install a Dialogic, download it as a ZIP archive. All releases are listed here: releases. Then extract the ZIP archive and move the addons/ folder it contains into your project folder. Then, enable the plugin in project settings.

If you want to know more about installing plugins you can read the Godot docs page.

You can also install Dialogic using the AssetLib tab in the editor, but the version here will not be the latest one available since it takes some time for it to be approved.

⚠ IMPORTANT

If you encounter any issue when exporting your game, try having at least 1 theme in your project.


📃 Credits

Made by Emilio Coppola.

Contributors: Jowan-Spooner, Arnaud, ellogwen, Tim Krief, zaknafean, and more!. Special thanks: Toen, Òscar, Francisco Presencia. Placeholder images are from Toen's YouTube DF series

Thank you to all my Patreons for making this possible!

Mike King, Allyson Ota, Gemma M. Rull, newyear Studios, Joe Constant, kycho , Luke Peters, Wapiti ., Garrett Guillotte, Alex Harry, Rokatansky, Karl Anderson, Alex (Well Done Games), GodofGrunts , Tim Krief, Daniel Cheney, Carlo Cabanilla, Flaming Potato, Joseph Catrambone, AzulCrescent , Hector Na Em, Sergey , BasicIncomePlz, p sis, Sukh Atwal, Patrick Hogan, Jesse Priest, Ceah Sharp, Mark Charnock, soliare, Anthony Wilson, Anthony Pietra, KvaGram , orgrinrt, Steven Shearer, Carter Lilley, CorbineCaleb, Thick Biscuit, teesloane, RagingRoosevelt, yochrisbolton, Jacquelinett

Support me on Patreon https://www.patreon.com/coppolaemilio

MIT License

About

Dialogic に日本語の「ルビ」機能を追加したものです。

License:MIT License


Languages

Language:GDScript 99.3%Language:C# 0.6%Language:GAP 0.1%