ttip: added a separate window definition for floating tooltips

The design is based on the 'menu' style window, with a tint applied.
This commit is contained in:
Charles Dang 2016-03-15 07:44:11 +11:00
parent b311135482
commit 2fdc08d92e
2 changed files with 103 additions and 1 deletions

View file

@ -44,3 +44,105 @@
[/window_definition]
[window_definition]
id = tooltip
description = "The window to show a large tooltip."
[resolution]
left_border = 10
right_border = 10
top_border = 10
bottom_border = 10
[background]
[draw]
[image]
name = "dialogs/menu-border-topleft.png"
[/image]
[image]
x = 2
y = 0
w = "(if(width < 4, 0, width - 4))"
resize_mode = "stretch"
name = "dialogs/menu-border-top.png"
[/image]
[image]
x = "(width - 2)"
y = 0
name = "dialogs/menu-border-topright.png"
[/image]
[image]
x = "(width - 2)"
y = 2
h = "(if(height < 4, 0, height - 4))"
resize_mode = "stretch"
name = "dialogs/menu-border-right.png"
[/image]
[image]
x = "(width - 2)"
y = "(height - 2)"
name = "dialogs/menu-border-botright.png"
[/image]
[image]
x = 2
y = "(height - 2)"
w = "(if(width < 4, 0, width - 4))"
resize_mode = "stretch"
name = "dialogs/menu-border-bottom.png"
[/image]
[image]
x = 0
y = "(height - 2)"
name = "dialogs/menu-border-botleft.png"
[/image]
[image]
x = 0
y = 2
h = "(if(height < 4, 0, height - 4))"
resize_mode = "stretch"
name = "dialogs/menu-border-left.png"
[/image]
[image]
x = 2
y = 2
w = "(if(width < 4, 0, width - 4))"
h = "(if(height < 4, 0, height - 4))"
name = "dialogs/menu-background.png"
resize_mode = "tile"
[/image]
[rectangle]
x = 1
y = 1
w = "(width - 1)"
h = "(height - 1)"
fill_color = {GUI__BACKGROUND_COLOR_ENABLED}
[/rectangle]
[/draw]
[/background]
[foreground]
[draw]
[/draw]
[/foreground]
[/resolution]
[/window_definition]

View file

@ -185,7 +185,7 @@ def reevaluate_best_size(w, s)
description = "The tooltip popup window with large tooltips, eg in the main menu."
[resolution]
definition = "tooltip_large"
definition = "tooltip"
automatic_placement = "false"