mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
chat line wrapping
* rework UIWidget text wrapping * implement auto wrap * fixes in console
This commit is contained in:
@@ -16,6 +16,10 @@ function Mouse.restoreCursor()
|
||||
g_window.restoreMouseCursor()
|
||||
end
|
||||
|
||||
function Mouse.isPressed()
|
||||
return g_ui.getPressedWidget() == nil
|
||||
end
|
||||
|
||||
function Mouse.bindAutoPress(widget, callback)
|
||||
connect(widget, { onMousePress = function(widget, mousePos, mouseButton)
|
||||
callback()
|
||||
|
@@ -21,7 +21,7 @@ end
|
||||
|
||||
local function onWidgetHoverChange(widget, hovered)
|
||||
if hovered then
|
||||
if widget.tooltip then
|
||||
if widget.tooltip and not Mouse.isPressed() then
|
||||
ToolTip.display(widget.tooltip)
|
||||
currentHoveredWidget = widget
|
||||
end
|
||||
|
Reference in New Issue
Block a user