Follow-up Comment #4, bug #22609 (project wesnoth):
"I tested the lua debug console and it didn't work"
Yeah, #wesnoth.get_sides({}) won't work, it would be a syntax error in a lua
script also. If you want it to print you should write
print #wesnoth.get_sides({})
"Also i did't figure out yet how to select and copy text from the output
window. "
"Another thing that i found out while testing the lua console seems to be a
limitation of our textboxes in general: if i press ctrl+arrowleft/right it
should skip words, but it doesnt."
Yeah so there are several limitations of wesnoth's scrollable-text boxes, see
a different feature request here which I made:
https://gna.org/bugs/?21755
All of these basically boil down to writing fancier event-handler code for the
gui2::tlabel or gui2::tscroll_label.
Actually I will update that FR now, I did indeed figure out how to make
automatically rendered and clickable hyperlinks. This was fairly difficult. I
did not figure out how to do drag-selectable / copyable. I'm pretty sure we
can do it since I think we do it in gui2::ttextbox. (See the mp lobby chat
window). But it would still be of medium difficulty, and I don't have time for
it for the foreseeable future.
This ctrl-left, ctrl-right word thing, would be very easy. Again I don't have
time for it though. I could possibly give someone hints if they wanted to
implement it.
"Also i did't figure out yet how to select and copy text from the output
window."
You should be able to do that with the copy button (the only other button
besides close). We actually have many of these in the various dialogs of the
game -- it is a workaround for the lack of gui2 context menus.
"But the main limitation (and i obviously forgot to say that in the first
post) of the :lua command is that lua doesn't know of the currently selected
hex. "
Hmm I see.
So I think you can actually get this with "wesnoth.get_selected_hex()" or
something. It might be that you can save this to some short identifier like H
or something and use it less tediously. I'm not sure if we could implement
something that would be fundamentally better than this... maybe you can think
of something though.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?22609>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs