Skip to content

Commit

Permalink
Added a plugin action for the sync in command (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
LPGhatguy committed Jun 21, 2018
1 parent bc40ec8 commit 8b90e98
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions plugin/src/Main.server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,20 @@ local function main()
end)
end)

toolbar:CreateButton("Sync In", "Sync into Roblox Studio", Config.icons.syncIn)
.Click:Connect(function()
checkUpgrade()
local function syncIn()
checkUpgrade()

pluginInstance:syncIn()
:catch(function(err)
warn(err)
end)
end)
pluginInstance:syncIn()
:catch(function(err)
warn(err)
end)
end

local shortDescription = "Sync In"
local longDescription = "Sync into Roblox Studio"

toolbar:CreateButton(shortDescription, longDescription, Config.icons.syncIn).Click:Connect(syncIn)
plugin:CreatePluginAction("RojoSyncIn", shortDescription, longDescription).Triggered:Connect(syncIn)

toolbar:CreateButton("Toggle Polling", "Poll server for changes", Config.icons.togglePolling)
.Click:Connect(function()
Expand Down

0 comments on commit 8b90e98

Please sign in to comment.