Search found 31 matches
- Sun Apr 11, 2021 23:19
- Forum: Help
- Topic: [Solved] Line counts in rendered strings not working with some character sets?
- Replies: 1
- Views: 7264
Re: [Solved] Line counts in rendered strings not working with some character sets?
I found my problem; I was passing a utf8-encoded std::string as the text argument to my function which was being converting to a CEGUI::String incorrectly - ie: two utf8 bytes for a single character were turning into two incorrect characters in CEGUI-land. This worked with utf8 encoded strings with ...
- Fri Apr 09, 2021 00:43
- Forum: Help
- Topic: [Solved] Line counts in rendered strings not working with some character sets?
- Replies: 1
- Views: 7264
[Solved] Line counts in rendered strings not working with some character sets?
CEGUI 0.8 compiled for 32-bit Windows for use with Ogre3D. I've written the following little function to tell me how many lines a piece of text will wrap to for a given pixel width window. This works fine for English text and most other Latin character sets (Spanish, French, German), but when I use ...
- Thu Sep 17, 2020 00:07
- Forum: Help
- Topic: GetFormattedLineCount in 0.7.0?
- Replies: 9
- Views: 16034
Re: GetFormattedLineCount in 0.7.0?
For those still trying to figure this out 11 years later! This function returns the line count for a piece of word-wrapped text being placed in a space with a constrained width, similar to GetFormattedLineCount() from 0.7 int getWrappedTextLineCount(const CEGUI::String &text, const CEGUI::Font *...
- Sun Apr 01, 2018 02:38
- Forum: Help
- Topic: Change ToggleButton's state without triggering EventSelectStateChanged?
- Replies: 2
- Views: 10184
Re: Change ToggleButton's state without triggering EventSelectStateChanged?
I think that's exactly exactly what I needed - thanks very much! I'll try it as soon as I get back to the keyboard. I had started doing something with a similar effect by setting the userData() on the Window to indicate that I should ignore the events and then checking the userData in the event hand...
- Thu Mar 29, 2018 07:33
- Forum: Help
- Topic: Change ToggleButton's state without triggering EventSelectStateChanged?
- Replies: 2
- Views: 10184
Change ToggleButton's state without triggering EventSelectStateChanged?
...or "how to tell in a callback whether the state was changed through code or by a user?" Your first though is: "if he's asking this question, he must be structuring something wrong"... - maybe? Please let me know! As some background: I need to save user interactions so I can &q...
- Tue Feb 11, 2014 03:50
- Forum: Help
- Topic: [Solved] Area of flat colour without using images?
- Replies: 3
- Views: 3390
Re: Area of flat colour without using images?
Wow @Ident, thanks for such a full and well explained reply! - it's at least good to know that I wasn't just missing something obvious :) I've started out with just stretching a white pixel where needed, and might go ahead and implement something less hackey soon to clean up. Will post back here if ...
- Tue Feb 04, 2014 21:27
- Forum: Help
- Topic: [Solved] Area of flat colour without using images?
- Replies: 3
- Views: 3390
[Solved] Area of flat colour without using images?
Hi All, Simple question: I'm wanting to add an area of flat colour to my widget, either over the whole widget or over a specified rectangular area, and can't find any obvious way of doing it other than to stretch a white pixel over the area I want and then modulating that with a color in the <Layer>...
- Thu Dec 22, 2011 02:16
- Forum: Modifications / Integrations / Customisations
- Topic: Image widget RTT and down-sampling
- Replies: 6
- Views: 9272
Re: Image widget RTT and down-sampling
I've just run into this same problem, and also found the same question in another post here (from 2007). Wondering if there's any way to fix this problem in CEGUI 7.x? The problem is that if you take a large image and render it using a StaticImage widget that's smaller, the image is rendered with &q...
- Fri Dec 09, 2011 01:47
- Forum: Help
- Topic: Text colour oddness (multiplied by itself??) upgrading 0.6.2
- Replies: 5
- Views: 4894
Re: Text colour oddness (multiplied by itself??) upgrading 0
Thanks for the pointer - I'll look into it
- Thu Dec 08, 2011 03:11
- Forum: Help
- Topic: Text colour oddness (multiplied by itself??) upgrading 0.6.2
- Replies: 5
- Views: 4894
Re: Text colour oddness (multiplied by itself??) upgrading 0
Oh well, I was hoping someone was going to say " oh yeah; that's the text colour being multiplied by itself effect - you just need to... ", but obviously not :( I couldn't figure it out, so have simply put in the square root of all my text colour values into this widget for the time being,...
- Tue Nov 29, 2011 01:55
- Forum: Help
- Topic: Text colour oddness (multiplied by itself??) upgrading 0.6.2
- Replies: 5
- Views: 4894
Text colour oddness (multiplied by itself??) upgrading 0.6.2
Hi All, I'm upgrading from CEGUI 0.6.2 to 0.7.5, and one of my widgets now has something odd going on with its text colours that I can't figure out. In the snapshot below, two of my "Entry" widgets are stacked one above the other, and everything is correct except that the text colours are ...
- Mon May 16, 2011 23:12
- Forum: Modifications / Integrations / Customisations
- Topic: get window height for wrapped text component
- Replies: 11
- Views: 9236
Re: get window height for wrapped text component
Thanks CE,
...and to think it was there on the forum the whole time
Just out of curiosity, is the 0.6 documentation still available somewhere?
...and to think it was there on the forum the whole time
Just out of curiosity, is the 0.6 documentation still available somewhere?
- Mon May 16, 2011 06:22
- Forum: Modifications / Integrations / Customisations
- Topic: get window height for wrapped text component
- Replies: 11
- Views: 9236
Re: get window height for wrapped text component
Ok, I think I have an answer (for anyone else looking to do the same thing) - please comment on any obvious pitfalls... NB: This is for v0.6.2! EDIT: Don't use this code - use the code in CE's link below... int getRequiredHeightForWrappedText(CEGUI::Window* win) { //Returns the height (in pixels) re...
- Mon May 16, 2011 03:31
- Forum: Modifications / Integrations / Customisations
- Topic: get window height for wrapped text component
- Replies: 11
- Views: 9236
Re: get window height for wrapped text component
Thanks Kulik, I'm just getting back to this now - we have a big deadline we've been working towards on Friday and I was going to take the "put a sticking plaster over it and pretend the functionality doesn't exist" approach.. I'd love to get it working and am just having a look into your s...
- Thu May 12, 2011 01:16
- Forum: Modifications / Integrations / Customisations
- Topic: get window height for wrapped text component
- Replies: 11
- Views: 9236
Re: get window height for wrapped text component
Oh no! Sorry CE; and I mean that in the sincerest way possible. I didn't realize this post was still on the first page - I've just been logging into the forum and clicking the "View your posts" link every day to see if there had been a response. I know you're really good at answering and t...