updated docs and Scissor component registrar
This commit is contained in:
@@ -43,6 +43,8 @@ defaultLib["GUI"] = {
|
|||||||
MessageBox = CreateStatic("Barotrauma.GUIMessageBox", true),
|
MessageBox = CreateStatic("Barotrauma.GUIMessageBox", true),
|
||||||
ColorPicker = CreateStatic("Barotrauma.GUIColorPicker", true),
|
ColorPicker = CreateStatic("Barotrauma.GUIColorPicker", true),
|
||||||
ProgressBar = CreateStatic("Barotrauma.GUIProgressBar", true),
|
ProgressBar = CreateStatic("Barotrauma.GUIProgressBar", true),
|
||||||
|
CustomComponent = CreateStatic("Barotrauma.GUICustomComponent", true),
|
||||||
|
ScissorComponent = CreateStatic("Barotrauma.GUIScissorComponent", true),
|
||||||
|
|
||||||
Screen = CreateStatic("Barotrauma.Screen"),
|
Screen = CreateStatic("Barotrauma.Screen"),
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ RegisterBarotrauma("GUIButton")
|
|||||||
RegisterBarotrauma("RectTransform")
|
RegisterBarotrauma("RectTransform")
|
||||||
RegisterBarotrauma("GUIFrame")
|
RegisterBarotrauma("GUIFrame")
|
||||||
RegisterBarotrauma("GUITickBox")
|
RegisterBarotrauma("GUITickBox")
|
||||||
RegisterBarotrauma("GUICustomComponent")
|
|
||||||
RegisterBarotrauma("GUIImage")
|
RegisterBarotrauma("GUIImage")
|
||||||
RegisterBarotrauma("GUIListBox")
|
RegisterBarotrauma("GUIListBox")
|
||||||
RegisterBarotrauma("GUIScrollBar")
|
RegisterBarotrauma("GUIScrollBar")
|
||||||
@@ -70,5 +69,7 @@ RegisterBarotrauma("GUIFont")
|
|||||||
RegisterBarotrauma("GUIFontPrefab")
|
RegisterBarotrauma("GUIFontPrefab")
|
||||||
RegisterBarotrauma("GUIColorPicker")
|
RegisterBarotrauma("GUIColorPicker")
|
||||||
RegisterBarotrauma("GUIProgressBar")
|
RegisterBarotrauma("GUIProgressBar")
|
||||||
|
RegisterBarotrauma("GUICustomComponent")
|
||||||
|
RegisterBarotrauma("GUIScissorComponent")
|
||||||
|
|
||||||
RegisterBarotrauma("Inventory+SlotReference")
|
RegisterBarotrauma("Inventory+SlotReference")
|
||||||
@@ -144,6 +144,10 @@ function item.combine(item, deconstructor, characterUser, allowRemove) end
|
|||||||
-- @realm shared
|
-- @realm shared
|
||||||
function item.deconstructed(item, otherItem, userCharacter) end
|
function item.deconstructed(item, otherItem, userCharacter) end
|
||||||
|
|
||||||
|
--- Gets called every time an item is created.
|
||||||
|
-- @realm shared
|
||||||
|
function item.created(item) end
|
||||||
|
|
||||||
--- Gets called every time an item is moved from one inventory slot to another, return true to cancel
|
--- Gets called every time an item is moved from one inventory slot to another, return true to cancel
|
||||||
-- @realm shared
|
-- @realm shared
|
||||||
function inventoryPutItem(inventory, item, characterUser, index, removeItemBool) end
|
function inventoryPutItem(inventory, item, characterUser, index, removeItemBool) end
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
-- luacheck: ignore 111
|
||||||
|
|
||||||
|
--[[--
|
||||||
|
Provides steam integration.
|
||||||
|
]]
|
||||||
|
-- @code Steam
|
||||||
|
-- @pragma nostrip
|
||||||
|
|
||||||
|
local Steam = {}
|
||||||
|
|
||||||
|
|
||||||
|
--- Downloads an item from workshop and places it in a folder.
|
||||||
|
-- @tparam string itemID
|
||||||
|
-- @tparam string destinationFolder
|
||||||
|
-- @tparam function callback
|
||||||
|
-- @realm shared
|
||||||
|
-- @usage
|
||||||
|
-- Steam.DownloadWorkshopItem("2805065898", "LocalMods/MyMod/Temp/Download", function(workshopItem)
|
||||||
|
-- if workshopItem == nil then print("failed to download workshop item") return end
|
||||||
|
--
|
||||||
|
-- print(workshopItem.Title .. " has been successfully downloaded.")
|
||||||
|
-- end)
|
||||||
|
function Steam.DownloadWorkshopItem(id, destinationFolder, callback) end
|
||||||
|
|
||||||
|
--- Gets information about a workshop item.
|
||||||
|
-- @tparam string itemID
|
||||||
|
-- @tparam function callback
|
||||||
|
-- @realm shared
|
||||||
|
function Steam.GetWorkshopItem(id, callback) end
|
||||||
|
|
||||||
|
--- Callback is called with the list of all workshop items inside the specified collection.
|
||||||
|
-- @tparam string itemID
|
||||||
|
-- @tparam function callback
|
||||||
|
-- @realm shared
|
||||||
|
function Steam.GetWorkshopCollection(id, callback) end
|
||||||
Reference in New Issue
Block a user