Nevermind I leave those for now, will check another day.
EDIT: I think I get it
local textInputDialog = TextInputDialog.new("title", "message", "some text", "Cancel", "OK")--textInputDialog:setText("hello")--application:setTextInput(1, "hello")localfunction onComplete(event)print(event.text, event.buttonIndex, event.buttonText)
application:setTextInput(1, event.text)-- HERE IT ISend
textInputDialog:addEventListener(Event.COMPLETE, onComplete)
textInputDialog:show()localfunction testEvent(event)print(event.text)-- AND IT IS NOW IN THE CLIPBOARDend
stage:addEventListener(Event.TEXT_INPUT, testEvent)-- IT'S A STAGE EVENT!
Correct?
Tested on android WORKS Tested on desktop NOT WORKING so as stated above that's only for android devices.
local textInputDialog = TextInputDialog.new("title", "message", "some text", "Cancel", "OK")localfunction onComplete(event)print(event.text, event.buttonIndex, event.buttonText)
application:setTextInput(2, event.text)-- I THINK I AM MISSING THE POINT HERE!end
textInputDialog:addEventListener(Event.COMPLETE, onComplete)
textInputDialog:show()localfunction testEvent(e)print(e.type, e.text, e.selectionStart, e.selectionEnd)end
stage:addEventListener(Event.TEXT_INPUT, testEvent)-- Event attached to stage? is it supposed to be real time?
It is intended to create editable text fields in Gideros: you show the keyboard with application:setKeyboardVisibility(), you register Event.TEXT_INPUT events, and you set up the IME with a call to application:setTextInput(mode,"Initial text",initial selection start,initial selection end).
mode is a bitfield indicating the kind of input expected (numerical, date, etc), android will select an appropriate keyboard depending on the mode. Accepted values are defined here: https://github.com/gideros/gideros/blob/master/luabinding/applicationbinder.cpp#L117, for example Application.TEXTINPUT_CLASS_PHONE if you want the user to enter a phone number.
The TEXT_INPUT event sends you the whole modified text instead of individual key presses. It handles input suggestions/completion as well as microphone input. I plan to add similar functionality for iOS at some point
When I add the event listener to application or Application I get this error message:
wiki.lua.gideros_merged:571: attempt to call method 'addEventListener'(a nil value)
stack traceback:
wiki.lua.gideros_merged:571: in main chunk
When I add the event listener to stage it works as advertised
PS: gideros 2020.11.1
Is this expected behavior?
+ is this correct? CONSTANT(0x10,"TEXTINPUT_TVARIANT_URI"); CONSTANT(0x20,"TEXTINPUT_TVARIANT_EMAIL"); CONSTANT(0x10,"TEXTINPUT_DVARIANT_DATE"); CONSTANT(0x20,"TEXTINPUT_DVARIANT_TIME"); CONSTANT(0x10,"TEXTINPUT_NVARIANT_PASSWORD");
@MoKaLux to have it all in one giant file s basically the same as I am doing in my Gideros Visual Studio Code integration experiment, except I'm generating a large HTML file. It contains anchors so that inside VSC you can click the "sow documentation" link and it opens the document to the appropriate function.
It seems that your experiment is doing pretty much the same thing as mine, which is fine, but it's just duplication I think.
How is ours generated? Do you have to manually export a lot of stuff and then convert? Or are you programmatically getting the API Reference and then converting it into PDF format also programmatically?
mines currently at http://cliffe.co.nz/apiref/gideros.html and I'm still working on the main Electron app that generates both it, and the lua docs required for VSC code completion stuff.
Then I did a quick gideros app to transform the xml to html5. From it I can then export to anything txt, pdf, epub... either using libreoffice or ms office or ... Here is the source wanna have a look?
@MoKaLux interesting. I wasn't aware you could just copy and paste that entire page into the other one
This being the case it could be done programmatically using AJAX requests but I don;t think URLLoader supports that kind of operation in Gideros. In JavaScript for sure though
Sorry for the mess (I added the shader stuff to help).
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
(at) SinisterSoft, I hate shaders like I hated lua I am so noob with shaders that I am afraid to make the wiki no sense The good thing (or not) with me not being good with shaders is that the wiki will then be beginner friendly? documented by a noob for the noobs
can I do this in the wiki? In the description of a function, I would like to use the imgui way: (number), (bool) = ImGui:dragFloat(label, value, [incStep=1, min=0, max=0, formatString="%.3f" ,ImGuiSliderFlags=0])
-brackets for optional parameters -= with default values
This is very clever
This should be ok for the wiki description pages but on the hidden side (gideros method declaration) for gideros studio I am afraid this will break something (for example antix VS code addon, ...). [[ImGui.Core:dragFloat|ImGui:dragFloat]] ''displays a ImGui drag float slider'' GIDEROSMTD:ImGui:dragFloat(label, value, [incStep=1, min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays a ImGui drag float slider
So what do you think, can I do this? I am waiting for your feedback
At the bottom of this (API reference tab) page http://docs.giderosmobile.com/interface/iab it says Event.RESTORE_COMPLETE twice. It should say Event.RESTORE_ERROR for second one.
Also unity ads is totally missing on this (Methods tab) page http://docs.giderosmobile.com/interface/ads If you look in IAB plugin property in gideros studio you can see unity being listed there and it does work with unity ads because I am using it.
At the bottom of this (API reference tab) page http://docs.giderosmobile.com/interface/iab it says Event.RESTORE_COMPLETE twice. It should say Event.RESTORE_ERROR for second one..
Also unity ads is totally missing on this (Methods tab) page http://docs.giderosmobile.com/interface/ads If you look in IAB plugin property in gideros studio you can see unity being listed there and it does work with unity ads because I am using it.
IAB:isAvailable() --check if IAB is available, raises event: Event.AVAILABLE --iab is available
the following event is undocumented
Event.NOT_AVAILABLE -- fires when IAP is disabled
In iOS case, when you go into settings > general > restrictions and turn off IAP on iOS you get the NOT_AVAILABLE event firing when you call IAB:isAvailable()
Comments
Is a page of developers who posted their games http://giderosmobile.com/profiles
My page is there too
http://giderosmobile.com/profiles/cob-mobile-apps-indie-developer-Український-розробник
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
ps: the link to your web is broken
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: MoKaLux, oleg
Fragmenter - animated loop machine and IKONOMIKON - the memory game
else if (type == GAPPLICATION_TEXT_INPUT_EVENT)
https://github.com/gideros/gideros/blob/master/luabinding/luaapplication.cpp
line 800
As far as I understand it seems to be linked to setClipboard and getClipboard but that's it How would one use this new Event please?
PS: I have updated the wiki quite a bit, it's the last method missing in the application class (I think)
Likes: MoKaLux
But I don't get it it's not an event then?
I can write:
Nevermind I leave those for now, will check another day.EDIT: I think I get it
Tested on android WORKS
Tested on desktop NOT WORKING so as stated above that's only for android devices.
mode is a bitfield indicating the kind of input expected (numerical, date, etc), android will select an appropriate keyboard depending on the mode. Accepted values are defined here: https://github.com/gideros/gideros/blob/master/luabinding/applicationbinder.cpp#L117, for example Application.TEXTINPUT_CLASS_PHONE if you want the user to enter a phone number.
The TEXT_INPUT event sends you the whole modified text instead of individual key presses. It handles input suggestions/completion as well as microphone input. I plan to add similar functionality for iOS at some point
Likes: MoKaLux
PS: gideros 2020.11.1
Is this expected behavior?
+ is this correct?
CONSTANT(0x10,"TEXTINPUT_TVARIANT_URI");
CONSTANT(0x20,"TEXTINPUT_TVARIANT_EMAIL");
CONSTANT(0x10,"TEXTINPUT_DVARIANT_DATE");
CONSTANT(0x20,"TEXTINPUT_DVARIANT_TIME");
CONSTANT(0x10,"TEXTINPUT_NVARIANT_PASSWORD");
EDIT: wiki has been updated
Here is a first test. Tell me what you think
Let's vote:
+1 for
-1 not for
Votes are still open
PS: I have to trim the content because the full thing is 2700 kb.
It seems that your experiment is doing pretty much the same thing as mine, which is fine, but it's just duplication I think.
How is ours generated? Do you have to manually export a lot of stuff and then convert? Or are you programmatically getting the API Reference and then converting it into PDF format also programmatically?
mines currently at http://cliffe.co.nz/apiref/gideros.html and I'm still working on the main Electron app that generates both it, and the lua docs required for VSC code completion stuff.
It takes me 2 mins to do it, anytime I want.
Steps:
1-wiki all classes page: https://wiki.gideros.rocks/index.php/All_Classes_and_more
2-copy from top to bottom
3-wiki special export pages: https://wiki.gideros.rocks/index.php/Special:Export
4-paste
5-click export
Then I did a quick gideros app to transform the xml to html5. From it I can then export to anything txt, pdf, epub... either using libreoffice or ms office or ...
Here is the source wanna have a look?
This being the case it could be done programmatically using AJAX requests but I don;t think URLLoader supports that kind of operation in Gideros. In JavaScript for sure though
https://wiki.gideros.rocks/index.php/Lua_Shaders
Right at the top we are already directing to a new link: https://wiki.gideros.rocks/index.php/Writing_Shaders
Which then redirects to some more...
I have tried tidying this up but I am a bit lost here...
https://deluxepixel.com
The good thing (or not) with me not being good with shaders is that the wiki will then be beginner friendly? documented by a noob for the noobs
Likes: SinisterSoft
In the description of a function, I would like to use the imgui way:
(number), (bool) = ImGui:dragFloat(label, value, [incStep=1, min=0, max=0, formatString="%.3f" ,ImGuiSliderFlags=0])
-brackets for optional parameters
-= with default values
This is very clever
This should be ok for the wiki description pages but on the hidden side (gideros method declaration) for gideros studio I am afraid this will break something (for example antix VS code addon, ...).
[[ImGui.Core:dragFloat|ImGui:dragFloat]] ''displays a ImGui drag float slider''
GIDEROSMTD:ImGui:dragFloat(label, value, [incStep=1, min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays a ImGui drag float slider
So what do you think, can I do this? I am waiting for your feedback
Some examples: https://wiki.gideros.rocks/index.php/ImGui.Core:dragFloat
https://wiki.gideros.rocks/index.php/ImGui.Core:dragFloat4
Likes: MoKaLux
so I guess you like the imgui way ?
EDIT: Sorry I misread the answer, cutting names would decrease the meaning
Also unity ads is totally missing on this (Methods tab) page http://docs.giderosmobile.com/interface/ads If you look in IAB plugin property in gideros studio you can see unity being listed there and it does work with unity ads because I am using it.
Likes: MobAmuse
Likes: SinisterSoft, jdbc
IAB:isAvailable() --check if IAB is available, raises event:
Event.AVAILABLE --iab is available
the following event is undocumented
Event.NOT_AVAILABLE -- fires when IAP is disabled
In iOS case, when you go into settings > general > restrictions and turn off IAP on iOS you get the NOT_AVAILABLE event firing when you call IAB:isAvailable()
Likes: MoKaLux, SinisterSoft
I cannot do it for Mac nor Linux.
Likes: keszegh, SinisterSoft
Well I am happy to say it is almost done https://wiki.gideros.rocks/index.php/Lua_Midi
Could you please fill in the xxx when you have the time?