millennium-dev team mailing list archive
-
millennium-dev team
-
Mailing list archive
-
Message #00179
[Bug 1205807] Re: Missing multiline text display widget
** Changed in: millenniumduel
Assignee: (unassigned) => Przemysław Wawrzyniak (przem-wawrzyniak)
--
You received this bug notification because you are a member of
Millennium Developers, which is subscribed to Millennium Duel.
https://bugs.launchpad.net/bugs/1205807
Title:
Missing multiline text display widget
Status in Millennium Duel - a GUI frontend for Millennium:
Triaged
Bug description:
With the WLabel, we can display text and information as we wish, but
as long as it contains just one line.
In many cases we will want to use multiline text. This includes on-card and off-card effect description and favour text, list of authors, complex dialogs.
Therefore a widget that can display multiline text is a must.
This will be tricky with allegro. That is because allegro supports no multiline features.
So we would need to implement following features on our own:
1. Line wrapping.
2. Predicting width of multiline text (nonwrapped)
3. Predicting height of multiline text (possibly wrapped, alligned to a given width)
4. Drawing multiline text (possibly alligned to given width)
5. Drawing justified multiline text.
That requires lots of splitting text to words, measuring them
separately etc.
Luckily, I have found an example code that accomplishes that. This issue is discussed in this forum thread [1], 9th post (8th reply) provides an attachment [2] that does exactly what we need in a very cohesive way.
I doubt we can re-use this code, though. However, we certainly can read, learn, and recreate features we need.
[1]: https://www.allegro.cc/forums/thread/581296
[2]: https://www.allegro.cc/files/download-attachment/?area=forum%20post&id=581382
To manage notifications about this bug go to:
https://bugs.launchpad.net/millenniumduel/+bug/1205807/+subscriptions
References