Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Plugin documentation — Gideros Forum

Plugin documentation

kussakovkussakov Member
edited October 2017 in General questions
Guys,

There are tons of plugins, integrated with Gideros, that can be exported on demand.
Very nice!!!

Is there some kind of up to date documentations about the plugins? Like APIs, events, examples...

Thanks!

Likes: Apollo14

+1 -1 (+1 / -0 )Share on Facebook

Comments

  • hgy29hgy29 Maintainer
    Accepted Answer
    Official docs are here: http://docs.giderosmobile.com/reference/plugin
    I try to update them each time I change something on plugins, but lots of existing plugins aren't documented at all. Is there anyone willing to help with the docs ?

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • Yes. I will try help, but we need more people. How do I update the docs?
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • @SinisterSoft, they are on github too as far as i remember.

    i keep planning to make an entry for media plugin, i guess if somebody would do it with some of the functions done that would make it easier for me to extend it - and then maybe i would really get to it.
  • hgy29hgy29 Maintainer
    Best way is to edit/add new files to docsrc folder in gideros repo:
    https://github.com/gideros/gideros/tree/master/docsrc
    They contain gideros modules docs in XML format. Take existing files as exemples to understand the syntax.

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • @keszegh The media plugin is basically redundant now - what do you use it for?
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • how is it redundant? maybe the media-player capabilities are, i don't know.

    but is there any other way to get/save an image from the file structure with a file-picker on desktop? i also added (with help from @hgy29) a method to get/save file with any extension the same way, which i use in my animation app.

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • You can save files from render texture. I think that Gideros should have the file picker stuff as an independent plugin as it could be useful for more serious stuff.

    Likes: pie, antix

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+2 / -0 )Share on Facebook
  • i agree that it is somewhat hidden in media plugin, in any case it is really helpful.
  • piepie Member
    A file picker can be made in pure lua with lfs, I did it for tntfx and I think it's the same approach used by n1cke in Layout
  • a pure lua file picker is something i'd be happy with in most cases, but it's hard to beat the native windows file-pocker (or the very similar qt-based equivalent) in its usability and native look.
  • btw @SinisterSoft, it would be good if you could let us list which of the methods below are obsolete and what is the better alternative for them:
    MediaManager class
    Methods
     
        mediamanager:isCameraAvailable() -- returns true is you can get picture from camera
        mediamanager:takePicture() -- allow user to provide picture input from camera
        mediamanager:getPicture() -- allow user to select picture from gallery
        mediamanager:takeScreenshot() -- capture the screenshot of the app
        mediamanager:postPicture(path) -- add picture from given path to gallery (or open save file dialog on pc)
        mediamanager:playVideo(path, force) -- play viedo file in given path (bool force to watch till the end, or quit playing on tap)
        mediamanager:deleteFile(path) -- deletes file at provided path
     
        mediamanager:getFile() -- allow user to select file with a file-picker
        mediamanager:saveFile() -- allow user to select a filename with a file-picker (to save a file with this filename etc.)
    Events
     
        Event.MEDIA_RECEIVE --user selected image
            e.path -- path to image
        Event.MEDIA_CANCEL --user canceled media input
        Event.VIDEO_COMPLETE --user completed watching video
     
    Media class
     
        Media.new(path) -- create new Media object with provided image
        Media.new(width, height) -- create blank Media object with provided dimensions
        Media:getPath() -- returns the path that was used to create object
        Media:getWidth() -- returns the width of the image
        Media:getHeight() -- returns the height of the image
        Media:getPixel(x, y) -- returns r, g, b, a values of pixel at x,y coordinate (RGB are in range of 0 to 255, alpha is in range of 0 to 1)
        Media:setPixel(x, y, r, g, b, a) -- sets r, g, b, a values to pixel at x,y coordinate (RGB are in range of 0 to 255, alpha is in range of 0 to 1)
        Media:setPixel(x, y, hex, a, blendAlpha) -- sets hex, a values to pixel at x,y coordinate (alpha is in range of 0 to 1)
        Media:resizeWidth(newWidth, fixed) -- resize image width, if fixed is true image is resized with fixed aspect ratio
        Media:resizeHeight(newHeight, fixed) -- resize image height, if fixed is true image is resized with fixed aspect ratio
        Media:resize(newWidth, newHeight, fixed, crop) -- resize image to new width and new height, if fixed is true image is resized with fixed aspect ratio and takes crop value into account (by either cropping image if true, or doing letterbox resize if false)
        Media:crop(x, y, width, height) -- crop with and height from x and y point from a given image
        Media:copy(destination) -- make a copy of the image
        Media:save() -- save the changes made to file
        Media:setRotation() -- rotate image to provided angle in degrees
        Media:getRotation() -- return previously set rotation
        Media:getRotation() -- return previously set rotation
        Media:flipHorizontal() -- flip image horizontally
        Media:flipVertical() -- flip image vertically
        Media:drawImage(x, y, media, alpha) -- draw another image on current one at specific x and y coordinates. You can provide either another media object or string path to image file
        Media:drawText(x, y, text, hexColor, fontSize, alpha) -- draw a text at provided coorindates with provided settings
        Media:drawLine(x0, y0, x1, y0, hexColor, alpha, blendAlpha) -- draw a line from x0,y0 to x1,y1 with provided settings
        Media:drawFill(x, y, width, height, hexColor, alpha, blendAlpha) -- draw filled rectangle at x,y position with width,height dimensions and with provided settings
        Media:floodFill(x, y, hexColor, alpha, tolerance, blendAlpha) -- fill area with provided color based on tolerance to other colors
        Media:trim(hexColor) -- trim image by provided background color, if color is not provided, uses top left pixel to crop
  • I think that the new commands are these are not interchangeable. The new commands can do some of the same things and are already documented. eg http://docs.giderosmobile.com/reference/gideros/RenderTarget/save#RenderTarget:save


    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • Thanks Guys! I know about this page. Have it even bookmarked.

    But I can't find recent docs for the Gaming plugin.

    Gideros now comes with 27 plugins.
    The page has docs for 14 plugins.

    Do you have some docs for the Gaming plugin somewhere? Looks like it should now work the same for iOS and Android - which is very nice.
    Looks like the plugin can do all kinds of stuff, so docs will be helpful.

    Likes: Apollo14

    +1 -1 (+1 / -0 )Share on Facebook
  • @SinisterSoft, then it seems Media and MediaManager can still do many things that RenderTarget cannot, although there is some overlap indeed.
  • SinisterSoftSinisterSoft Maintainer
    Accepted Answer
    Gaming docs:
    https://github.com/gideros/gideros/blob/master/plugins/gaming/install.html

    Also in the plugin folder in the gideros allplugins folder.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • Looking at the source though it looks like even more stuff has been added.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • Got it. Thanks!
    Next time I need some help with a plugin I will check the plugins folder for docs (if it is not listed in the plugins doc pages)

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.