mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +00:00
Add documentation about a few more things
- Color class - String concatenation operator - Object.GetClass
This commit is contained in:
parent
6f4f38a34b
commit
1801b2ee58
1 changed files with 18 additions and 1 deletions
|
@ -296,6 +296,7 @@ struct TexMan
|
|||
|
||||
/*
|
||||
// Intrinsic TextureID methods
|
||||
// This isn't really a class, and can be used as an integer
|
||||
struct TextureID
|
||||
{
|
||||
native bool IsValid();
|
||||
|
@ -304,6 +305,19 @@ struct TextureID
|
|||
native void SetInvalid();
|
||||
native void SetNull();
|
||||
}
|
||||
|
||||
// 32-bit RGBA color - each component is one byte, or 8-bit
|
||||
// This isn't really a class, and can be used as an integer
|
||||
class Color
|
||||
{
|
||||
// Constructor - alpha channel is optional
|
||||
Color(int alpha, int red, int green, int blue);
|
||||
Color(int red, int green, int blue); // Alpha is 0 if omitted
|
||||
int r; // Red
|
||||
int g; // Green
|
||||
int b; // Blue
|
||||
int a; // Alpha
|
||||
}
|
||||
*/
|
||||
|
||||
enum EScaleMode
|
||||
|
@ -634,6 +648,7 @@ class Object native
|
|||
virtual virtualscope void OnDestroy() {}
|
||||
// clearscope Object GetParentClass(); // Intrinsic - Get the parent class of this object
|
||||
// clearscope Name GetClassName(); // Intrinsic - Get the name of this object's class
|
||||
// clearscope Class<Object> GetClass(); // Intrinsic - Get the object's class
|
||||
}
|
||||
|
||||
class BrokenLines : Object native version("2.4")
|
||||
|
@ -700,12 +715,14 @@ enum EmptyTokenType
|
|||
}
|
||||
|
||||
// Although String is a builtin type, this is a convenient way to attach methods to it.
|
||||
// All of these methods, except for the static ones, are available on instances of String
|
||||
struct StringStruct native
|
||||
{
|
||||
native static vararg String Format(String fmt, ...);
|
||||
native vararg void AppendFormat(String fmt, ...);
|
||||
// native int Length(); // Intrinsic
|
||||
// bool operator~==(String other) // Case-insensitive equality comparison
|
||||
// native bool operator~==(String other) // Case-insensitive equality comparison
|
||||
// native String operator..(String other) // Concatenate with another String
|
||||
native void Replace(String pattern, String replacement);
|
||||
native String Left(int len) const;
|
||||
native String Mid(int pos = 0, int len = 2147483647) const;
|
||||
|
|
Loading…
Reference in a new issue