mirror of
https://github.com/edubart/otclient.git
synced 2025-10-20 06:23:26 +02:00
protocol via script
This commit is contained in:
@@ -34,7 +34,7 @@ void UIButton::onInputEvent(const InputEvent& event)
|
||||
} else if(event.type == EV_MOUSE_LUP && m_state == ButtonDown) {
|
||||
m_state = ButtonUp;
|
||||
if(getRect().contains(event.mousePos)) {
|
||||
g_dispatcher.addTask(boost::bind(&Scriptable::callLuaTableField, shared_from_this(), "onClick"));
|
||||
g_dispatcher.addTask(boost::bind(&Scriptable::callLuaTableField, shared_from_this(), "onClick", 0));
|
||||
}
|
||||
} else if(event.type == EV_MOUSE_MOVE && m_state != ButtonDown) {
|
||||
if(isMouseOver())
|
||||
|
@@ -115,7 +115,7 @@ void UIElement::setSkin(const UIElementSkinPtr& skin)
|
||||
|
||||
void UIElement::onLoad()
|
||||
{
|
||||
g_dispatcher.addTask(boost::bind(&Scriptable::callLuaTableField, shared_from_this(), "onLoad"));
|
||||
g_dispatcher.addTask(boost::bind(&Scriptable::callLuaTableField, shared_from_this(), "onLoad", 0));
|
||||
}
|
||||
|
||||
void UIElement::render()
|
||||
|
@@ -40,7 +40,7 @@ public:
|
||||
void onRectUpdate();
|
||||
void onFocusChange();
|
||||
|
||||
void setText(const std::string& text);
|
||||
void setText(const std::string& text) { m_textArea.setText(text); }
|
||||
std::string getText() const { return m_textArea.getText(); }
|
||||
TextArea& getTextArea() { return m_textArea; }
|
||||
|
||||
|
Reference in New Issue
Block a user