Skip to content

Commit

Permalink
UIGraph improved with new features
Browse files Browse the repository at this point in the history
  • Loading branch information
Oen44 committed Dec 7, 2024
1 parent 5932d52 commit da6a9cc
Show file tree
Hide file tree
Showing 3 changed files with 421 additions and 125 deletions.
10 changes: 8 additions & 2 deletions src/client/luafunctions_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -968,12 +968,18 @@ void Client::registerLuaFunctions()

g_lua.registerClass<UIGraph, UIWidget>();
g_lua.bindClassStaticFunction<UIGraph>("create", [] { return std::make_shared<UIGraph>(); });
g_lua.bindClassMemberFunction<UIGraph>("addValue", &UIGraph::addValue);
g_lua.bindClassMemberFunction<UIGraph>("clear", &UIGraph::clear);
g_lua.bindClassMemberFunction<UIGraph>("setLineWidth", &UIGraph::setLineWidth);
g_lua.bindClassMemberFunction<UIGraph>("createGraph", &UIGraph::createGraph);
g_lua.bindClassMemberFunction<UIGraph>("addValue", &UIGraph::addValue);
g_lua.bindClassMemberFunction<UIGraph>("setCapacity", &UIGraph::setCapacity);
g_lua.bindClassMemberFunction<UIGraph>("setTitle", &UIGraph::setTitle);
g_lua.bindClassMemberFunction<UIGraph>("setShowLabels", &UIGraph::setShowLabels);
g_lua.bindClassMemberFunction<UIGraph>("setLineWidth", &UIGraph::setLineWidth);
g_lua.bindClassMemberFunction<UIGraph>("setLineColor", &UIGraph::setLineColor);
g_lua.bindClassMemberFunction<UIGraph>("setInfoText", &UIGraph::setInfoText);
g_lua.bindClassMemberFunction<UIGraph>("setInfoLineColor", &UIGraph::setInfoLineColor);
g_lua.bindClassMemberFunction<UIGraph>("setTextBackground", &UIGraph::setTextBackground);
g_lua.bindClassMemberFunction<UIGraph>("setGraphVisible", &UIGraph::setGraphVisible);

g_lua.registerClass<UIGrid, UIWidget>();
g_lua.bindClassStaticFunction<UIGrid>("create", [] { return std::make_shared<UIGrid>(); });
Expand Down
Loading

0 comments on commit da6a9cc

Please sign in to comment.