simplify code for createLabel (suggestion)#3384
Conversation
Split the functionality of PR 3367 into to internal functions one create Label in UserWindow and the other in the MainWindow Only functional change to PR 3367 is that fillbackground is non-optional again
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
vadi2
left a comment
There was a problem hiding this comment.
Thanks! Yes this is a lot more readable. Duplicated, yes, but the price we had to pay for not duplicating was not worth it.
typo in errormsg
|
@Edru2 how does this work with the setAppStyleSheet() fix you've found? |
|
Merging this in the interests of time so it can get tested and into 4.6. |
* Simplified PR 3367 Split the functionality of PR 3367 into to internal functions one create Label in UserWindow and the other in the MainWindow Only functional change to PR 3367 is that fillbackground is non-optional again * Update TLuaInterpreter.cpp typo in errormsg (cherry picked from commit 8190d12)
Fix createLabel (..., true) (Mudlet#3384)
|
Humm, I thought the Lua API documentation pointed out that fillBackground WAS optional but I see that it had not been so documented as such there - so changing the API is, perhaps okay. Why does it have to be a requirement though, if it could be omitted (and was thus taken to be Of course, the clickthrough option is not mentioned at all in the Wiki documentation!. |
Brief overview of PR changes/additions
Split the functionality of PR 3367 into two internal functions one create Label in UserWindow and the other in the MainWindow
Only functional change to PR 3367 is that fillbackground is non-optional again
Motivation for adding to Mudlet
A suggestion to simplify and make the code for createLabel easier to read
Other info (issues closed, discussion etc)
made quick test and couldn't find any issue