I use it for all TextFields, which I need to set at one line. My_TextField:setPosition ( math.floor (x-w / 2 ), math.floor (y + h / 2 ) - text_offset ) return true end Text_offset = 5 end -q, y, p, g, j if ( string.find (my_text, "q" ) ~ = nil ) or ( string.find (my_text, "y" ) ~ = nil ) or ( string.find (my_text, "p" ) ~ = nil ) or ( string.find (my_text, "g" ) ~ = nil ) or ( string.find (my_text, "j" ) ~ = nil ) then Text_offset = 5 end -у, ф, р if ( string.find (my_text, "у" ) ~ = nil ) or ( string.find (my_text, "ф" ) ~ = nil ) or ( string.find (my_text, "р" ) ~ = nil ) then Text_offset = 3 end -Ц, Щ, Д if ( string.find (my_text, "Ц" ) ~ = nil ) or ( string.find (my_text, "Щ" ) ~ = nil ) or ( string.find (my_text, "Д" ) ~ = nil ) then Text Processing (3) Tools that are working with texts for different kind of. Has anybody else found a work around, specifically when dealing with true type fonts?Īny ideas? It's kind of messing things up for me at the momentįunction centreAt (my_TextField, x, y ) local w =my_TextField:getWidth ( ) local h =my_TextField:getHeight ( ) -text offset local text_offset = 0 local my_text =my_TextField:getText ( ) -ц, щ, д if ( string.find (my_text, "ц" ) ~ = nil ) or ( string.find (my_text, "щ" ) ~ = nil ) or ( string.find (my_text, "д" ) ~ = nil ) then Most notable features of this release are. And I've tried using getBounds() directly but this always seems to give me 0 for y. I've tried the baseline fix in the latest GiderosCodingEasy as well and this doesn't seem to make a difference either. As it stands I can't seem to get positioning accurate unless I know exactly what characters are going to be in a string (which you don't always know and for multi-language conversions makes the whole job really messy). The problem is Gideros doesn't give us a reference to this (this appears to be known about, I've found other threads on the forum about it) so, when using French for example and characters such as É (which ascend higher than a normal E) or when using strings with and without descenders, there's a problem in terms of alignment because the created sprites are different heights and not positioned according to the - is there any way you could make the baseline available as a property of TextField, just in the normal 0 to 1 range or a Y reference? We could then use our own routines to position accordingly. Generated events: "cellForRowAtIndexPath", "didSelectRowAtIndexPath"Įvent table includes the additional field: "Row" (event.Hmmm, have come across a problem with true type font rendering in Gideros with regards to baselines (the line used to site characters upon, with descenders going below etc). My recommendation is setting the y coordinates of all text fields same and use a constant height based on the font size. Void setData(NSArray data) - use luaTableToArray() moopf currently you cannot set the baseline but Ill definitely improve the font rendering/handling (including setting the baseline). ScrollView : View new(float x, float y, float w, float h, float cw, float ch) Generated events: "onTextFieldEdit", "onTextFieldReturn" TextField2 : View void create(string text) Void setTextColor(float r, float g, float b)ĪlertView : GEventDispatcherProxy new(string title, string message, string button) text also touches on some aspects of gameplay programming, including player. Void setBGColor(float r, float g, float b) textfield:setX(10) textfield:setY(10) These set the X and Y coordinates of the bottom-left corner of the text to display on the screen. Void setTitleColor(float r, float g, float b) The ‘nil’ specifies to use Gideros default font. Global functions: int hideStatusBar(bool show) The following is a somewhat hodgepodge collection of the classes, inheritance, and function names with the return values listed in C and the Lua parameters that are expected.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |