lihis

Members
  • Content count

    37
  • Joined

  • Last visited

  • Days Won

    1

lihis last won the day on October 31 2016

lihis had the most liked content!

About lihis

  • Rank
    Advanced Member
  1. How about setting the alpha property to 0? No idea if it works but maybe worth a shot if you haven't tried already.
  2. Best way to create tooltip

    I know nothing about stack panels and even less about _best_ way to make tooltips, but i would maybe go about it something like this: http://playground.babylonjs.com/#6GWUV3 It's not auto-sizing though and maybe it sucks in some other ways as well but yeah.
  3. Ok so i happened to encounter a wild @Wingnut out and about and he actually had a great solution. No need to use buttons or anything crazy like that, instead there is a isPointerBlocker property that works just fine on GUI.Rectangle. http://playground.babylonjs.com/#84Q5FX#3 So big ups to our nutman for this tip!
  4. @JCPalmer Yeah that's a possibility if you don't want the mesh clickable while the GUI is there, but i think i do want it still clickable while the GUI is there, just not where the GUI is. @Deltakosh Hmm ok that's something i could do i suppose. Feels a bit strange to make a background element from GUI.Button instead of rectangle though. And i'd have to disable the animations from the button. But i guess that's decent hackaroo.
  5. Hello, I have a mesh that is clickable and i would like to prevent it being clicked if there is a GUI element in front of it. Playground: http://playground.babylonjs.com/#84Q5FX In this example i made the GUI clickable as well, but i would like the GUI to stop mesh from being clicked even if there wasn't click function assigned to it. Is this possible? I can almost do this with my own input handler, but it only works like 90% of the time. And it's a bit funky involving global cooldown on clicks. It also requires me assigning an empty click function to the GUI.
  6. Ah, yes, nice tips. I had indeed already done something very similar as it was annoying having that pesky browser context menu popping up! Thankfully it was a problem easily solved with the help of google and copy paste. Probably used right click for that...
  7. @Deltakosh Well, yeah, kind of i guess. But if you look at this playground: http://playground.babylonjs.com/#E2TSU0#2 I think the way i'm trying position the rect2 is entirely reasonable, but it doesn't work ( even though it did with Canvas2D ). If you use the trick adam showed (demonstrated in rect3) then it works. So it's fine, i can live with this, but i'm not sure it's as straightforward as it could be and i feel like there are going to be at least a few people who try to do what i'm trying to do in the rect2 example... Edit: Well the blue rect3 worked when i posted this at least. Now that i closed and reopened the tab the blue rectangle is in the same place as the green one. Don't know what happened there. Just a few minutes ago it worked. Edit2: http://playground.babylonjs.com/#E2TSU0#3
  8. Thank you! I downloaded the latest version using the version builder and was able to make left and right clicks.
  9. Yes i suppose. Action manager has: BABYLON.ActionManager.OnPickTrigger: BABYLON.ActionManager.OnLeftPickTrigger: BABYLON.ActionManager.OnRightPickTrigger: and i use the left and right pick triggers, not the first one that triggers on both.
  10. @Deltakosh Have a separate action with Left and Right click when i click on a GUI Rectangle. Edit: For example left click to move element left and right click to move element right.
  11. Hello, With C2D i've used action managers left pick trigger for drag / click stuff and right pick trigger to make context menus, is there a way to enable right click on Babylon GUI elements? I can only find the pointer down / up events. Thanky hanky.
  12. @adam Okay that's pretty neat. Here's the same playground with "normal" babylon animation added: http://playground.babylonjs.com/#E2TSU0#1
  13. @aWeirdo Mmm, but it used to be easier. With C2D i could just use CreateAndStartAnimation for example: BABYLON.Animation.CreateAndStartAnimation('boxwidth', box1, 'width', 30, 120, 1.0, 1.5); Now you need out of the box function. So i know it's possible / how to change and animate the values but it's quite a bit more difficult with GUI than C2D, at least in my opinion, because fiddling around with string values just isn't as easy as fiddling with numbers. But i do appreciate you giving me solutions, even though this topic was more of a plea from me to have easier way for us to adjust GUI values. I'ts entirely possible everyone else is happy with it the way it is, i don't know. My experience going from C2D to GUI isn't the most pleasant one.
  14. @aWeirdo Well, that's not really what i mean. For example in your example i would like to be able to take the value of say rect1.height and subtract 30 from it. It being a string doesn't make this very user friendly experience. Or try animating the value rect1.height. You'd need to what, have a separate value that you animate and then use some kind of observer to make a string from that value and then apply that to the rect1.height. Compare that to C2D where i can just animate the number of rect1.height. It's just not fun. I find it way too complex.
  15. Hello, Today i decided to start convert my Canvas2D code to GUI since C2D is no longer supported and i'm having rendering issues with it. Plus it's nice to have a more up to date Babylon version. However, all the Canvas2D position values and such are numbers whereas with GUI they seem to be strings(?) I have used a lot of simple +, -, and multiply math to position my things, but that no longer works because the values are no longer just numbers. Animating things seems really difficult as well for the same reason. I have to say i am not having fun with this combined value and unit with GUI. Could we perhaps have a way to separately set the unit? I donno. Maybe i'm missing something but i'm having trouble.