mirror of
https://github.com/edubart/otclient.git
synced 2025-10-20 14:33:26 +02:00
Refactoring and flexibility changes
* Split game module into game and game_interface * Move core_lib to corelib * Move miniwindow to corelib * Introduce init.lua script for initializing the client, giving much more flexibility * OTClient is no longer Application derived and is much simpler
This commit is contained in:
@@ -336,7 +336,7 @@ void UIManager::importStyleFromOTML(const OTMLNodePtr& styleNode)
|
||||
}
|
||||
|
||||
// Warn about redefined styles
|
||||
if(!g_app->isRunning() && !unique) {
|
||||
if(!g_app.isRunning() && !unique) {
|
||||
auto it = m_styles.find(name);
|
||||
if(it != m_styles.end())
|
||||
g_logger.warning(stdext::format("style '%s' is being redefined", name));
|
||||
|
@@ -253,7 +253,7 @@ void UITextEdit::setCursorPos(int pos)
|
||||
else
|
||||
m_cursorPos = pos;
|
||||
update();
|
||||
g_app->repaint();
|
||||
g_app.repaint();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -516,5 +516,5 @@ bool UITextEdit::onMousePress(const Point& mousePos, Fw::MouseButton button)
|
||||
void UITextEdit::blinkCursor()
|
||||
{
|
||||
m_cursorTicks = g_clock.millis();
|
||||
g_app->repaint();
|
||||
g_app.repaint();
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ UIWidget::UIWidget()
|
||||
|
||||
UIWidget::~UIWidget()
|
||||
{
|
||||
assert(!g_app->isTermianted());
|
||||
assert(!g_app.isTermianted());
|
||||
#ifdef DEBUG
|
||||
if(!m_destroyed)
|
||||
g_logger.warning(stdext::format("widget '%s' was not explicitly destroyed", m_id));
|
||||
@@ -1375,7 +1375,7 @@ void UIWidget::onStyleApply(const std::string& styleName, const OTMLNodePtr& sty
|
||||
parseImageStyle(styleNode);
|
||||
parseTextStyle(styleNode);
|
||||
|
||||
g_app->repaint();
|
||||
g_app.repaint();
|
||||
}
|
||||
|
||||
void UIWidget::onGeometryChange(const Rect& oldRect, const Rect& newRect)
|
||||
@@ -1391,7 +1391,7 @@ void UIWidget::onGeometryChange(const Rect& oldRect, const Rect& newRect)
|
||||
|
||||
callLuaField("onGeometryChange", oldRect, newRect);
|
||||
|
||||
g_app->repaint();
|
||||
g_app.repaint();
|
||||
}
|
||||
|
||||
void UIWidget::onLayoutUpdate()
|
||||
|
@@ -94,7 +94,7 @@ void UIWidget::drawText(const Rect& screenCoords)
|
||||
|
||||
void UIWidget::onTextChange(const std::string& text, const std::string& oldText)
|
||||
{
|
||||
g_app->repaint();
|
||||
g_app.repaint();
|
||||
callLuaField("onTextChange", text, oldText);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user