mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
LUA-Api: add alignment parameter for text in window header
Possible modes are :
* "DEFAULT" (left)
* "CENTER"
* "RIGHT"
TODO: doc
Origin commit data
------------------
Branch: ni/coolstream
Commit: a788eee298
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-03-31 (Fri, 31 Mar 2017)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -220,7 +220,10 @@ int CLuaInstCCWindow::CCWindowSetCaption(lua_State *L)
|
||||
std::string name = "";
|
||||
tableLookup(L, "name", name) || tableLookup(L, "title", name) || tableLookup(L, "caption", name);
|
||||
|
||||
D->w->setWindowCaption(name);
|
||||
lua_Integer alignment = (lua_Integer)CTextBox::NO_AUTO_LINEBREAK;
|
||||
tableLookup(L, "alignment", alignment);
|
||||
|
||||
D->w->setWindowCaption(name, alignment | (lua_Integer)CTextBox::NO_AUTO_LINEBREAK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user