Wolfsbane Posted November 26, 2018 Share Posted November 26, 2018 Hi Team, I'm doing something a little bit different in Panda. I'm trying to create a mix of canvas and standard HTML elements. E.g. screenshot: So when you hit certain buttons, we'll call some functions from our scene, so we can see what happens. (e.g. game.system.scene.functionName()). Now: Things that don't work in Panda. The Attack Unit input box: I'm using html select: <select id = "AttackUnit"> <option value="Soldier">Soldier</option> <option value="Alpha Warrior">Alpha Warrior</option> <option value="Elf">Elf</option> <option value="M-31">M-31</option> </select> If you click on the element within the PandaEditor, Panda crashes. For the Defending unit input box, I tried using an input box with a datalist. e.g. something like this. <input list="DefendUnits" id="DefendUnit"> </br> <datalist id="DefendUnits"> <option value="Soldier"> <option value="Alpha Warrior"> </datalist> <input id="Create Defending Unit" type="button" value="Create Defending Unit" onclick="game.system.scene.createDefendingUnit(document.getElementById('DefendUnit').value);" /> This won't work in the Panda Editor. It doesn't crash, but it only ever passes an empty string. I *have* to type the name for it to work. If I just use an ordinary input type, and just type in my Unit name, it will work in the Panda Editor. All options work great if I just open it in Chrome. Edit: Also: Works fine in PandaRemote, too, on my phone. Any thoughts on this? Should I just simply assume that I shouldn't be trying to make non-html elements in the PandaEditor? Quote Link to comment Share on other sites More sharing options...
Wolfsbane Posted November 26, 2018 Author Share Posted November 26, 2018 There also seems to be an issue with the mobile canvas dimension: If my width is larger than my height, it won't show up on PandaRemote. So with 240x320, it displays fine. With 320x240, it won't display on PandaRemote (but it displays fine in PandaEditor). Quote Link to comment Share on other sites More sharing options...
enpu Posted November 26, 2018 Share Posted November 26, 2018 @Wolfsbane If your width is larger than height, then your game will be considered as landscape. So you have to turn your device with Panda Remote into landscape and your game should show up fine. If you want to disable that feature you can do it by setting rotateScreen attribute on System to false. game.config = { system: { rotateScreen: false } }; Wolfsbane 1 Quote Link to comment Share on other sites More sharing options...
enpu Posted November 26, 2018 Share Posted November 26, 2018 I will check the HTML elements issue asap. Wolfsbane 1 Quote Link to comment Share on other sites More sharing options...
Wolfsbane Posted November 26, 2018 Author Share Posted November 26, 2018 5 hours ago, enpu said: I will check the HTML elements issue asap. Sure, thanks! I'm not sure if I'm breaking the typical use-case for PandaEditor, using it like this. I have a bad habit of trying to make one tool fit all. Quote Link to comment Share on other sites More sharing options...
enpu Posted November 27, 2018 Share Posted November 27, 2018 This seems to be issue with Electron (framework that is used for the editor). I will try to figure out if there is anything i could do to fix it, updating Electron doesn't seem to solve it. Quote Link to comment Share on other sites More sharing options...
Wolfsbane Posted November 27, 2018 Author Share Posted November 27, 2018 Thanks Enpu. 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.