It looks like you're new here. If you want to get involved, click one of these buttons!
◘ TextArea.new(t) creates TextArea instance accepts a table (t) where all parameters are optional: 'font': [Font] font for the text 'text': [string] text to display 'sample': [string] text to get top and height for lines 'align': ["L"|"C"|"R"|"J" or 0..1 or -1] left/center/right/justified 'valign': [number in 0..1 range] relative vertical positioning 'width': [number] to clip text width 'height': [number] to clip text height 'letterspace': [number] a space between characters 'linespace': [number] line height modifier 'color': [number in 0x000000..0xFFFFFF range] text color 'colors': [table] paragraph colors, can have a fraction for alpha 'wholewords': [boolean] only whole words in lines if enabled 'oneline': [boolean] fits all text into one line if enabled 'linechars': [number] maximum line length restriction (in characters) 'maxchars': [number] maximum text length restriction (in characters) 'undolevels': [number in 0.. range] levels for undo/redo operations 'curwidth': [number] cursor width in pixels 'curcolor': [number in 0x000000..0xFFFFFF range] cursor color 'curalpha': [number in 0..1 range] cursor alpha 'selcolor': [number in 0x000000..0xFFFFFF range] selection color 'selalpha': [number in 0..1 range] selection alpha 'sldwidth': [number] slider width in pixels 'sldcolor': [number in 0x000000..0xFFFFFF range] slider color 'sldalpha': [number in 0..1 range] slider alpha 'edit': [boolean] adds mouse/touch listener to focus and edit if enabled 'scroll': [boolean] adds mouse/touch listener to scroll if enabled 'callback': [function] (textfield, esc) to be called when editing is done 'native': [boolean] enables native onscreen keyboard if available NOTE: any missing parameter will be defaulted to TextArea.default one ◘ TextArea:update(t) updates TextArea with new values from table (t) accepts a table with same parameters as for TextArea.new ◘ TextArea.property gets property value 'property' is any parameter accepted by TextArea.new ◘ TextArea:setFocus(showkeyboard) to manually set focus on TextArea 'showkeyboard': [boolean] shows virtual keyboard if enabled NOTE: you cannot set focus on text without text width and height set ◘ TextArea:removeFocus(hidekeyboard) to manually set focus from TextArea 'hidekeyboard': [boolean] hides virtual keyboard if enabled NOTE: you cannot remove focus from text if you are not focused on it ◘ TextArea.setKeyboardFonts(fonts) sets fonts for virtual keyboard 'fonts': [table] list of fonts ◘ TextArea.setKeyboardSounds(sounds) sets sounds for virtual keyboard 'sounds': [table] list of sounds ◘ TextArea.setKeyboardLayouts(layouts, [langsPerRow], [lang], [lang2]) sets layouts for virtual keyboard 'layouts': [table] list of languages where language is list of layouts 'langsPerRow': [number greater than 0] langs menu columns number 'lang': [string, optional] sets main language 'lang2': [string, optional] sets extra language ◘ TextArea.setKeyboardOptions(options) sets options and/or colors for virtual keyboard 'options': [table] accepts same keys as Keyboard.default table |
Likes: keszegh, totebo, bali001, simwhi, john26, pie, hgy29, unlying, antix, NatWobble, HubertRonald
Comments
Fragmenter - animated loop machine and IKONOMIKON - the memory game
i don't know why 'en' keyboard is not some qwerty one, but then i've found 'en-6' which is what i expected from 'en'.
looking forward to the file-chooser built on top of this.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: keszegh
Likes: n1cke
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: keszegh, totebo, simwhi, antix
Likes: antix, totebo, hgy29, pie
added 'valign' option: [number in 0..1 range] for relative vertical text positioning;
improved `align` option: it also supports numbers in 0..1 range and -1 as alias for justified text for consistency with new `valign` option;
added support of other Gideros scale modes, thanks to @hgy29.
added TextArea.setKeyboardOptions(options) function to set Keyboard defaults.
Likes: hgy29, unlying, antix, pie
This library creates a string to use in TTFont cache:
Likes: muro, pie
Likes: n1cke
◘ native onscreen keyboard support for iOS and Android, thx to @hgy29. Use `TextArea.setKeyboardOptions{native = true}` to enable it in your app.
◘ new parameter `linechars` to limit width of textarea in characters
NOTE: since Gideros doesn't know native keyboard height TextArea assumes it is half of the screen. Let's hope @hgy29 will add `application:getKeyboardHeight` method
Likes: keszegh, pie
application:getKeyboardHeight would be indeed important in this case.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Also note: Gideros cannot display noncached chars from cached fonts. In my TextArea example I have just used the following trick to cache a range of characters:
Likes: pie, unlying
Likes: totebo, antix
https://github.com/gideros/gideros/issues/319
Likes: n1cke
Likes: pie
https://deluxepixel.com
Likes: talis, Atavismus, pie