wesnoth/data/gui/default/widget/text_box_default.cfg

153 lines
2.5 KiB
INI

###
### Definition of a single line text box.
###
[text_box_definition]
id = "default"
description = "Default text box"
[resolution]
min_width = 40
min_height = 22
default_width = 250
default_height = 22
max_width = 0
max_height = 22
text_font_size = {FONT_SIZE_NORMAL__NORMAL}
text_x_offset = 5
text_y_offset = "(if(text_font_height <= height, (height - text_font_height) / 2, 0))"
[state_enabled]
full_redraw = "true"
[draw]
[rectangle]
x = 0
y = 0
w = "(width)"
h = "(height)"
border_thickness = 3
border_colour = "55, 55, 55, 192"
[/rectangle]
# selection box
[rectangle]
x = "(text_x_offset + selection_offset)"
y = "(text_y_offset)"
w = "(selection_width)"
h = "(text_font_height)"
border_thickness = 0
fill_colour = "21, 53, 80, 255"
[/rectangle]
[text]
x = "(text_x_offset)"
y = "(text_y_offset)"
w = "(text_width)"
h = "(text_height)"
font_size = {FONT_SIZE_NORMAL__NORMAL}
colour = {FONT_COLOUR_ENABLED}
text = "(text)"
[/text]
# cursor
[line]
x1 = "(cursor_offset) + 5"
y1 = "(text_y_offset)"
x2 = "(cursor_offset) + 5"
y2 = "(text_y_offset + text_font_height)"
colour = "255, 255, 255, 255"
thickness = 1
[/line]
[/draw]
[/state_enabled]
[state_disabled]
full_redraw = "true"
[draw]
[rectangle]
x = 0
y = 0
w = "(width)"
h = "(height)"
border_thickness = 3
border_colour = "55, 55, 55, 192"
[/rectangle]
[text]
x = "5"
y = {TEXT_V_CENTRE}
w = "(text_width)"
h = "(text_height)"
font_size = {FONT_SIZE_NORMAL__NORMAL}
colour = {FONT_COLOUR_DISABLED}
text = "(text)"
[/text]
# no cursor when disabled.
[/draw]
[/state_disabled]
[state_focussed]
full_redraw = "true"
[draw]
[rectangle]
x = 0
y = 0
w = "(width)"
h = "(height)"
border_thickness = 3
border_colour = "55, 55, 55, 192"
[/rectangle]
[text]
x = "5"
y = {TEXT_V_CENTRE}
w = "(text_width)"
h = "(text_height)"
font_size = {FONT_SIZE_NORMAL__NORMAL}
colour = {FONT_COLOUR_ENABLED}
text = "(text)"
[/text]
# cursor
[line]
x1 = "(cursor_offset) + 5"
y1 = 2
x2 = "(cursor_offset) + 5"
y2 = "(height - 4)"
colour = "0, 0, 0, 255"
thickness = 1
[/line]
[/draw]
[/state_focussed]
[/resolution]
[/text_box_definition]