The problem is, I want the thumb fix to the end, even when the ducument size grows. In fact, I'm making a floating-up textbox, adding a blank line every seconds.
I wrote this in updateSelf of my textbox class:
bar->setDocumentSize( docSize );
bar->setScrollPosition( docSize - bar->getPageSize() );
The thumb button will 'move' twice, calculate the area twice, and invalidate itself, but actually it does not move at all.
I think it is better adding a function to Scrollbar changing the document size and scroll position at the same time, and calculate the area only once.
Or add a 'FixToBottom' property.
LCY.
Add a function to Scrollbar?
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Add a function to Scrollbar?
I think it is better adding a function to Scrollbar changing the document size and scroll position at the same time, and calculate the area only once.
TBH, I thought we already had this. Which means either that I thought about this a long time ago and never implemented it, or that my mind is gone
lcy03406 wrote:Or add a 'FixToBottom' property.
I'll consider this. My first though was that this is a good idea and my second thought contained lots of reasons not to do it - so I'll take some time to ponder on it some more...
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Add a function to Scrollbar?
Both the single update function:
And a new 'end lock' mode:
Have been added to Scrollbar in branches/v0-7.
CE.
Code: Select all
void setConfig(const float* const document_size,
const float* const page_size,
const float* const step_size,
const float* const overlap_size,
const float* const position);
And a new 'end lock' mode:
Code: Select all
functions:
void Scrollbar::setEndLockEnabled(const float enabled);
bool Scrollbar::isEndLockEnabled() const;
Boolean Property:
"EndLockEnabled"
Have been added to Scrollbar in branches/v0-7.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Bug Reports, Suggestions, Feature Requests”
Who is online
Users browsing this forum: No registered users and 2 guests