Esempio n. 1
0
static int Color_GetColor (lua_State *L) {
  int r, g, b, a;
  luaL_checkcolor(L, 1).GetColor(r, g, b, a);
  lua_pushinteger(L, r);
  lua_pushinteger(L, g);
  lua_pushinteger(L, b);
  lua_pushinteger(L, a);
  return 4;
}
Esempio n. 2
0
static int luasrc_ConDColorMsg (lua_State *L) {
  ConDColorMsg(*(Color *)luaL_checkcolor(L, 1), luaL_checkstring(L, 2));
  return 0;
}
Esempio n. 3
0
static int cvar_ConsoleColorPrintf (lua_State *L) {
  cvar->ConsoleColorPrintf(*(Color *)luaL_checkcolor(L, 1), luaL_checkstring(L, 2));
  return 0;
}
static int KeyValues_SetColor (lua_State *L) {
  luaL_checkkeyvalues(L, 1)->SetColor(luaL_checkstring(L, 2), luaL_checkcolor(L, 3));
  return 0;
}
Esempio n. 5
0
static int Color___tostring (lua_State *L) {
  Color color = luaL_checkcolor(L, 1);
  lua_pushfstring(L, "Color: %s", static_cast<const char *>(CFmtStr("(%i, %i, %i, %i)", color.r(), color.g(), color.b(), color.a())));
  return 1;
}
Esempio n. 6
0
static int Color_SetRawColor (lua_State *L) {
  luaL_checkcolor(L, 1).SetRawColor(luaL_checkint(L, 1));
  return 0;
}
Esempio n. 7
0
static int Color_SetColor (lua_State *L) {
  luaL_checkcolor(L, 1).SetColor(luaL_checkint(L, 1), luaL_checkint(L, 2), luaL_checkint(L, 3), luaL_optint(L, 4, 255));
  return 0;
}
Esempio n. 8
0
static int Color_r (lua_State *L) {
  lua_pushinteger(L, luaL_checkcolor(L, 1).r());
  return 1;
}
Esempio n. 9
0
static int Color___eq (lua_State *L) {
  lua_pushboolean(L, luaL_checkcolor(L, 1) == luaL_checkcolor(L, 2));
  return 1;
}