forked from pioneerspacesim/pioneer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request pioneerspacesim#5773 from Web-eWorks/lua-utils
Misc cleanup, fixes, and Lua function library improvements
- Loading branch information
Showing
21 changed files
with
279 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
-- Copyright © 2008-2023 Pioneer Developers. See AUTHORS.txt for details | ||
-- Licensed under the terms of the GPL v3. See licenses/GPL-3.txt | ||
|
||
-- This file implements type information about C++ classes for Lua static analysis | ||
|
||
---@meta | ||
|
||
---@class Color | ||
---@field r integer | ||
---@field g integer | ||
---@field b integer | ||
---@field a integer | ||
--- | ||
---@operator add: Color | ||
---@operator add(number): Color | ||
---@operator mul: Color | ||
---@operator mul(number): Color | ||
---@operator call: Color | ||
|
||
---@class Color | ||
local Color = {} | ||
|
||
---@param r number | ||
---@param g number | ||
---@param b number | ||
---@param a number? | ||
---@return Color | ||
---@overload fun(hex: string): Color | ||
function _G.Color(r, g, b, a) end | ||
|
||
-- Return a copy of this color darkened by the given amount (in 0.0..1.0) | ||
-- Use negative values to lighten. | ||
-- | ||
-- Rturns a new Color object | ||
---@param s number | ||
---@return Color | ||
function Color:shade(s) end | ||
|
||
-- Increase the perceptual saturation of this color by some factor (in 0.0..1.0) | ||
-- | ||
-- Returns a new Color object | ||
---@param t number | ||
---@return Color | ||
function Color:tint(t) end | ||
|
||
-- Set the opacity of this color to the passed value (in 0.0..1.0 or 1..255) | ||
-- | ||
-- Returns a new Color object | ||
---@param o number | ||
---@return Color | ||
function Color:opacity(o) end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.