Added basic tooltips support to options widgets (options menu)
This commit is contained in:
parent
31b69224b1
commit
e5662a8766
1 changed files with 81 additions and 0 deletions
|
@ -429,6 +429,16 @@ local function create_header_widget(widget_definition, scenegraph_id)
|
|||
|
||||
content_id = "highlight_hotspot"
|
||||
},
|
||||
-- TOOLTIP
|
||||
{
|
||||
pass_type = "tooltip_text",
|
||||
|
||||
text_id = "tooltip_text",
|
||||
style_id = "tooltip_text",
|
||||
content_check_function = function (content)
|
||||
return content.tooltip_text and content.highlight_hotspot.is_hover
|
||||
end
|
||||
},
|
||||
-- PROCESSING
|
||||
-- DEBUG
|
||||
{
|
||||
|
@ -472,6 +482,7 @@ local function create_header_widget(widget_definition, scenegraph_id)
|
|||
highlight_hotspot = {},
|
||||
|
||||
text = widget_definition.readable_mod_name,
|
||||
tooltip_text = widget_definition.tooltip,
|
||||
|
||||
mod_name = widget_definition.mod_name,
|
||||
widget_type = widget_definition.widget_type,
|
||||
|
@ -547,6 +558,22 @@ local function create_header_widget(widget_definition, scenegraph_id)
|
|||
offset = {widget_size[1] - 205, offset_y, 0}
|
||||
},
|
||||
|
||||
-- TOOLTIP
|
||||
|
||||
tooltip_text = {
|
||||
font_type = "hell_shark",
|
||||
font_size = 24,
|
||||
horizontal_alignment = "left",
|
||||
vertical_alignment = "top",
|
||||
cursor_side = "left",
|
||||
max_width = 600,
|
||||
cursor_offset = {-10, -27},
|
||||
line_colors = {
|
||||
Colors.get_color_table_with_alpha("cheeseburger", 255),
|
||||
Colors.get_color_table_with_alpha("white", 255)
|
||||
}
|
||||
},
|
||||
|
||||
-- DEBUG
|
||||
|
||||
debug_middle_line = {
|
||||
|
@ -633,6 +660,16 @@ local function create_checkbox_widget(widget_definition, scenegraph_id)
|
|||
|
||||
content_id = "highlight_hotspot"
|
||||
},
|
||||
-- TOOLTIP
|
||||
{
|
||||
pass_type = "tooltip_text",
|
||||
|
||||
text_id = "tooltip_text",
|
||||
style_id = "tooltip_text",
|
||||
content_check_function = function (content)
|
||||
return content.tooltip_text and content.highlight_hotspot.is_hover
|
||||
end
|
||||
},
|
||||
-- PROCESSING
|
||||
{
|
||||
pass_type = "local_offset",
|
||||
|
@ -704,6 +741,7 @@ local function create_checkbox_widget(widget_definition, scenegraph_id)
|
|||
highlight_hotspot = {},
|
||||
|
||||
text = widget_definition.text,
|
||||
tooltip_text = widget_definition.tooltip,
|
||||
|
||||
mod_name = widget_definition.mod_name,
|
||||
setting_name = widget_definition.setting_name,
|
||||
|
@ -747,6 +785,22 @@ local function create_checkbox_widget(widget_definition, scenegraph_id)
|
|||
offset = {widget_size[1] - 180, offset_y + 10, 0},
|
||||
},
|
||||
|
||||
-- TOOLTIP
|
||||
|
||||
tooltip_text = {
|
||||
font_type = "hell_shark",
|
||||
font_size = 24,
|
||||
horizontal_alignment = "left",
|
||||
vertical_alignment = "top",
|
||||
cursor_side = "left",
|
||||
max_width = 600,
|
||||
cursor_offset = {-10, -27},
|
||||
line_colors = {
|
||||
Colors.get_color_table_with_alpha("cheeseburger", 255),
|
||||
Colors.get_color_table_with_alpha("white", 255)
|
||||
}
|
||||
},
|
||||
|
||||
-- DEBUG
|
||||
|
||||
debug_middle_line = {
|
||||
|
@ -873,6 +927,16 @@ local function create_stepper_widget(widget_definition, scenegraph_id)
|
|||
style_id = "right_arrow_hotspot",
|
||||
content_id = "right_arrow_hotspot"
|
||||
},
|
||||
-- TOOLTIP
|
||||
{
|
||||
pass_type = "tooltip_text",
|
||||
|
||||
text_id = "tooltip_text",
|
||||
style_id = "tooltip_text",
|
||||
content_check_function = function (content)
|
||||
return content.tooltip_text and content.highlight_hotspot.is_hover
|
||||
end
|
||||
},
|
||||
-- PROCESSING
|
||||
{
|
||||
pass_type = "local_offset",
|
||||
|
@ -954,6 +1018,7 @@ local function create_stepper_widget(widget_definition, scenegraph_id)
|
|||
right_arrow_hotspot = {},
|
||||
|
||||
text = widget_definition.text,
|
||||
tooltip_text = widget_definition.tooltip,
|
||||
|
||||
mod_name = widget_definition.mod_name,
|
||||
setting_name = widget_definition.setting_name,
|
||||
|
@ -1027,6 +1092,22 @@ local function create_stepper_widget(widget_definition, scenegraph_id)
|
|||
offset = {widget_size[1] - 60, offset_y + 7, 0}
|
||||
},
|
||||
|
||||
-- TOOLTIP
|
||||
|
||||
tooltip_text = {
|
||||
font_type = "hell_shark",
|
||||
font_size = 24,
|
||||
horizontal_alignment = "left",
|
||||
vertical_alignment = "top",
|
||||
cursor_side = "left",
|
||||
max_width = 600,
|
||||
cursor_offset = {-10, -27},
|
||||
line_colors = {
|
||||
Colors.get_color_table_with_alpha("cheeseburger", 255),
|
||||
Colors.get_color_table_with_alpha("white", 255)
|
||||
}
|
||||
},
|
||||
|
||||
-- DEBUG
|
||||
|
||||
debug_middle_line = {
|
||||
|
|
Loading…
Add table
Reference in a new issue