本文整理汇总了C++中LUACHECKOBJ函数的典型用法代码示例。如果您正苦于以下问题:C++ LUACHECKOBJ函数的具体用法?C++ LUACHECKOBJ怎么用?C++ LUACHECKOBJ使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LUACHECKOBJ函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: Vector2f__eq
int Vector2f__eq(lua_State* L)
{
Vector2f* lhs = LuaType<Vector2f>::check(L,1);
LUACHECKOBJ(lhs);
Vector2f* rhs = LuaType<Vector2f>::check(L,2);
LUACHECKOBJ(rhs);
lua_pushboolean(L, (*lhs) == (*rhs) ? 1 : 0);
return 1;
}
开发者ID:dmikoss,项目名称:libRocket,代码行数:10,代码来源:Vector2f.cpp
示例2: Colourb__eq
int Colourb__eq(lua_State* L)
{
Colourb* lhs = LuaType<Colourb>::check(L,1);
LUACHECKOBJ(lhs);
Colourb* rhs = LuaType<Colourb>::check(L,2);
LUACHECKOBJ(rhs);
lua_pushboolean(L, (*lhs) == (*rhs) ? 1 : 0);
return 1;
}
开发者ID:ahlekoofe,项目名称:gamekit,代码行数:10,代码来源:Colourb.cpp
示例3: Colourb__add
int Colourb__add(lua_State* L)
{
Colourb* lhs = LuaType<Colourb>::check(L,1);
LUACHECKOBJ(lhs);
Colourb* rhs = LuaType<Colourb>::check(L,2);
LUACHECKOBJ(rhs);
Colourb* res = new Colourb((*lhs) + (*rhs));
LuaType<Colourb>::push(L,res,true);
return 1;
}
开发者ID:ahlekoofe,项目名称:gamekit,代码行数:12,代码来源:Colourb.cpp
示例4: Vector2f__sub
int Vector2f__sub(lua_State* L)
{
Vector2f* lhs = LuaType<Vector2f>::check(L,1);
LUACHECKOBJ(lhs);
Vector2f* rhs = LuaType<Vector2f>::check(L,2);
LUACHECKOBJ(rhs);
Vector2f* res = new Vector2f(*lhs);
(*res) -= (*rhs);
LuaType<Vector2f>::push(L,res,true);
return 1;
}
开发者ID:dmikoss,项目名称:libRocket,代码行数:13,代码来源:Vector2f.cpp
示例5: ColourfGetAttralpha
int ColourfGetAttralpha(lua_State* L)
{
Colourf* obj = LuaType<Colourf>::check(L,1);
LUACHECKOBJ(obj);
lua_pushnumber(L,obj->alpha);
return 1;
}
开发者ID:dmikoss,项目名称:libRocket,代码行数:7,代码来源:Colourf.cpp
示例6: ElementDataGridRowGetAttrparent_grid
int ElementDataGridRowGetAttrparent_grid(lua_State* L)
{
ElementDataGridRow* obj = LuaType<ElementDataGridRow>::check(L,1);
LUACHECKOBJ(obj);
LuaType<ElementDataGrid>::push(L,obj->GetParentGrid(),false);
return 1;
}
开发者ID:ppiecuch,项目名称:libRocket,代码行数:7,代码来源:ElementDataGridRow.cpp
示例7: ElementDataGridRowGetAttrtable_relative_index
int ElementDataGridRowGetAttrtable_relative_index(lua_State* L)
{
ElementDataGridRow* obj = LuaType<ElementDataGridRow>::check(L,1);
LUACHECKOBJ(obj);
lua_pushinteger(L,obj->GetTableRelativeIndex());
return 1;
}
开发者ID:ppiecuch,项目名称:libRocket,代码行数:7,代码来源:ElementDataGridRow.cpp
示例8: ElementDataGridRowGetAttrrow_expanded
//getters
int ElementDataGridRowGetAttrrow_expanded(lua_State* L)
{
ElementDataGridRow* obj = LuaType<ElementDataGridRow>::check(L,1);
LUACHECKOBJ(obj);
lua_pushboolean(L,obj->IsRowExpanded());
return 1;
}
开发者ID:ppiecuch,项目名称:libRocket,代码行数:8,代码来源:ElementDataGridRow.cpp
示例9: DocumentGetAttrcontext
int DocumentGetAttrcontext(lua_State* L)
{
Document* doc = LuaType<Document>::check(L,1);
LUACHECKOBJ(doc);
LuaType<Context>::push(L,doc->GetContext(),false);
return 1;
}
开发者ID:1vanK,项目名称:libRocket-Urho3D,代码行数:7,代码来源:Document.cpp
示例10: DocumentGetAttrtitle
//getters
int DocumentGetAttrtitle(lua_State* L)
{
Document* doc = LuaType<Document>::check(L,1);
LUACHECKOBJ(doc);
lua_pushstring(L,doc->GetTitle().CString());
return 1;
}
开发者ID:1vanK,项目名称:libRocket-Urho3D,代码行数:8,代码来源:Document.cpp
示例11: SelectOptionsProxy__ipairs
//[1] is the object, [2] is the previous key, [3] is the userdata
int SelectOptionsProxy__ipairs(lua_State* L)
{
SelectOptionsProxy* proxy = LuaType<SelectOptionsProxy>::check(L,1);
LUACHECKOBJ(proxy);
int* pindex = (int*)lua_touserdata(L,3);
if((*pindex) == -1)
*pindex = 0;
SelectOption* opt = NULL;
while((*pindex) < proxy->owner->GetNumOptions())
{
opt = proxy->owner->GetOption((*pindex)++);
if(opt != NULL)
break;
}
//we got to the end without finding an option
if(opt == NULL)
{
lua_pushnil(L);
lua_pushnil(L);
}
else //we found an option
{
lua_pushinteger(L,(*pindex)-1); //key
lua_newtable(L); //value
//fill the value
LuaType<Rocket::Core::Element>::push(L,opt->GetElement());
lua_setfield(L,-2,"element");
lua_pushstring(L,opt->GetValue().CString());
lua_setfield(L,-2,"value");
}
return 2;
}
开发者ID:ppiecuch,项目名称:libRocket,代码行数:33,代码来源:SelectOptionsProxy.cpp
示例12: ElementFormControlGetAttrdisabled
//getters
int ElementFormControlGetAttrdisabled(lua_State* L)
{
ElementFormControl* efc = LuaType<ElementFormControl>::check(L,1);
LUACHECKOBJ(efc);
lua_pushboolean(L,efc->IsDisabled());
return 1;
}
开发者ID:dmikoss,项目名称:libRocket,代码行数:8,代码来源:ElementFormControl.cpp
示例13: ColourbGetAttralpha
int ColourbGetAttralpha(lua_State* L)
{
Colourb* obj = LuaType<Colourb>::check(L,1);
LUACHECKOBJ(obj);
lua_pushinteger(L,obj->alpha);
return 1;
}
开发者ID:ahlekoofe,项目名称:gamekit,代码行数:7,代码来源:Colourb.cpp
示例14: ElementFormControlGetAttrvalue
int ElementFormControlGetAttrvalue(lua_State* L)
{
ElementFormControl* efc = LuaType<ElementFormControl>::check(L,1);
LUACHECKOBJ(efc);
lua_pushstring(L,efc->GetValue().CString());
return 1;
}
开发者ID:dmikoss,项目名称:libRocket,代码行数:7,代码来源:ElementFormControl.cpp
示例15: ContextDocumentsProxy__pairs
//[1] is the object, [2] is the last used key, [3] is the userdata
int ContextDocumentsProxy__pairs(lua_State* L)
{
Document* doc = NULL;
ContextDocumentsProxy* obj = LuaType<ContextDocumentsProxy>::check(L,1);
LUACHECKOBJ(obj);
int* pindex = (int*)lua_touserdata(L,3);
if((*pindex) == -1)
*pindex = 0;
int num_docs = obj->owner->GetNumDocuments();
//because there can be missing indexes, make sure to continue until there
//is actually a document at the index
while((*pindex) < num_docs)
{
doc = obj->owner->GetDocument((*pindex)++);
if(doc != NULL)
break;
}
//If we found a document
if(doc != NULL)
{
lua_pushstring(L,doc->GetId().CString());
LuaType<Document>::push(L,doc);
}
else //if we were at the end and didn't find a document
{
lua_pushnil(L);
lua_pushnil(L);
}
return 2;
}
开发者ID:Ali-il,项目名称:gamekit,代码行数:33,代码来源:ContextDocumentsProxy.cpp
示例16: ElementFormControlSetAttrdisabled
//setters
int ElementFormControlSetAttrdisabled(lua_State* L)
{
ElementFormControl* efc = LuaType<ElementFormControl>::check(L,1);
LUACHECKOBJ(efc);
efc->SetDisabled(CHECK_BOOL(L,2));
return 0;
}
开发者ID:dmikoss,项目名称:libRocket,代码行数:8,代码来源:ElementFormControl.cpp
示例17: EventGetAttrcurrent_element
//getters
int EventGetAttrcurrent_element(lua_State* L)
{
Event* evt = LuaType<Event>::check(L,1);
LUACHECKOBJ(evt);
Element* ele = evt->GetCurrentElement();
LuaType<Element>::push(L,ele,false);
return 1;
}
开发者ID:dmikoss,项目名称:libRocket,代码行数:9,代码来源:Event.cpp
示例18: ElementDataGridSetDataSource
int ElementDataGridSetDataSource(lua_State* L, ElementDataGrid* obj)
{
LUACHECKOBJ(obj);
const char* source = luaL_checkstring(L,1);
obj->SetDataSource(source);
return 0;
}
开发者ID:1vanK,项目名称:libRocket-Urho3D,代码行数:8,代码来源:ElementDataGrid.cpp
示例19: ElementFormControlSelectSetAttrselection
//setter
int ElementFormControlSelectSetAttrselection(lua_State* L)
{
ElementFormControlSelect* obj = LuaType<ElementFormControlSelect>::check(L,1);
LUACHECKOBJ(obj);
int selection = luaL_checkinteger(L,2);
obj->SetSelection(selection);
return 0;
}
开发者ID:1vanK,项目名称:libRocket-Urho3D,代码行数:9,代码来源:ElementFormControlSelect.cpp
示例20: ElementFormControlSelectGetAttrselection
int ElementFormControlSelectGetAttrselection(lua_State* L)
{
ElementFormControlSelect* obj = LuaType<ElementFormControlSelect>::check(L,1);
LUACHECKOBJ(obj);
int selection = obj->GetSelection();
lua_pushinteger(L,selection);
return 1;
}
开发者ID:1vanK,项目名称:libRocket-Urho3D,代码行数:8,代码来源:ElementFormControlSelect.cpp
注:本文中的LUACHECKOBJ函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论