royibernthal Posted July 18, 2017 Share Posted July 18, 2017 Are there any plans to create such a feature? Dad72 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 19, 2017 Share Posted July 19, 2017 Yes sir THere is a plan for that (But I don't know when) Dad72 and royibernthal 2 Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted July 19, 2017 Share Posted July 19, 2017 Hi, @royibernthal I need for a project to enter only number . , backspace and enter. Maybe it can help you to implement your own. https://www.babylonjs-playground.com/#XCPP9Y#158 adam, Wingnut and royibernthal 3 Quote Link to comment Share on other sites More sharing options...
royibernthal Posted July 19, 2017 Author Share Posted July 19, 2017 @Deltakosh Good to know, I'd recommend ASAP, because... I need it @Samuel Girardin Thanks, but I think I'll wait for DK to implement a full solution he'll do it much better than me. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 20, 2017 Share Posted July 20, 2017 Fun! Let's see... each char in a canvas2d input box... has to be a separate object. In that way, it is easy to click within text... to place a flashing cursor-bar. In fact, each char... needs to be made from TWO Babylon.GUI simplebuttons... one for its left side, one for its right side. That way, when the click arrives, we can determine if the flashing cursor should be placed BEFORE the clicked character, or after. Nah. We can use some math, along-with char localCoordinates... to determine which side of the character to place the flashing cursor-bar. Back to one object per char... smarter. Once the "where is the cursor?" system is created, then advanced crap like highlighting, inserting, backspacing, type-over, and deleting... can happen. We will need to allow that flashing cursor to be re-positioned with arrow/cursor keys... AND shifted-arrowkeys for highlighting, AND control-arrowkeys for word-jumping. Cool. It needs onChange and onEnter, just like the HTML input field, and payload is .value, likely. Then there is field width, and maximum chars, etc. We should have a set/settable fontFace, too, and that will affect/determine the initial height of the input field. Wow! According to my web searches, nobody is even CLOSE-TO creating such a thing. We would become (more) famous! I'm thinkin'... oh... 10,000 lines of code. Quote Link to comment Share on other sites More sharing options...
royibernthal Posted July 20, 2017 Author Share Posted July 20, 2017 Here's an (incomplete) lib for PIXI which attempts to do this: https://github.com/limikael/PixiTextInput/blob/master/src/PixiTextInput.js and here's a demo: https://rawgit.com/limikael/pixitextinput/master/test/index.html They're simply measuring substrings within the masked area to determine the caret position. bjs GUI doesn't have mask at the moment, but it can definitely implement this without mask - which is only needed to support content that is longer than the textfield. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Arte Posted September 2, 2017 Share Posted September 2, 2017 Hi all, Any news about BABYLON.GUI.InputTextBlock? Quote Link to comment Share on other sites More sharing options...
dbawel Posted September 2, 2017 Share Posted September 2, 2017 @Dad72 who created CastorGUI already does this well with mininal code. DB Quote Link to comment Share on other sites More sharing options...
brianzinn Posted September 3, 2017 Share Posted September 3, 2017 @Arte There is an open github issue that is not tagged with 3.1 milestone release, so I would say it is not planned in next release : (https://github.com/BabylonJS/Babylon.js/issues/2545). BJS is open source, so can always be added sooner!! Quote Link to comment Share on other sites More sharing options...
Arte Posted September 3, 2017 Share Posted September 3, 2017 7 hours ago, dbawel said: @Dad72 who created CastorGUI already does this well with mininal code. DB All my GUI's at the moment from BABYLON. I like consistency. @Deltakosh, I know you are busy. I really appreciate for all the hard work you put. But can you ...? Quote Link to comment Share on other sites More sharing options...
adam Posted September 3, 2017 Share Posted September 3, 2017 @Samuel Girardin's example doesn't work for you @Arte? https://www.babylonjs-playground.com/#XCPP9Y#158 Quote Link to comment Share on other sites More sharing options...
Arte Posted September 3, 2017 Share Posted September 3, 2017 2 hours ago, adam said: @Samuel Girardin's example doesn't work for you @Arte? https://www.babylonjs-playground.com/#XCPP9Y#158 On PC working, tablet not reading as input. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted September 3, 2017 Share Posted September 3, 2017 If there's no "purists" watching... Why not click-to-open an absolute-positioned HTML input node, do your text work in there? Then hit OK to CSS display: none that input node, then dispose the old textBlock, then make a new textBlock using the new text. Yeah, that'll work. (Probably the same method as CastorGUI, as DBawel mentioned earlier.) Do tablets allow DOM/HTML stuff? (I still use steam-powered Commodore PET, so I wouldn't know.) Here's an old PG where someone launches an abs-positioned html form (with input box). Click on the sphere to toggle "menu". adam 1 Quote Link to comment Share on other sites More sharing options...
Arte Posted September 3, 2017 Share Posted September 3, 2017 @Dad72 where I can find CastorGUI Docs? @dbawel @Wingnut Can I apply CastorGuy to plane? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 3, 2017 Share Posted September 3, 2017 Doc CastorGUI : https://bitbucket.org/JSbabylon/castorgui/src/3f588b5473f34f58fe1b8d3a095d0ba78a278d99/doc/?at=master The depo : https://bitbucket.org/JSbabylon/castorgui Exemple : http://www.babylon.actifgames.com/demoCastorGUI/ Arte 1 Quote Link to comment Share on other sites More sharing options...
Arte Posted September 3, 2017 Share Posted September 3, 2017 10 minutes ago, Dad72 said: Doc CastorGUI : https://bitbucket.org/JSbabylon/castorgui/src/3f588b5473f34f58fe1b8d3a095d0ba78a278d99/doc/?at=master The depo : https://bitbucket.org/JSbabylon/castorgui Exemple : http://www.babylon.actifgames.com/demoCastorGUI/ Thank you. Can I apply CastorGuy to plane? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 3, 2017 Share Posted September 3, 2017 CastorGUI is an HTML layer over the canvas. So no, you can not integrate/apply it into an plane. Quote Link to comment Share on other sites More sharing options...
Arte Posted September 3, 2017 Share Posted September 3, 2017 44 minutes ago, Dad72 said: CastorGUI is an HTML layer over the canvas. So no, you can not integrate/apply it into an plane. Castor.GUI nice colection but its HTML base . Dad72 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 4, 2017 Share Posted September 4, 2017 Still working on it but I had to recently tackle more urgent things like WebGL context lost. Still working on text input but I still have no ETA Pryme8, royibernthal, Arte and 1 other 4 Quote Link to comment Share on other sites More sharing options...
adam Posted September 4, 2017 Share Posted September 4, 2017 23 hours ago, Arte said: On PC working, tablet not reading as input. I don't think you are going to have any luck showing the keyboard on mobile without using an HTML input element. You will probably have to make your own keyboard (I don't recommend that). Edit: Coincidentally, I just saw this on Twitter: https://github.com/etiennepinchon/aframe-material A keyboard control would be a cool addition to GUI. Quote Link to comment Share on other sites More sharing options...
adam Posted September 4, 2017 Share Posted September 4, 2017 Here is the start of a GUI keyboard: https://www.babylonjs-playground.com/#QB1XB8#1 https://www.babylonjs-playground.com/#QB1XB8#2 https://www.babylonjs-playground.com/#QB1XB8#3 brianzinn, Wingnut, Dad72 and 4 others 7 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 5, 2017 Share Posted September 5, 2017 This will work PERFECTLY with that: http://doc.babylonjs.com/overviews/gui#inputtext It could be awesome to add your control to the InputText control royibernthal, Dad72, Wingnut and 2 others 4 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 5, 2017 Share Posted September 5, 2017 It's great DK, just missing a little thing when you want to change the position of the cursor in the input field or go back to the beginning with the mouse. Currently we have to do it with the arrows on the keyboard. I see no event in the doc as with checkbox and radios. It exist an onTextChangedObservable.add(function(value) , onTextSubmitObservable.add(function(value) .. on inputText to validate ?. This would be useful. a property like input.placeholder = "Pseudo" could be very useful too. Can one transform into Textarea to have multi-line text? But otherwise it's great. Thank you Arte 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 5, 2017 Share Posted September 5, 2017 It is still a preliminary work. Do you mind creating an issue on github to track the idea of placeholder and observables? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted September 6, 2017 Share Posted September 6, 2017 Why not just make a hidden HTML input And when you click the advance texture area it gives focus to the hidden element then as the html input update/changes update the texture? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.