summaryrefslogtreecommitdiff
path: root/utils/themeeditor/graphics/rbscreen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/graphics/rbscreen.cpp')
-rw-r--r--utils/themeeditor/graphics/rbscreen.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/utils/themeeditor/graphics/rbscreen.cpp b/utils/themeeditor/graphics/rbscreen.cpp
index 004d2e0..a090c2f 100644
--- a/utils/themeeditor/graphics/rbscreen.cpp
+++ b/utils/themeeditor/graphics/rbscreen.cpp
@@ -67,6 +67,11 @@ RBScreen::~RBScreen()
{
if(backdrop)
delete backdrop;
+
+ QMap<int, RBFont*>::iterator i;
+ for(i = fonts.begin(); i != fonts.end(); i++)
+ if(*i)
+ delete (*i);
}
QPainterPath RBScreen::shape() const
@@ -103,6 +108,23 @@ void RBScreen::showViewport(QString name)
update();
}
+void RBScreen::loadFont(int id, RBFont* font)
+{
+ if(id < 2 || id > 9)
+ return;
+
+ fonts.insert(id, font);
+}
+
+RBFont* RBScreen::getFont(int id)
+{
+ if(fonts.value(id, 0) != 0)
+ return fonts.value(id);
+ else
+ return fonts.value(0, 0);
+}
+
+
void RBScreen::setBackdrop(QString filename)
{