aboutsummaryrefslogtreecommitdiff
path: root/gui/InterfaceManager.cpp
diff options
context:
space:
mode:
authorVicent Marti2008-06-10 11:25:00 +0000
committerVicent Marti2008-06-10 11:25:00 +0000
commit29c4308c420722088f47b5724d176a3c2e4ef290 (patch)
tree945880b6859e9b38585ca40d95690e110a62543a /gui/InterfaceManager.cpp
parentda757aa2ca1c086ae2f123dc6636d17655b512c7 (diff)
downloadscummvm-rg350-29c4308c420722088f47b5724d176a3c2e4ef290.tar.gz
scummvm-rg350-29c4308c420722088f47b5724d176a3c2e4ef290.tar.bz2
scummvm-rg350-29c4308c420722088f47b5724d176a3c2e4ef290.zip
Changed DrawStep for dynamic surface drawing.
svn-id: r32643
Diffstat (limited to 'gui/InterfaceManager.cpp')
-rw-r--r--gui/InterfaceManager.cpp71
1 files changed, 7 insertions, 64 deletions
diff --git a/gui/InterfaceManager.cpp b/gui/InterfaceManager.cpp
index ffe19dbe9c..ef7fa31a46 100644
--- a/gui/InterfaceManager.cpp
+++ b/gui/InterfaceManager.cpp
@@ -72,6 +72,7 @@ void InterfaceManager::setGraphicsMode(Graphics_Mode mode) {
return;
}
+ freeRenderer();
_vectorRenderer = createRenderer(mode);
_vectorRenderer->setSurface(_screen);
}
@@ -80,46 +81,6 @@ bool InterfaceManager::init() {
return false;
}
-void InterfaceManager::drawWidgetBackground(int x, int y, uint16 hints, WidgetBackground background, WidgetStateInfo state, float scale){
-
-}
-
-void InterfaceManager::drawButton(int x, int y, const Common::String &str, WidgetStateInfo state, uint16 hints, float scale) {
-
-}
-
-void InterfaceManager::drawSurface(int x, int y, const Graphics::Surface &surface, WidgetStateInfo state, int alpha, bool themeTrans, float scale) {
-
-}
-
-void InterfaceManager::drawSlider(int x, int y, int width, WidgetStateInfo state, float scale) {
-
-}
-
-void InterfaceManager::drawCheckbox(int x, int y, const Common::String &str, bool checked, WidgetStateInfo state, float scale) {
-
-}
-
-void InterfaceManager::drawTab(int x, int y, int tabHeight, int tabWidth, const Common::Array<Common::String> &tabs, int active, uint16 hints, int titleVPad, WidgetStateInfo state, float scale) {
-
-}
-
-void InterfaceManager::drawScrollbar(int x, int y, int sliderY, int sliderHeight, ScrollbarState, WidgetStateInfo state, float scale) {
-
-}
-
-void InterfaceManager::drawPopUpWidget(int x, int y, const Common::String &sel, int deltax, WidgetStateInfo state, TextAlign align, float scale) {
-
-}
-
-void InterfaceManager::drawCaret(int x, int y, bool erase, WidgetStateInfo state, float scale) {
-
-}
-
-void InterfaceManager::drawLineSeparator(int x, int y, WidgetStateInfo state, float scale) {
-
-}
-
int InterfaceManager::runGUI() {
Common::EventManager *eventMan = _system->getEventManager();
_system->showOverlay();
@@ -142,42 +103,24 @@ int InterfaceManager::runGUI() {
steps[1].color2.r = 173;
steps[1].color2.g = 40;
steps[1].color2.b = 8;
- steps[1].x = 500;
- steps[1].y = 95;
- steps[1].r = 8;
- steps[1].w = 120;
- steps[1].h = 30;
+ steps[1].extra_data = 8; // radius
steps[1].drawing_call = &VectorRenderer::drawCallback_ROUNDSQ;
steps[1].flags = DrawStep::kStepSetGradient;
- steps[2].x = 500;
- steps[2].y = 135;
- steps[2].r = 8;
- steps[2].w = 120;
- steps[2].h = 30;
+ steps[2].extra_data = 8; // radius
steps[2].drawing_call = &VectorRenderer::drawCallback_ROUNDSQ;
steps[2].flags = DrawStep::kStepCallbackOnly;
- steps[3].x = 500;
- steps[3].y = 175;
- steps[3].r = 8;
- steps[3].w = 120;
- steps[3].h = 30;
steps[3].drawing_call = &VectorRenderer::drawCallback_ROUNDSQ;
steps[3].flags = DrawStep::kStepCallbackOnly;
bool running = true;
while (running) { // draw!!
- for (int i = 0; i < 4; ++i)
- _vectorRenderer->drawStep(&steps[i]);
-
- _vectorRenderer->setFillMode(VectorRenderer::kFillGradient);
- _vectorRenderer->setFgColor(0, 0, 0);
- _vectorRenderer->setBgColor(128, 64, 255);
- _vectorRenderer->drawTriangle(32, 32, 64, 64, VectorRenderer::kTriangleUp);
-
- _vectorRenderer->drawBeveledSquare(128, 128, 256, 64, 4);
+ _vectorRenderer->drawStep(Common::Rect(), &steps[0]);
+ _vectorRenderer->drawStep(Common::Rect(32, 32, 256, 256), &steps[1]);
+ _vectorRenderer->drawStep(Common::Rect(128, 128, 512, 190), &steps[2]);
+// _vectorRenderer->drawStep(Common::Rect(32, 32, 256, 256), &steps[3]);
_vectorRenderer->copyFrame(_system);