mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-10 04:26:42 +03:00
Move Color to Scripting.
This commit is contained in:
parent
416be03d95
commit
7c484d2510
11 changed files with 16 additions and 20 deletions
40
Scripting/include/GameScriptColor.h
Normal file
40
Scripting/include/GameScriptColor.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
#pragma once
|
||||
#include "framework.h"
|
||||
|
||||
typedef DWORD D3DCOLOR;
|
||||
|
||||
namespace sol {
|
||||
class state;
|
||||
template <typename T> struct as_table_t;
|
||||
}
|
||||
|
||||
class GameScriptColor {
|
||||
public:
|
||||
byte r{ 0 };
|
||||
byte g{ 0 };
|
||||
byte b{ 0 };
|
||||
byte a{ 255 };
|
||||
|
||||
GameScriptColor(byte r, byte g, byte b);
|
||||
GameScriptColor(byte r, byte g, byte b, byte a);
|
||||
GameScriptColor(Vector3 const &);
|
||||
GameScriptColor(Vector4 const &);
|
||||
GameScriptColor(D3DCOLOR);
|
||||
|
||||
operator Vector3() const;
|
||||
operator Vector4() const;
|
||||
operator D3DCOLOR() const;
|
||||
|
||||
byte GetR() const;
|
||||
void SetR(byte v);
|
||||
byte GetG() const;
|
||||
void SetG(byte v);
|
||||
byte GetB() const;
|
||||
void SetB(byte v);
|
||||
byte GetA() const;
|
||||
void SetA(byte v);
|
||||
|
||||
std::string ToString() const;
|
||||
|
||||
static void Register(sol::state* state);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue