It would be great if we could lock layers, so items on them can not be selected!
This is something that becomes a problem when you have a HUD layer and you keep clicking on the hud elements by mistake, when you are trying to move some level element.
This forces one to hide the hud while designing, which then leads to having to re-show it before every playtest. Its a pain in the neck
I could try to add a tiny lock toggle button on the layerrow, so as to able to set a layer to locked:true. Then relay that to the instances selection code, to ignore instances on a locked layer!
I was just looking at that exact code why it hit me that this can also be something that can be added to improve the situation
You could hide the layer, and add an event "At the beginning of the scene >> Show layer HUD". No need to hide/unhide this layer again until you've to edit it :)
@Lizard-13 that would be solving an Ide usability problem by adding extra code to the game itself. It is however a nice workaround :)
I could try to add a tiny lock toggle button on the layerrow, so as to able to set a layer to locked:true.
Sounds good.
1) You can use a <Checkbox> like it's done for Visibility I think :)
2) This would need some changes in C++ code to save layers that are locked, that might be the "hard part". (well, you can copy how it's done for the visibility. Basically:
3) According to isLocked(), we can select or not instances in method selectInstance (like what you did for visibility). Would be good as everything will be on a single place when it comes to selecting instances.
@4ian thank you for this. It really helps with understanding how to declare new variables in gdevelop.js
I need to sort out my c++ compiler on windows or install linux again. Last time I tried compiling gdevelop.js, it kept failing, because my version of mingw wasn't the right one
If you're on Linux, you should be able to follow the README word-by-word: https://github.com/4ian/GDevelop.js#how-to-build-
There is now continuous build done by Travis-CI on Ubuntu and @Lizard-13 manage to compile it so I'm confident you can do it on Ubuntu :)
For Windows, I've not tried in a while, it should be pretty similar. You can open an issue on the repository if you have a problem while following the readme.
Yeah, just make sure to set the tools versions listed by 4ian in the roadmap: https://trello.com/c/U6yiHQF9/139-add-a-wrapping-option-for-text-objects
I'm working in a little script that does the first download/set versions/compile the lib, just trying some things (I want to take out a "sudo" and improve the directory tree).
This is the script (.sh):
# Get emsdk
git clone https://github.com/juj/emsdk.git
# Ensure it's up-to-date
cd emsdk
#./emsdk update # useless when git
git pull
./emsdk update-tags
# Install the latest tools
./emsdk install latest
./emsdk activate latest
# Downgrade some tools to custom versions
./emsdk install sdk-1.37.37-64bit
./emsdk activate sdk-1.37.37-64bit
./emsdk install emscripten-1.37.37
./emsdk activate emscripten-1.37.37
./emsdk install clang-e1.37.37-64bit
./emsdk activate clang-e1.37.37-64bit
./emsdk install node-8.9.1-64bit
./emsdk activate node-8.9.1-64bit
# Set the environment variables
source ./emsdk_env.sh
# Install grunt
npm install -g grunt-cli
# Get GDevelop
cd .. # Remove this line to clone GDevelop inside the emsdk folder
git clone https://github.com/4ian/GDevelop.git
# Get GDevelop.js
cd GDevelop
git clone https://github.com/4ian/GDevelop.js.git
# Install and build
cd GDevelop.js
npm install
npm run build
# Test the lib
npm test
Save it in a .sh file, when you run it from a terminal it clones emsdk and GDevelop in the same folder than the file, compiles libGD.js and launches the tests. If something goes wrong it's easy to follow and catch the problem I think :)
To recompile you just have to move to emsdk and run source ./emsdk_env.sh to set the environment variables (only one time per terminal), then to GDevelop/GDevelop.js and launch npm run build from the same terminal as many times as you want.
@Lizard-13 thank you for this :)
I installed manjaro linux again and will give this a try sometime in the week
An update on this: I set up manjaro linux for compiling. Will give this a try after I sort out the rotation widget for instances :)
Sweet! :) Keep us posted here about your progress. I'm going to close this issue as it's a new feature and not a bug/defect in the software.
We can continue the discussion here though. I created this trello card for tracking it on the roadmap:
https://trello.com/c/hHugJdFj/166-add-buttons-to-lock-layers-making-objects-from-the-layer-not-selectable
Feel free to move it to "Planned" and then "Doing" when working on it :)
Most helpful comment
This is the script (.sh):
Save it in a .sh file, when you run it from a terminal it clones emsdk and GDevelop in the same folder than the file, compiles libGD.js and launches the tests. If something goes wrong it's easy to follow and catch the problem I think :)
To recompile you just have to move to emsdk and run
source ./emsdk_env.shto set the environment variables (only one time per terminal), then to GDevelop/GDevelop.js and launchnpm run buildfrom the same terminal as many times as you want.