Story Viewer: add translucent background behind title
This commit is contained in:
parent
348d2e1bb2
commit
88420357b0
2 changed files with 95 additions and 3 deletions
90
data/gui/widget/label_story_screen_title.cfg
Normal file
90
data/gui/widget/label_story_screen_title.cfg
Normal file
|
@ -0,0 +1,90 @@
|
|||
#textdomain wesnoth-lib
|
||||
###
|
||||
### Definition of the title label for the story viewer.
|
||||
###
|
||||
|
||||
[label_definition]
|
||||
id = "story_screen_title"
|
||||
description = "Large label with translucent background for story screen"
|
||||
|
||||
[resolution]
|
||||
{GUI_NORMAL__RESOLUTION}
|
||||
|
||||
min_width = 0
|
||||
min_height = 0
|
||||
|
||||
default_width = 0
|
||||
default_height = 50
|
||||
|
||||
max_width = 0
|
||||
max_height = 0
|
||||
|
||||
text_font_size = {GUI_FONT_SIZE_LARGE}
|
||||
|
||||
link_aware = false
|
||||
|
||||
[state_enabled]
|
||||
|
||||
[draw]
|
||||
|
||||
[rectangle]
|
||||
x = 0
|
||||
y = 0
|
||||
w = "(width)"
|
||||
h = "(height)"
|
||||
fill_color = "0, 0, 0, 128"
|
||||
[/rectangle]
|
||||
|
||||
[text]
|
||||
x = 20
|
||||
y = {GUI__TEXT_VERTICALLY_CENTRED}
|
||||
w = "(width)"
|
||||
h = "(text_height)"
|
||||
maximum_width = "(width)"
|
||||
font_size = {GUI_FONT_SIZE_LARGE}
|
||||
color = {GUI__FONT_COLOR_ENABLED__DEFAULT}
|
||||
text = "(text)"
|
||||
text_markup = "(text_markup)"
|
||||
text_alignment = "(text_alignment)"
|
||||
text_link_aware = "(text_link_aware)"
|
||||
text_link_color = "(text_link_color)"
|
||||
[/text]
|
||||
|
||||
[/draw]
|
||||
|
||||
[/state_enabled]
|
||||
|
||||
[state_disabled]
|
||||
|
||||
[draw]
|
||||
|
||||
[rectangle]
|
||||
x = 0
|
||||
y = 0
|
||||
w = "(width)"
|
||||
h = "(height)"
|
||||
fill_color = "0, 0, 0, 128"
|
||||
[/rectangle]
|
||||
|
||||
[text]
|
||||
x = 20
|
||||
y = {GUI__TEXT_VERTICALLY_CENTRED}
|
||||
w = "(width)"
|
||||
h = "(text_height)"
|
||||
maximum_width = "(width)"
|
||||
font_size = {GUI_FONT_SIZE_LARGE}
|
||||
color = {GUI__FONT_COLOR_DISABLED__DEFAULT}
|
||||
text = "(text)"
|
||||
text_markup = "(text_markup)"
|
||||
text_alignment = "(text_alignment)"
|
||||
text_link_aware = "(text_link_aware)"
|
||||
text_link_color = "(text_link_color)"
|
||||
[/text]
|
||||
|
||||
[/draw]
|
||||
|
||||
[/state_disabled]
|
||||
|
||||
[/resolution]
|
||||
|
||||
[/label_definition]
|
|
@ -212,13 +212,15 @@
|
|||
|
||||
[column]
|
||||
grow_factor = 1
|
||||
border = "all"
|
||||
border_size = 20
|
||||
|
||||
# No borders intentionally so the label covers the entire area.
|
||||
# Offsets are handled in the definition.
|
||||
|
||||
horizontal_grow = true
|
||||
vertical_grow = true
|
||||
|
||||
[label]
|
||||
definition = "default_large"
|
||||
definition = "story_screen_title"
|
||||
id = "title"
|
||||
label = "Placeholder text"
|
||||
use_markup = true
|
||||
|
|
Loading…
Add table
Reference in a new issue