chat line wrapping

* rework UIWidget text wrapping
* implement auto wrap
* fixes in console
This commit is contained in:
Eduardo Bart
2012-03-25 19:14:00 -03:00
parent ccf55132a1
commit 532e8e3e39
11 changed files with 65 additions and 32 deletions

View File

@@ -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()

View File

@@ -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