aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gfx
diff options
context:
space:
mode:
authorMax Horn2009-03-24 12:46:48 +0000
committerMax Horn2009-03-24 12:46:48 +0000
commitb76f7fea4eee59eb88d8028120bb1cae780f1c00 (patch)
tree0174fb28d19ebacc2e6d75cd31cd3c76e7e1df50 /engines/sci/gfx
parent33895c0220c114653ee77a347452f03e8b8654f7 (diff)
downloadscummvm-rg350-b76f7fea4eee59eb88d8028120bb1cae780f1c00.tar.gz
scummvm-rg350-b76f7fea4eee59eb88d8028120bb1cae780f1c00.tar.bz2
scummvm-rg350-b76f7fea4eee59eb88d8028120bb1cae780f1c00.zip
SCI: Changed some char* into Common::String
svn-id: r39663
Diffstat (limited to 'engines/sci/gfx')
-rw-r--r--engines/sci/gfx/sci_widgets.cpp6
-rw-r--r--engines/sci/gfx/sci_widgets.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/sci/gfx/sci_widgets.cpp b/engines/sci/gfx/sci_widgets.cpp
index d939fdd754..f816c2fea2 100644
--- a/engines/sci/gfx/sci_widgets.cpp
+++ b/engines/sci/gfx/sci_widgets.cpp
@@ -72,7 +72,7 @@ static gfxw_list_t *finish_titlebar_list(EngineState *s, gfxw_list_t *list, gfxw
return list;
}
-void sciw_set_status_bar(EngineState *s, gfxw_port_t *status_bar, const char *text, int fgcolor, int bgcolor) {
+void sciw_set_status_bar(EngineState *s, gfxw_port_t *status_bar, const Common::String &text, int fgcolor, int bgcolor) {
gfx_state_t *state;
gfxw_list_t *list;
gfx_color_t bg = status_bar->bgcolor;
@@ -93,9 +93,9 @@ void sciw_set_status_bar(EngineState *s, gfxw_port_t *status_bar, const char *te
clear_titlebar(status_bar);
- if (text) {
+ if (!text.empty()) {
gfxw_text_t *textw = gfxw_new_text(state, gfx_rect(0, 0, status_bar->bounds.width, status_bar->bounds.height),
- status_bar->font_nr, text, ALIGN_LEFT, ALIGN_CENTER,
+ status_bar->font_nr, text.c_str(), ALIGN_LEFT, ALIGN_CENTER,
fg, fg, bg, GFXR_FONT_FLAG_NO_NEWLINES);
list = make_titlebar_list(s, status_bar->bounds, status_bar);
diff --git a/engines/sci/gfx/sci_widgets.h b/engines/sci/gfx/sci_widgets.h
index 62749d9ce4..b47e7120a1 100644
--- a/engines/sci/gfx/sci_widgets.h
+++ b/engines/sci/gfx/sci_widgets.h
@@ -62,7 +62,7 @@ class Menu;
/* Used by the interpreter to flag buttons that are enabled */
#define CONTROL_STATE_ENABLED 0x0001
-void sciw_set_status_bar(EngineState *s, gfxw_port_t *status_bar, const char *text, int fgcolor, int bgcolor);
+void sciw_set_status_bar(EngineState *s, gfxw_port_t *status_bar, const Common::String &text, int fgcolor, int bgcolor);
/* Sets the contents of a port used as status bar
** Parmeters: (EngineState *) s: The affected game state
** (gfxw_port_t *) status_bar: The status bar port