Update rich text texts example

This commit is contained in:
Insality
2023-05-31 23:51:57 +03:00
parent b628212c58
commit 76ab3811fa
10 changed files with 1529 additions and 77 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,4 @@
font: "/builtins/fonts/vera_mo_bd.ttf"
font: "/example/assets/fonts/Exo2-Regular.ttf"
material: "/builtins/fonts/font-df.material"
size: 40
antialias: 1

View File

@@ -0,0 +1,17 @@
font: "/example/assets/fonts/Exo2-LightItalic.ttf"
material: "/builtins/fonts/font-df.material"
size: 40
antialias: 1
alpha: 1.0
outline_alpha: 0.0
outline_width: 0.0
shadow_alpha: 0.0
shadow_blur: 0
shadow_x: 0.0
shadow_y: 0.0
extra_characters: ""
output_format: TYPE_DISTANCE_FIELD
all_chars: false
cache_width: 0
cache_height: 0
render_mode: MODE_MULTI_LAYER

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,16 @@ function init(self)
self.rich_text_2:set_text("Here is color example for <color=0.4,0.6,0.25,1>Rich Text</color>. You can adjust the <color=0000ff>color</color>, <shadow=#FF0000>shadow</shadow> or <outline=00000055>outline</outline>")
self.rich_text_3 = self.druid:new(RichText, "case3/rich_text")
self.rich_text_3:set_text("Here <font=another_font>font change</font> example. Can be used<font=another_font>for bold and italic fonts or other one</font>")
self.rich_text_3:set_text("Here <font=game_thin>font change</font> example. Can be used<font=game_thin>for bold and <font=game_thin_italic>italic fonts</font> or other one</font>")
self.rich_text_4 = self.druid:new(RichText, "case4/rich_text")
self.rich_text_4:set_text("Hello! Here are new line<br/><nobr>and this long text will be without any new line until nobr is end</nobr> he<br/>re text with br too")
self.rich_text_5 = self.druid:new(RichText, "case5/rich_text")
self.rich_text_5:set_text("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue <color=0.4,0.6,0.25,1>ligula ac quam viverra</color> nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Lorem ipsum dolor sit amet, <shadow=#FF0000>consectetur adipiscing elit</shadow>. Donec a diam lectus.")
self.rich_text_6 = self.druid:new(RichText, "case6/rich_text")
self.rich_text_6:set_text("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus.")
end