MCPcopy Create free account
hub / github.com/cogentcore/core / WidgetTooltip

Method WidgetTooltip

core/button.go:328–337  ·  view source on GitHub ↗
(pos image.Point)

Source from the content-addressed store, hash-verified

326}
327
328func (bt *Button) WidgetTooltip(pos image.Point) (string, image.Point) {
329 res := bt.Tooltip
330 if bt.Shortcut != "" && (!TheApp.SystemPlatform().IsMobile() || TheApp.Platform() == system.Offscreen) {
331 res = "[" + bt.Shortcut.Label() + "]"
332 if bt.Tooltip != "" {
333 res += " " + bt.Tooltip
334 }
335 }
336 return res, bt.DefaultTooltipPos()
337}

Callers

nothing calls this directly

Calls 5

IsMobileMethod · 0.80
DefaultTooltipPosMethod · 0.80
SystemPlatformMethod · 0.65
PlatformMethod · 0.65
LabelMethod · 0.65

Tested by

no test coverage detected