Easily create scenes, grids, buttons, labels and all other GUI elements. Set positioning and sizing behavior, add event callbacks and powerful animations. Control your elements with mouse, touch, keyboard and joystick. You better see it in action!
Features:◘ User-friendly interface
◘ Fully customizable
◘ Mouse, touch, keyboard, joystick support
◘ Powerful animations
◘ Predefined events
◘ Easy-to-use inheritance
◘ Various scale modes
◘ Advanced positioning and sizing
◘ Template grids
◘ Kinetic scrolling and moving
◘ Move/Scale/Rotate for images' preview
◘ Resource loader
Download as Gideros project with examples and documentation:https://github.com/Nlcke/layout/archive/master.zipGitHub page with documentation:https://github.com/Nlcke/layoutHow to use:Copy `Layout.lua` file to your project. It will be available as global `Layout` table. Read documentation at `README.md` or `Layout.lua` itself.
Example:-- create layout with "Hello, world!" text in the center
layout = Layout.new{
TextField.new(nil, "Hello, World!", "|")
}
stage:addChild(layout) -- add layout to the stage |
Screenshots:
Comments
It seems like a great contribution @n1cke . Thank you very much for sharing.
Really appreciated =D>
Likes: n1cke, jeromegsq
thanks n1cke.
Likes: n1cke, talis
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: n1cke, pie
◘ added scrollbar and improved navigation for file explorer example
◘ new event "onResize" (useful to update scrollers)
◘ new parameters to manually select grid col ("selectedCol") and row ("selectedRow")
◘ minor library improvements
Likes: talis, simwhi, MikeHart, pie
Likes: keszegh, pie, n1cke, totebo, SinisterSoft, MikeHart, simwhi, MobAmuse, luyimoon
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
Likes: john26, n1cke
◘ new "text_effects" example (awesome one)
◘ 3D effects are enabled in examples by default (add this line to your project if you need them: `application:configureFrustum(45)`)
◘ clipping can be removed from Layout with `clip = false`
◘ few important bug fixes
Likes: keszegh, simwhi, tytadas, john26, pie, MobAmuse
Likes: n1cke
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
◘ Fixed scroll function
◘ Updated file_explorer example due to new slider logic
This is minor but important update. Examples with scrolling were buggy under certain circumstances due to errors in scroll function.
Big thanks to @john26 for his good report about this bug!
Likes: pie, simwhi, talis, john26
Likes: pie, n1cke, hgy29, keszegh, jdbc
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
Likes: n1cke
Fragmenter - animated loop machine and IKONOMIKON - the memory game
this plugin looks amazing and finally led me to try and invest some time into Gideros :-h
So this might be a stupid question, apologies in advance! I downloaded the example project, but when I try to run it from Gideros Studio it tells me (multiple times) that it cannot find the module "lfs". It seems to look for it in a Lua5.1 installation:
I am quite sure I am missing something obvious but searching around the documentation and googling didnt help :-P
Thanks a lot in advance!
'lfs' plugin is enabled by default for Windows, Android, iOS and, IIRC, for MacOS.
Can you `require` other built-in Gideros plugins like`bitop`, `json`, etc?
Likes: stetso
Likes: stetso
So since this does not seem to be related to Layout specifically I will stop spamming this thread and follow the discussion about Sierra.
Anyway, thanks for your help you all! Still looking forward to check out Layout eventually...
PS: no, I cannot load any other libs either..
self:bringToFront()
Layout.select(self) methods? Thanks in advance.
Likes: stetso
Fixed template grids (without overlapping):
Likes: muro
D/Gideros: main.lua:61: attempt to get length of local 'examples' (a nil value)
stack traceback:
main.lua:61: in main chunk
E/AndroidRuntime: FATAL EXCEPTION: GLThread 2086
Process: com.yourdomain.yourapp, PID: 28696
Theme: themes:{default=overlay:system, iconPack:system, fontPkg:system, com.android.systemui=overlay:system, com.android.systemui.navbar=overlay:system}
com.giderosmobile.android.player.LuaException: main.lua:61: attempt to get length of local 'examples' (a nil value)
stack traceback:
main.lua:61: in main chunk
at LUA.MAIN_CHUNK(main.lua:61)
liblfs.so is there and I also tried to add
uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
in the AndroidManifest.xml but without any effect.
Any idea why this happens? I have the same problem with other projects that read a file from the file system.
UPDATE: it works if I use loadfile instead of Layout.newResources, so there is a problem in Layout.newResources that occurs only when deploying the full project on device. @n1cke can you take a look and see if you figure out what might be wrong in Layout.newResources function? I'll report back if I find the problem myself.
i tried finally to use the layout class, after a lot of trying to find out what is the problem with my code i noticed that if the parent of a layout is scaled then it messes up things.
the last lines of hitTestPoint should be
but it seems that the slider also does not move with the same speed as the mouse when you pull it, so there must be further problems. maybe you can find the rest as well, so far i managed to correct hitTestPoint only.
also pulling the layout items themselves pulls them in the wrong speed.
(i'm modifying the file explorer example, but the problems are in layout.lua, so this is probably irrelevant)
Fragmenter - animated loop machine and IKONOMIKON - the memory game
another remark that i think (at least optionally) one should be able to stop mouse/touch event propagation while a layout element is pulled.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
(this does not solve the grab-pull speed problems though)
Fragmenter - animated loop machine and IKONOMIKON - the memory game
any ideas about this?
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
keszegh, Layout doesn't support direct scaling because it uses special fields of it's elements (and their parents) to calculate positions, sizes and real scaling. Clipping adds another level of complexity to this. Can you attach examples for tests?
meanwhile my project that worked on win player fails in android player, maybe it's also due to the resource loader/lfs problem @grotly talks about.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game