Closed Yoshiyuka closed 9 years ago
This is because (label "Test Label" (skin "uiskin.json"))
doesn't actually return a Label
, it returns as LabelEntity
. You can fix this by pulling the underlying Java object out of the entity like this:
(dialog! popup :text (:object content))
I have one more issue I'm interpreting as being a bug. According to the libgdx documentation on the Dialog class, the text method has a version which accepts a Label type such that
text(Label label)
. However, if I try to call text on a dialog through(dialog! popup :text content)
where content is an entity returned by(label "text" (skin "uiskin.json"))
I'm presented with an exception claiming that it can't find the proper version of text to call based on the given argument:The offending code:
I've gotten around this error by directly instantiating a Label class such that:
This also has given me the ability to directly manipulate the properties of the label prior to it being added to the dialog's content table. For instance, setting word wrap to true:
(label! content :set-wrap true)
Thank you for the very quick response to the previous issues!