LikithKailas Posted September 3, 2018 Share Posted September 3, 2018 Hello , I am trying to read .babylon file from local file system (by selecting file from file dialog) by clicking on a babylonjs GUI button. Can someone tell me how do i do it? Note: i am using bablonjs framework inside an electron app let button = BABYLON.GUI.Button.CreateSimpleButton( butName, text ); button.width = 0.6; button.height = "40px"; button.color = "white"; button.fontSize = "12"; button.background = "grey"; button.horizontalAlignment = GUI.Control.HORIZONTAL_ALIGNMENT_CENTER; button.verticalAlignment = GUI.Control.VERTICAL_ALIGNMENT_TOP; impButton.onPointerClickObservable.add(function(state) { // i need to invoke a file dialog here and select the .babylon file }); Quote Link to comment Share on other sites More sharing options...
Guest Posted September 4, 2018 Share Posted September 4, 2018 The only way I'm aware of is to create a input (type=file) and simulate a click to it 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.