Fixes from last commit.

--HG--
branch : dev
This commit is contained in:
Martín Lucas Golini
2019-01-13 18:42:55 -03:00
parent 7839a95f77
commit b2b6aca4b9
9 changed files with 8 additions and 24 deletions

View File

@@ -97,7 +97,7 @@ class EE_API Node : public Transformable {
virtual const Sizef& getSize() const;
virtual const Sizef& getPixelsSize() const;
const Sizef& getPixelsSize() const;
Node * setVisible( const bool& visible );

View File

@@ -69,7 +69,7 @@ class EE_API UIGridLayout : public UILayout {
virtual Uint32 onMessage( const NodeMessage * Msg );
Sizef getTargetElementSize();
Sizef getTargetElementSize() const;
void pack();
};

View File

@@ -73,8 +73,6 @@ class EE_API UINode : public Node {
const Sizef& getSize() const;
virtual const Sizef& getPixelsSize() const;
Rect getRect() const;
virtual void draw();

View File

@@ -20,9 +20,7 @@ class EE_API UISceneNode : public SceneNode {
virtual Node * setSize( const Float& Width, const Float& Height );
const Sizef& getSize();
virtual const Sizef& getPixelsSize();
const Sizef& getSize() const;
void setTranslator( Translator translator );

View File

@@ -155,7 +155,7 @@ const Sizef& Node::getSize() const {
}
const Sizef& Node::getPixelsSize() const {
return getSize();
return mSize;
}
Node * Node::setVisible( const bool& visible ) {

View File

@@ -46,10 +46,6 @@ void StyleSheet::combineStyleSheet( const StyleSheet& styleSheet ) {
StyleSheet::StyleSheetPseudoClassProperties StyleSheet::getElementProperties( StyleSheetElement * element ) {
StyleSheetPseudoClassProperties propertiesSelectedByPseudoClass;
int c = 0;
if ( element->getStyleSheetId() == "lvbox" ) {
c++;
}
for ( auto it = mNodes.begin(); it != mNodes.end(); ++it ) {
StyleSheetNode& node = it->second;
@@ -58,9 +54,9 @@ StyleSheet::StyleSheetPseudoClassProperties StyleSheet::getElementProperties( St
if ( selector.matches( element ) ) {
for ( auto pit = node.getProperties().begin(); pit != node.getProperties().end(); ++pit ) {
StyleSheetProperties& pseudoClassProperties = propertiesSelectedByPseudoClass[selector.getPseudoClass()];
auto it = pseudoClassProperties.find( pit->second.getName() );
auto pcit = pseudoClassProperties.find( pit->second.getName() );
if ( it == pseudoClassProperties.end() || pit->second.getSpecificity() >= it->second.getSpecificity() ) {
if ( pcit == pseudoClassProperties.end() || pit->second.getSpecificity() >= pcit->second.getSpecificity() ) {
pseudoClassProperties[ pit->second.getName() ] = pit->second;
}
}

View File

@@ -199,7 +199,7 @@ Uint32 UIGridLayout::onMessage(const NodeMessage * Msg) {
return 0;
}
Sizef UIGridLayout::getTargetElementSize() {
Sizef UIGridLayout::getTargetElementSize() const {
return Sizef( mColumnMode == Size ? mColumnWidth : ( ( getLayoutHeightRules() == WRAP_CONTENT ? getParent()->getSize().getWidth() : mDpSize.getWidth() ) - mPadding.Left - mPadding.Right ) * mColumnWeight,
mRowMode == Size ? mRowHeight : ( ( getLayoutHeightRules() == WRAP_CONTENT ? getParent()->getSize().getHeight() : mDpSize.getHeight() ) - mPadding.Top - mPadding.Bottom ) * mRowWeight );
}

View File

@@ -203,10 +203,6 @@ const Sizef& UINode::getSize() const {
return mDpSize;
}
const Sizef& UINode::getPixelsSize() const {
return mSize;
}
void UINode::drawHighlightFocus() {
if ( NULL != getEventDispatcher() && mSceneNode->getHighlightFocus() && getEventDispatcher()->getFocusControl() == this ) {
Primitives P;

View File

@@ -261,14 +261,10 @@ Node * UISceneNode::setSize(const Float & Width, const Float & Height) {
return setSize( Vector2f( Width, Height ) );
}
const Sizef &UISceneNode::getSize() {
const Sizef &UISceneNode::getSize() const {
return mDpSize;
}
const Sizef &UISceneNode::getPixelsSize() {
return mSize;
}
const bool& UISceneNode::isLoading() const {
return mIsLoading;
}