Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

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

License

Notifications You must be signed in to change notification settings

folt-a/dialogic-ruby-text

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.5 - Afterlife Godot v3.4 Godot v3.5

⚠️

We are working on the new 2.0 version.


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

There has been some people having issues exporting their games. If you are having issues you can try to add *.cgh and *.json to your export settings (image). If it is not that, try having at least 1 theme in your project. If you still have issues, please open an issue.


Credits

Made by Emilio Coppola.

Contributors: Jowan-Spooner, zaknafean, Arnaud, ellogwen, Tim Krief, 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, Karl Anderson, Alex (Well Done Games), GodofGrunts , Tim Krief, Daniel Cheney, Carlo Cabanilla, Flaming Potato, Joseph Catrambone, AzulCrescent , Hector Na Em, BasicIncomePlz, p sis, Sukh Atwal, Patrick Hogan, Jesse Priest, Ceah Sharp, Mark Charnock, soliare, Anthony Wilson, KvaGram , Steven Shearer, Carter Lilley, CorbineCaleb, Thick Biscuit, Rodemarck Júnior, Jim Hewell, White Vulture, Brianna Allen, teesloane, RagingRoosevelt, Jacquelinett

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

MIT License

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • GDScript 99.3%
  • Other 0.7%