Varan Posted February 6, 2017 Share Posted February 6, 2017 Hello. The question is: how to make a window appears when you press the button? P.S. Strongly do not throw slippers, English I have a bad :) Link to comment Share on other sites More sharing options...
mattstyles Posted February 6, 2017 Share Posted February 6, 2017 9 minutes ago, Varan said: Strongly do not throw slippers This should definitely be an English phrase, but, unfortunately, it is not 10 minutes ago, Varan said: how to make a window appears when you press the button? There are lots of ways. Add a new container to the stage, use DOM and add a DOM node, use a sprite and add that etc etc, or, do you mean to open a new actual window, i.e. open a new tab in the browser? Mattia 1 Link to comment Share on other sites More sharing options...
Varan Posted February 6, 2017 Author Share Posted February 6, 2017 13 hours ago, mattstyles said: There are lots of ways. Add a new container to the stage, use DOM and add a DOM node, use a sprite and add that etc etc, or, do you mean to open a new actual window, i.e. open a new tab in the browser? No, a new tab in the browser, and the stage window for user interaction. Show textual description of any place, plus you need to show a picture of the place and in the end a couple of questions on the text. Link to comment Share on other sites More sharing options...
mattstyles Posted February 7, 2017 Share Posted February 7, 2017 A new tab in the browser is opening a new window, programmatically this is: window.open('http://google.com') Same as clicking the new tab button, see the image for a snap of what it looks like in Chrome. But, from the rest of your answer I think you actually mean to open a modal or tooltip, this is a small floating window inside your main tab, seen in lots of games and applications. The simplest way is to add an element to the stage that represents your modal window and fill it with elements like sprites and text. It'll need to take user input as well, then you might add a 'dismiss' button to get rid of it, or maybe the user hits space or enter or clicks outside the modal window, whatever you decide, just make sure it can be dismissed! Link to comment Share on other sites More sharing options...
Varan Posted February 7, 2017 Author Share Posted February 7, 2017 8 minutes ago, mattstyles said: Same as clicking the new tab button, see the image for a snap of what it looks like in Chrome. But, from the rest of your answer I think you actually mean to open a modal or tooltip, this is a small floating window inside your main tab, seen in lots of games and applications. The simplest way is to add an element to the stage that represents your modal window and fill it with elements like sprites and text. It'll need to take user input as well, then you might add a 'dismiss' button to get rid of it, or maybe the user hits space or enter or clicks outside the modal window, whatever you decide, just make sure it can be dismissed! It is difficult to explain without knowing the language ... :) In the picture about what I need. And the question is how to do it for a group of objects. Perhaps there is an example of how this is done on stage? Link to comment Share on other sites More sharing options...
Recommended Posts