themes: tooltipps are per code not per text. Therefore the tooltipps should not be displayed in some cases (like calculator have all numbers the same code and same tooltipp, so no
tooltipp usefull)
This commit is contained in:
parent
4b3178b0dd
commit
f9513e4ab0
@ -35,9 +35,13 @@ theme_class.__index = theme_class
|
||||
|
||||
-- get prepared button textures
|
||||
function theme_class:get_button(area, prefix, code, text, tooltip)
|
||||
return'image_button['..area..';'..self[prefix.."_button"]..';'..code..';'.. minetest.colorize(self[prefix.."_textcolor"] or self.textcolor,minetest.formspec_escape(text))..']'..
|
||||
"tooltip["..code..";"..minetest.formspec_escape(tooltip or text).."]"
|
||||
local formspec = 'image_button['..area..';'..self[prefix.."_button"]..';'..code..';'.. minetest.colorize(self[prefix.."_textcolor"] or self.textcolor,minetest.formspec_escape(text))..']'
|
||||
if tooltip then
|
||||
formspec = formspec.."tooltip["..code..";"..minetest.formspec_escape(tooltip).."]"
|
||||
end
|
||||
return formspec
|
||||
end
|
||||
|
||||
-- Get themed label
|
||||
function theme_class:get_label(area, label)
|
||||
return'label['..area..';'..minetest.colorize(self.textcolor, minetest.formspec_escape(label))..']'
|
||||
|
Loading…
x
Reference in New Issue
Block a user