mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Fixes from last commit.
--HG-- branch : dev
This commit is contained in:
@@ -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 );
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ class EE_API UIGridLayout : public UILayout {
|
||||
|
||||
virtual Uint32 onMessage( const NodeMessage * Msg );
|
||||
|
||||
Sizef getTargetElementSize();
|
||||
Sizef getTargetElementSize() const;
|
||||
|
||||
void pack();
|
||||
};
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ const Sizef& Node::getSize() const {
|
||||
}
|
||||
|
||||
const Sizef& Node::getPixelsSize() const {
|
||||
return getSize();
|
||||
return mSize;
|
||||
}
|
||||
|
||||
Node * Node::setVisible( const bool& visible ) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user