Closed William-Lake closed 6 years ago
Would that log-component support scrolling ?
Yep, it will implement Scrollable
so it will get the scroll behavior from the get-go but no scrollbars yet (we haven't implemented that component yet).
So basically there will be a binding between the log component and a List
you supply an you can either scroll up-down programmatically (for example you can add a key listener to the ArrowUp
and ArrowDown
keys when the component when it is focused) but by default the last n
elements are displayed.
Let's discuss this over our discord channel if you have any specific ideas!
I guess it makes sense (at least I want this for my game), to have the possibility to add different styles (e.g. color/underline (would work as link)). So instead of a simple List/collection, maybe having a small API to add log content would be better. After I got re-familiarized with Zircon again, @adam-arold I would discuss it with you, maybe I can then build a prototype :)...
@coldwarrl do you think you can give a story point estimate?
Hi All! Just saw the post on /r/roguelikedev and am so excited to see this control in Zircon! I know I'm preaching to the choir here but, great work- on everything!
Thanks, you can now use it!
Summary
A "Log" refers to a GUI component, often used in roguelike games to display information to the user about a variety of events.
A dedicated "Log" Component would be a useful way to easily provide this functionality in a GUI.
Example
The Orc's attack hits! The Orc attacks you! You missed... You attacked the Orc!
Work Around
The current work around is to use a TextImage:
For Example