mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-11 01:01:25 +03:00
Allow parse CSS from string.
--HG-- branch : dev
This commit is contained in:
@@ -31,6 +31,8 @@ class EE_API StyleSheetParser {
|
||||
|
||||
bool loadFromPack( Pack * pack, std::string filePackPath );
|
||||
|
||||
bool loadFromString( const std::string& str );
|
||||
|
||||
void print();
|
||||
|
||||
StyleSheet& getStyleSheet();
|
||||
|
||||
@@ -66,6 +66,13 @@ void StyleSheetParser::print() {
|
||||
}
|
||||
}
|
||||
|
||||
bool StyleSheetParser::loadFromString( const std::string& str ) {
|
||||
if ( str.empty() )
|
||||
return false;
|
||||
|
||||
return loadFromMemory( (const Uint8*)&str[0], str.size() );
|
||||
}
|
||||
|
||||
StyleSheet &StyleSheetParser::getStyleSheet() {
|
||||
return mStyleSheet;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user