Skip to content

Commit

Permalink
Completed global classes F-W. ex/eg/ie fixes. Space between Enums names
Browse files Browse the repository at this point in the history
fixes. Remove deprecated methods with existing aliases.
  • Loading branch information
LanetheGreat committed Nov 26, 2018
1 parent 12c29e7 commit 848143c
Show file tree
Hide file tree
Showing 23 changed files with 9,964 additions and 725 deletions.
22 changes: 11 additions & 11 deletions api/constraint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
-- @function [parent=#constraint] Find
-- @param #Entity Ent1 The first entity to check.
-- @param #Entity Ent2 The second entity to check.
-- @param #string type The constraint type to look for. (eg. "Weld", "Elastic", "NoCollide").
-- @param #string type The constraint type to look for. (ex: "Weld", "Elastic", "NoCollide").
-- @param #number bone1 The bone number for the first entity. (0 for monoboned entities)
-- @param #number bone2 The bone number for the second entity. (0 for monoboned entities)
-- @return #Entity The found Constraint or nil.
Expand All @@ -163,7 +163,7 @@
-- entity found.
-- @function [parent=#constraint] FindConstraint
-- @param #Entity ent The entity to check.
-- @param #string type The type of constraint. (eg. "Weld", "Elastic", "NoCollide")
-- @param #string type The type of constraint. (ex: "Weld", "Elastic", "NoCollide")
-- @return #table The constraint table, set with **constraint.AddConstraintTable**.

-------------------------------------------------------------------------------
Expand All @@ -173,7 +173,7 @@
-- directly connected to the entity.
-- @function [parent=#constraint] FindConstraintEntity
-- @param #Entity ent The entity to check.
-- @param #string type The type of constraint. (eg. "Weld", "Elastic", "NoCollide")
-- @param #string type The type of constraint. (ex: "Weld", "Elastic", "NoCollide")
-- @return #Entity The other entity.

-------------------------------------------------------------------------------
Expand All @@ -183,7 +183,7 @@
-- the entity.
-- @function [parent=#constraint] FindConstraints
-- @param #Entity ent The entity to check.
-- @param #string type The type of constraint. (eg. "Weld", "Elastic", "NoCollide")
-- @param #string type The type of constraint. (ex: "Weld", "Elastic", "NoCollide")
-- @return #table All the constraints of this entity.

-------------------------------------------------------------------------------
Expand Down Expand Up @@ -234,7 +234,7 @@
-- @param #Length1 Length1
-- @param #Length2 Length2
-- @param #number width The thickness of the rope.
-- @param #number key The key binding, corresponding to a **KEY\_Enums**.
-- @param #number key The key binding, corresponding to a **KEY\_ Enums**.
-- @param #number fixed Whether the hydraulic is fixed.
-- @param #number speed The speed used when the constraint is activated.
-- @param #string material Name of the material to use while rendering the rope.
Expand Down Expand Up @@ -271,8 +271,8 @@
-- @param #number toggle Whether the constraint is on toggle.
-- @param #Player pl The player that will be used to call **numpad.OnDown** and **numpad.OnUp**.
-- @param #number forcelimit Amount of force until it breaks. (0 = unbreakable)
-- @param #number numpadkey_fwd The key binding for "forward", corresponding to an **KEY\_Enums**.
-- @param #number numpadkey_bwd The key binding for "backwards", corresponding to an **KEY\_Enums**.
-- @param #number numpadkey_fwd The key binding for "forward", corresponding to an **KEY\_ Enums**.
-- @param #number numpadkey_bwd The key binding for "backwards", corresponding to an **KEY\_ Enums**.
-- @param #Vector LocalAxis If you include the LocalAxis then LPos2 will not be used in the final constraint. However, LPos2 is still a required argument.
-- @return #Entity, #Entity The new Constraint, returns false on failure and the new axis, returns nil if the constraint could not be created.

Expand All @@ -291,7 +291,7 @@
-- @param #Length1 Length1
-- @param #Length2 Length2
-- @param #number width The thickness of the rope.
-- @param #number key The key binding, corresponding to a **KEY\_Enums**.
-- @param #number key The key binding, corresponding to a **KEY\_ Enums**.
-- @param #number fixed Whether the constraint is fixed.
-- @param #number period
-- @param #number amplitude
Expand Down Expand Up @@ -343,7 +343,7 @@
-- Attempts to remove all constraints of a specified type associated with an entity.
-- @function [parent=#constraint] RemoveConstraints
-- @param #Entity ent The entity to check.
-- @param #string type The constraint type to remove. (eg. "Weld", "Elastic", "NoCollide")
-- @param #string type The constraint type to remove. (ex: "Weld", "Elastic", "NoCollide")
-- @return #boolean, #number Whether any constraints were removed and the number of constraints removed.

-------------------------------------------------------------------------------
Expand Down Expand Up @@ -407,8 +407,8 @@
-- @param #Vector LPos1 Position on the first entity, in its local space coordinates.
-- @param #Vector LPos2 Position on the second entity, in its local space coordinates.
-- @param #number width The thickness of the rope.
-- @param #number fwd_bind The key binding for "forward", corresponding to an **KEY\_Enums**.
-- @param #number bwd_bind The key binding for "backwards", corresponding to an **KEY\_Enums**.
-- @param #number fwd_bind The key binding for "forward", corresponding to an **KEY\_ Enums**.
-- @param #number bwd_bind The key binding for "backwards", corresponding to an **KEY\_ Enums**.
-- @param #number fwd_speed Forward speed.
-- @param #number bwd_speed Backwards speed.
-- @param #string material Name of the material to use while rendering the rope.
Expand Down
2 changes: 1 addition & 1 deletion api/construct.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
-- @param #Angle ang The angles of the magnet.
-- @param #string model The model of the maget.
-- @param #string material Name of the material to use while rendering the magnet.
-- @param #number key The key to toggle the magnet, see **KEY\_Enums**.
-- @param #number key The key to toggle the magnet, see **KEY\_ Enums**.
-- @param #number maxObjects Maximum amount of objects the magnet can hold.
-- @param #number strength Strength of the magnet.
-- @param #number nopull If > 0, disallows the magnet to pull objects towards it. _(Default: 0)_
Expand Down
226 changes: 113 additions & 113 deletions api/derma.lua
Original file line number Diff line number Diff line change
@@ -1,113 +1,113 @@
-------------------------------------------------------------------------------
-- The derma library allows you to add custom derma controls and create &
-- modify derma skins.
-- @module derma

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Gets the color from a Derma skin of a panel and returns default color if
-- not found.
-- @function [parent=#derma] Color
-- @param #string name The name of the skin in the panel.
-- @param #Panel pnl The Panel to pull the skin color from.
-- @param #table default The default color in case of failure.
-- @return #table The skin's color or the default argument if not found.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Defines a new Derma control with an optional base.
--
-- This calls **vgui.Register** internally, but also does the following:
--
-- * Adds the control to **derma.GetControlList**.
-- * Adds a key "Derma" - This is returned by **derma.GetControlList**.
-- * Makes a global table with the name of the control. _(This is technically
-- deprecated and should not be relied upon)_
-- * If reloading (i.e. called this function with name of an existing panel),
-- updates all existing instances of panels with this name. (Updates functions,
-- calls **PANEL:PreAutoRefresh** and **PANEL:PostAutoRefresh**, etc.)
-- @function [parent=#derma] DefineControl
-- @param #string name Name of the newly created control.
-- @param #string description Description of the control.
-- @param #table tab Table containing control methods and properties.
-- @param #string base Derma control to base the new control off of.
-- @return #table A table containing the new control's methods and properties.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Defines a new skin so that it is usable by Derma. The default skin can be
-- found in "garrysmod/lua/skins/default.lua"
-- @function [parent=#derma] DefineSkin
-- @param #string name Name of the new skin.
-- @param #string description Description of the skin.
-- @param #skinTable containing skin data.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Returns the **derma.Controls** table, a list of all derma controls registered
-- with **derma.DefineControl**.
-- @function [parent=#derma] GetControlList
-- @return #table A listing of all available derma-based controls. See **derma.Controls** for structure and contents.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Returns the default skin table, which can be changed with the hook **GM/ForceDermaSkin**.
-- @function [parent=#derma] GetDefaultSkin
-- @return #table The default skin's table data.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Returns the skin table of the skin with the supplied name.
-- @function [parent=#derma] GetNamedSkin
-- @param #string name Name of skin to fetch.
-- @return #table The named skin's table data.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Returns a copy of the table containing every Derma skin.
-- @function [parent=#derma] GetSkinTable
-- @return #table Copy table of every Derma skin.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Clears all cached panels so that they reassess which skin they should be using.
-- @function [parent=#derma] RefreshSkins

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Returns how many times **derma.RefreshSkins** has been called.
-- @function [parent=#derma] SkinChangeIndex
-- @return #number Amount of times **derma.RefreshSkins** has been called.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Calls the specified hook for the given panel.
-- @function [parent=#derma] SkinHook
-- @param #string type The type of hook to run.
-- @param #string name The name of the hook to run.
-- @param #Panel panel The panel to call the hook for.
-- @param #number w The width of the panel.
-- @param #number h The height of the panel.
-- @return #any The returned variable from the skin hook.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Returns a function to draw a specified texture of panels skin.
-- @function [parent=#derma] SkinTexture
-- @param #string name The identifier of the texture.
-- @param #Panel pnl Panel to get the skin of.
-- @param #any fallback What to return if we failed to retrieve the texture. _(Default: nil)_
-- @return #function A function that is created with the **GWEN library** to draw a texture.

return nil
-------------------------------------------------------------------------------
-- The derma library allows you to add custom derma controls and create &
-- modify derma skins.
-- @module derma

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Gets the color from a Derma skin of a panel and returns default color if
-- not found.
-- @function [parent=#derma] Color
-- @param #string name The name of the skin in the panel.
-- @param #Panel pnl The Panel to pull the skin color from.
-- @param #table default The default color in case of failure.
-- @return #table The skin's color or the default argument if not found.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Defines a new Derma control with an optional base.
--
-- This calls **vgui.Register** internally, but also does the following:
--
-- * Adds the control to **derma.GetControlList**.
-- * Adds a key "Derma" - This is returned by **derma.GetControlList**.
-- * Makes a global table with the name of the control. _(This is technically
-- deprecated and should not be relied upon)_
-- * If reloading (ex: called this function with name of an existing panel),
-- updates all existing instances of panels with this name. (Updates functions,
-- calls **PANEL:PreAutoRefresh** and **PANEL:PostAutoRefresh**, etc.)
-- @function [parent=#derma] DefineControl
-- @param #string name Name of the newly created control.
-- @param #string description Description of the control.
-- @param #table tab Table containing control methods and properties.
-- @param #string base Derma control to base the new control off of.
-- @return #table A table containing the new control's methods and properties.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Defines a new skin so that it is usable by Derma. The default skin can be
-- found in "garrysmod/lua/skins/default.lua"
-- @function [parent=#derma] DefineSkin
-- @param #string name Name of the new skin.
-- @param #string description Description of the skin.
-- @param #skinTable containing skin data.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Returns the **derma.Controls** table, a list of all derma controls registered
-- with **derma.DefineControl**.
-- @function [parent=#derma] GetControlList
-- @return #table A listing of all available derma-based controls. See **derma.Controls** for structure and contents.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Returns the default skin table, which can be changed with the hook **GM/ForceDermaSkin**.
-- @function [parent=#derma] GetDefaultSkin
-- @return #table The default skin's table data.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Returns the skin table of the skin with the supplied name.
-- @function [parent=#derma] GetNamedSkin
-- @param #string name Name of skin to fetch.
-- @return #table The named skin's table data.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Returns a copy of the table containing every Derma skin.
-- @function [parent=#derma] GetSkinTable
-- @return #table Copy table of every Derma skin.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Clears all cached panels so that they reassess which skin they should be using.
-- @function [parent=#derma] RefreshSkins

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Returns how many times **derma.RefreshSkins** has been called.
-- @function [parent=#derma] SkinChangeIndex
-- @return #number Amount of times **derma.RefreshSkins** has been called.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Calls the specified hook for the given panel.
-- @function [parent=#derma] SkinHook
-- @param #string type The type of hook to run.
-- @param #string name The name of the hook to run.
-- @param #Panel panel The panel to call the hook for.
-- @param #number w The width of the panel.
-- @param #number h The height of the panel.
-- @return #any The returned variable from the skin hook.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Returns a function to draw a specified texture of panels skin.
-- @function [parent=#derma] SkinTexture
-- @param #string name The identifier of the texture.
-- @param #Panel pnl Panel to get the skin of.
-- @param #any fallback What to return if we failed to retrieve the texture. _(Default: nil)_
-- @return #function A function that is created with the **GWEN library** to draw a texture.

return nil
10 changes: 5 additions & 5 deletions api/draw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
-- @param #number x The X Coordinate. _(Default: 0)_
-- @param #number y The Y Coordinate. _(Default: 0)_
-- @param #table color Color to draw the text in. Uses the Color structure. _(Default: Color(255,255,255,255))_
-- @param #number xAlign Where to align the text horizontally. Uses the TEXT\_ALIGN\_Enums. _(Default: TEXT_ALIGN_LEFT)_
-- @param #number xAlign Where to align the text horizontally. Uses the TEXT\_ALIGN\_ Enums. _(Default: TEXT_ALIGN_LEFT)_

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
Expand Down Expand Up @@ -93,8 +93,8 @@
-- @param #number x The X Coordinate. _(Default: 0)_
-- @param #number y The Y Coordinate. _(Default: 0)_
-- @param #table color Color to draw the text in. Uses the Color structure. _(Default: Color(255,255,255,255))_
-- @param #number xAlign Where to align the text horizontally. Uses the TEXT\_ALIGN\_Enums. _(Default: TEXT_ALIGN_LEFT)_
-- @param #number yAlign Where to align the text vertically. Uses the TEXT\_ALIGN\_Enums. _(Default: TEXT_ALIGN_TOP)_
-- @param #number xAlign Where to align the text horizontally. Uses the TEXT\_ALIGN\_ Enums. _(Default: TEXT_ALIGN_LEFT)_
-- @param #number yAlign Where to align the text vertically. Uses the TEXT\_ALIGN\_ Enums. _(Default: TEXT_ALIGN_TOP)_
-- @return #number, #number The width and height of the text. Same values as if you were calling **surface.GetTextSize**.

-------------------------------------------------------------------------------
Expand All @@ -111,8 +111,8 @@
-- @param #number x The X Coordinate. _(Default: 0)_
-- @param #number y The Y Coordinate. _(Default: 0)_
-- @param #table color Color to draw the text in. Uses the Color structure. _(Default: Color(255,255,255,255))_
-- @param #number xAlign Where to align the text horizontally. Uses the TEXT\_ALIGN\_Enums. _(Default: TEXT_ALIGN_LEFT)_
-- @param #number yAlign Where to align the text vertically. Uses the TEXT\_ALIGN\_Enums. _(Default: TEXT_ALIGN_TOP)_
-- @param #number xAlign Where to align the text horizontally. Uses the TEXT\_ALIGN\_ Enums. _(Default: TEXT_ALIGN_LEFT)_
-- @param #number yAlign Where to align the text vertically. Uses the TEXT\_ALIGN\_ Enums. _(Default: TEXT_ALIGN_TOP)_
-- @return #number, #number The width and height of the text. Same values as if you were calling **surface.GetTextSize**.

-------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion api/ents.lua
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
-- @param #string target Name of the target entity.
-- @param #Entity activator Activator of the event.
-- @param #Entity caller Caller of the event.
-- @param #number usetype Use type. See the **USE\_Enums**.
-- @param #number usetype Use type. See the **USE\_ Enums**.
-- @param #number value This value is passed to **ENTITY:Use**, but isn't used by any default entities in the engine.

-------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 848143c

Please sign in to comment.