mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
WidgetCallback fix.
--HG-- branch : dev
This commit is contained in:
@@ -1665,7 +1665,7 @@ void UIControl::setReverseDraw( bool reverseDraw ) {
|
||||
void UIControl::invalidateDraw() {
|
||||
if ( NULL != mParentWindowCtrl ) {
|
||||
mParentWindowCtrl->invalidate();
|
||||
} else if ( NULL == mParentCtrl && isWindow() ) {
|
||||
} else if ( NULL == mParentCtrl && isWindow() ) {
|
||||
static_cast<UIWindow*>( this )->invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,16 +32,14 @@
|
||||
|
||||
namespace EE { namespace UI {
|
||||
|
||||
typedef std::map<std::string, UIWidgetCreator::CustomWidgetCb> widgetCallbackMap;
|
||||
|
||||
static widgetCallbackMap widgetCallback;
|
||||
UIWidgetCreator::WidgetCallbackMap UIWidgetCreator::widgetCallback = UIWidgetCreator::WidgetCallbackMap();
|
||||
|
||||
UIWidget * UIWidgetCreator::createFromName( std::string widgetName ) {
|
||||
String::toLowerInPlace( widgetName );
|
||||
|
||||
if ( widgetName == "widget" ) return UIWidget::New();
|
||||
else if ( widgetName == "horizontallinearlayout" || widgetName == "hll" ) return UILinearLayout::NewHorizontal();
|
||||
else if ( widgetName == "linearlayout" || widgetName == "verticallinearlayout" || widgetName == "vll" ) return UILinearLayout::NewVertical();
|
||||
else if ( widgetName == "horizontallinearlayout" || widgetName == "hll" || widgetName == "hbox" ) return UILinearLayout::NewHorizontal();
|
||||
else if ( widgetName == "linearlayout" || widgetName == "verticallinearlayout" || widgetName == "vll" || widgetName == "vbox" ) return UILinearLayout::NewVertical();
|
||||
else if ( widgetName == "relativelayout" ) return UIRelativeLayout::New();
|
||||
else if ( widgetName == "textview" ) return UITextView::New();
|
||||
else if ( widgetName == "pushbutton" ) return UIPushButton::New();
|
||||
|
||||
@@ -1127,7 +1127,7 @@ void UIWindow::internalDraw() {
|
||||
|
||||
matrixSet();
|
||||
|
||||
if ( !ownsFrameBuffer() || !UIManager::instance()->usesInvalidation() || ( mControlFlags & UI_CTRL_FLAG_NEEDS_REDRAW ) ) {
|
||||
if ( !ownsFrameBuffer() || !UIManager::instance()->usesInvalidation() || invalidated() ) {
|
||||
clipMe();
|
||||
|
||||
draw();
|
||||
@@ -1170,7 +1170,7 @@ bool UIWindow::invalidated() {
|
||||
void UIWindow::matrixSet() {
|
||||
if ( ownsFrameBuffer() ) {
|
||||
if ( NULL != mFrameBuffer ) {
|
||||
if ( !UIManager::instance()->usesInvalidation() || ( mControlFlags & UI_CTRL_FLAG_NEEDS_REDRAW ) ) {
|
||||
if ( !UIManager::instance()->usesInvalidation() || invalidated() ) {
|
||||
mFrameBufferBound = true;
|
||||
|
||||
mFrameBuffer->bind();
|
||||
|
||||
Reference in New Issue
Block a user