19 lines
665 B
Plaintext
19 lines
665 B
Plaintext
update_editor_box = function(node, font)
|
|
if node.editor == nil then return end
|
|
if node.editor.font_height ~= scale(20) then
|
|
edit.update_font_settings(node.editor, scale(20), font)
|
|
end
|
|
node.editor.left = math.floor(vx(node.x))
|
|
node.editor.right = math.ceil(vx(node.x+node.w))
|
|
node.editor.width = node.editor.right - node.editor.left
|
|
Text.redraw_all(node.editor)
|
|
if node.y > Viewport.y then
|
|
node.editor.screen_top1.line = 1
|
|
node.editor.screen_top1.pos = 1
|
|
node.editor.top = vy(node.y)
|
|
else
|
|
node.editor.screen_top1, node.editor.top = schema1_of_y(node.editor, scale(Viewport.y-node.y))
|
|
node.editor.top = node.editor.top + Menu_bar_height
|
|
end
|
|
end
|