royibernthal

Members
  • Content count

    566
  • Joined

  • Last visited

  • Days Won

    1

royibernthal last won the day on September 17 2016

royibernthal had the most liked content!

About royibernthal

  • Rank
    Advanced Member
  • Birthday 11/28/1991

Profile Information

  • Gender
    Male

Recent Profile Visitors

1,553 profile views
  1. GUI - have container invisible but still call draw

    I feel stupid now, can't believe I missed it. Thanks
  2. I have a container that dynamically positions controls according to their size and some ordering settings. Something like a StackPanel but more suited to my project's needs. This container mostly contains children whose size is already defined by the time they're added to the container. The container is updated every time the children are drawn. In this container, I also have a TextBlock with resizeToFit set to true, which means its size is dynamically evaluated at runtime in TextBlock/_renderLines(). The problem is, the other container's children can be drawn before TextBlock size is evaluated, which results in a mess for a split second until it is drawn and the container is updated. My goal is to hide the container until the TextBlock's size has been evaluated, and save this little mess from the eyes of the user. This leads me to this question - Is there a way to make the container invisible to the user but still draw it invisibly? Setting control.isVisible = false results in no further draw calls for the control, I suppose since it means there's no point in rendering it. From my testing the same goes for control.notRenderable = true. If there are no further draw calls, it means the TextBlock size is never measured, meaning even if I manually add it again without depending on Control/onAfterDrawObservable, the mess for a split second will remain as nothing was achieved. I would've posted a PG but it'd be too cumbersome given the involved project's classes. You can assume everything is working as it's supposed to, it's more about trying to figure out a logical solution to the simple question of drawing in a way that's invisible to the user.
  3. GUI - Spritesheet animations

    Sure: https://github.com/BabylonJS/Babylon.js/issues/2927
  4. GUI - inputText force focus / unfocus

    Oh I thought you meant you only added it to the docs Just tested all your changes and fixes, they work great.
  5. GUI - Spritesheet animations

    In that case I guess that'd be the idea yes. Ideally an external class that manages the data and controls an image (or can be used by an image), the way I see it at least. For instance have a TextureMap that contains the bitmap segments data, and then Spritesheet or Animation class that extends TextureMap and adds animation functionality. Possibly it can have an observer that notifies each frame change, and a textureMap setter in Image will listen to that observer. Just tossing ideas around, not really sure what'd be the best way to do it yet. I'm guessing you have a better grasp of the subject having already programmed Sprite
  6. GUI - Spritesheet animations

    Displaying GUI related animations. For instance a tutorial with animated instructions (e.g. demonstrating a gameplay feature), gui 2d effects (e.g. lightning animation in a screen), animations that attract the user's attention to a certain place in the gui, etc.
  7. GUI - inputText force focus / unfocus

    Right I missed that function, thanks
  8. GUI - Input Text - Prompt Cancel Error

    Try in device mode (or on a mobile device) to click on the InputText, you'll see a prompt, press cancel and you'll get an error. https://www.babylonjs-playground.com/#UWS0TS
  9. I'm trying to externally set the focus to and from an InputText control (e.g. on button click): https://www.babylonjs-playground.com/#UWS0TS#6 How would you go about it?
  10. GUI - Input Text Focus Bug

    https://www.babylonjs-playground.com/#UWS0TS#4 Click on an InputText, then while it's still focused, click on the other InputText.
  11. GUI - Spritesheet animations

    I completely forgot about Sprite. Like Sprite & Sprite Manager, but for GUI: https://doc.babylonjs.com/tutorials/sprites
  12. GUI - Automatically measuring TextBlock size

    Sure, here you go: https://github.com/BabylonJS/Babylon.js/pull/2915
  13. Compiling bjs source

    Perfect. You guys did a wonderful job there, it's very easy and convenient to modify and test bjs source.
  14. GUI - Spritesheet animations

    That would be a nice feature
  15. Compiling bjs source

    TypeScript 2.5.2. My tsconfig.json is exactly that: https://github.com/BabylonJS/Babylon.js/blob/master/src/tsconfig.json