fix(lua): small lua / lau doc fixes (#2415)

* fix(lua): small lua / lau doc fixes: expose stats.get_character_index like intended. also add a bit of doc to button and sameline pages so that the user is correctly refered to the tab class doc
This commit is contained in:
Quentin 2023-11-14 20:20:45 +01:00 committed by GitHub
parent 937e1b5a13
commit 9d7e5893c6
5 changed files with 6 additions and 0 deletions

View File

@ -3,4 +3,5 @@
## Inherit from 1 class: base_text_element
Class representing a gui button.
Refer to the tab class documentation for more info (tab:add_button(name, callback))

View File

@ -1,4 +1,5 @@
# Class: sameline
Class for ImGui::SameLine() - Puts a sameline between widgets or groups to layout them horizontally.
Refer to the tab class documentation for more info (tab:add_sameline())

View File

@ -8,6 +8,7 @@ namespace lua::gui
// Name: button
// Inherit: base_text_element
// Class representing a gui button.
// Refer to the tab class documentation for more info (tab:add_button(name, callback))
class button : public base_text_element
{
sol::protected_function m_callback;

View File

@ -6,6 +6,7 @@ namespace lua::gui
// Lua API: Class
// Name: sameline
// Class for ImGui::SameLine() - Puts a sameline between widgets or groups to layout them horizontally.
// Refer to the tab class documentation for more info (tab:add_sameline())
class sameline : public gui_element
{
public:

View File

@ -277,6 +277,8 @@ namespace lua::stats
{
auto ns = state["stats"].get_or_create<sol::table>();
ns["get_character_index"] = get_character_index;
ns["get_bool"] = sol::overload(get_bool_hash, get_bool_name);
ns["get_bool_masked"] = sol::overload(get_bool_masked_hash, get_bool_masked_name);
ns["get_float"] = sol::overload(get_float_hash, get_float_name);