Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to another html file #9

Closed
andreeaparsley97 opened this issue Apr 16, 2020 · 3 comments
Closed

Link to another html file #9

andreeaparsley97 opened this issue Apr 16, 2020 · 3 comments

Comments

@andreeaparsley97
Copy link

Hi! I was wondering how can I implement opening another window after pressing a button?

@Lartu
Copy link
Owner

Lartu commented Apr 16, 2020

Hi there! The process would be like this:

//First create the clickable
myButton = new Clickable();    
//Then set an action for when it is pressed
myButton.onPress = function(){
  window.open('https://www.google.com');
}

You can also resize and move and customize the clickable, check the docs for information on how to do that. If you have any questions do not hesitate to ask! 😄

@Lartu
Copy link
Owner

Lartu commented Apr 16, 2020

(You can also use onRelease instead of onPress for a more accurate button experience. Most buttons on normal GUIs activate when they are released, not when they are pressed.)

@Lartu
Copy link
Owner

Lartu commented Apr 18, 2020

I'm marking this as closed as I believe the question has been answered. Don't hesitate to open it again if it wasn't ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants