Jump to content

Babylonjs: invoke file selection dialog upon button click


LikithKailas
 Share

Recommended Posts

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 
 
});
 
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...