|
|
|
|
Reply From: |
necdel |
I took a little time out today and fixed this myself since I was wanting to use it as well.
So the first thing you want to do is create an “addons” folder inside of your project folder.
- So for example if your project is at “c:\shmup” create “c:\shmup\addons”
- Copy the “Resolution Switcher” folder from plugins into the new addon folder.
- Change the following few lines of code inside “res_switcher.gd”
Replace line #26
add_custom_control(CONTAINER_CANVAS_EDITOR_MENU,toolbar_button)
with
add_control_to_container(CONTAINER_CANVAS_EDITOR_MENU,toolbar_button)
Next replace line #28
custom_window = preload("custom_res_popup.xml").instance()
with
custom_window = preload("res://addons/Resolution Switcher/custom_res_popup.xml").instance()
Replace lines 32-36
path = OS.get_data_dir()
var lpos = path.find_last("/")
path = path.substr(0,lpos)
lpos = path.find_last("/")
path = path.substr(0,lpos) + "/plugins/Resolution Switcher/list.txt"
with
path = "res://addons/Resolution Switcher/list.txt"
Now under your settings → plugins you can activate Resolution Switcher as usual, have fun!
@vinod, if you like I can create a pull request for you, I have no idea if what i did here is best practice or not, but it worked for now!
Sure.
But I am not much familiar with git. How can I make it so that the plugin is available for older and newer versions of Godot. I know there are branches but that’s all I know about them.
Sure vinod, If you go into your directory of the repository you can do a:
git checkout -b testing
This would automatically create the branch if it doesn’t exist. Your working set is now the “Testing” branch. So you would make your changes and then
git commit -m"Test branch for 2.1RC plugin changes"
git push
That should publish your new branch for you. So at any time you could do a
git checkout master
git checkout testing
Will let you switch back and forth between the two locally. Once its published you should see it under your branch list on Github.
Another option is to use the GitHub application, it has a little plus icon in it next to your branch name that will let you create new branches. So you would just create it in there and click publish where the sync button usually is.
necdel | 2016-08-05 21:33