diff options
author | Einar Johan Trøan Sømåen | 2012-06-26 14:12:55 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-06-26 14:12:55 +0200 |
commit | 9d08670191a61b7794a0341d68633649e616ab1a (patch) | |
tree | 31c20a2e9e5ce5041e760f1bacd33b76a69f8cd5 /engines/wintermute | |
parent | b46750869c72df19d29b5cad4aac483b0046afc2 (diff) | |
download | scummvm-rg350-9d08670191a61b7794a0341d68633649e616ab1a.tar.gz scummvm-rg350-9d08670191a61b7794a0341d68633649e616ab1a.tar.bz2 scummvm-rg350-9d08670191a61b7794a0341d68633649e616ab1a.zip |
WINTERMUTE: Rename FuncName->funcName in the UI-classes.
Diffstat (limited to 'engines/wintermute')
-rw-r--r-- | engines/wintermute/Ad/AdInventoryBox.cpp | 8 | ||||
-rw-r--r-- | engines/wintermute/Ad/AdResponseBox.cpp | 16 | ||||
-rw-r--r-- | engines/wintermute/UI/UIButton.cpp | 14 | ||||
-rw-r--r-- | engines/wintermute/UI/UIButton.h | 4 | ||||
-rw-r--r-- | engines/wintermute/UI/UIEdit.cpp | 38 | ||||
-rw-r--r-- | engines/wintermute/UI/UIEdit.h | 6 | ||||
-rw-r--r-- | engines/wintermute/UI/UIEntity.cpp | 10 | ||||
-rw-r--r-- | engines/wintermute/UI/UIEntity.h | 2 | ||||
-rw-r--r-- | engines/wintermute/UI/UIObject.cpp | 20 | ||||
-rw-r--r-- | engines/wintermute/UI/UIObject.h | 14 | ||||
-rw-r--r-- | engines/wintermute/UI/UIText.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/UI/UITiledImage.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/UI/UITiledImage.h | 2 | ||||
-rw-r--r-- | engines/wintermute/UI/UIWindow.cpp | 36 | ||||
-rw-r--r-- | engines/wintermute/UI/UIWindow.h | 12 |
15 files changed, 94 insertions, 94 deletions
diff --git a/engines/wintermute/Ad/AdInventoryBox.cpp b/engines/wintermute/Ad/AdInventoryBox.cpp index 76d00e8a4d..60b0a77692 100644 --- a/engines/wintermute/Ad/AdInventoryBox.cpp +++ b/engines/wintermute/Ad/AdInventoryBox.cpp @@ -107,8 +107,8 @@ HRESULT CAdInventoryBox::display() { ItemsY = (int)floor((float)((_itemsArea.bottom - _itemsArea.top + _spacing) / (_itemHeight + _spacing)));
if (_window) {
- _window->EnableWidget("prev", _scrollOffset > 0);
- _window->EnableWidget("next", _scrollOffset + ItemsX * ItemsY < AdGame->_inventoryOwner->getInventory()->_takenItems.GetSize());
+ _window->enableWidget("prev", _scrollOffset > 0);
+ _window->enableWidget("next", _scrollOffset + ItemsX * ItemsY < AdGame->_inventoryOwner->getInventory()->_takenItems.GetSize());
}
@@ -299,7 +299,7 @@ HRESULT CAdInventoryBox::loadBuffer(byte *Buffer, bool Complete) { _closeButton = new CUIButton(Game);
if (_closeButton) {
_closeButton->setName("close");
- _closeButton->SetListener(this, _closeButton, 0);
+ _closeButton->setListener(this, _closeButton, 0);
_closeButton->_parent = _window;
}
}
@@ -309,7 +309,7 @@ HRESULT CAdInventoryBox::loadBuffer(byte *Buffer, bool Complete) { if (_window) {
for (int i = 0; i < _window->_widgets.GetSize(); i++) {
if (!_window->_widgets[i]->_listenerObject)
- _window->_widgets[i]->SetListener(this, _window->_widgets[i], 0);
+ _window->_widgets[i]->setListener(this, _window->_widgets[i], 0);
}
}
diff --git a/engines/wintermute/Ad/AdResponseBox.cpp b/engines/wintermute/Ad/AdResponseBox.cpp index c14497a4c4..1f226c0d5d 100644 --- a/engines/wintermute/Ad/AdResponseBox.cpp +++ b/engines/wintermute/Ad/AdResponseBox.cpp @@ -118,7 +118,7 @@ HRESULT CAdResponseBox::invalidateButtons() { _respButtons[i]->_font = NULL;
_respButtons[i]->_fontHover = NULL;
_respButtons[i]->_fontPress = NULL;
- _respButtons[i]->SetText("");
+ _respButtons[i]->setText("");
}
return S_OK;
}
@@ -147,7 +147,7 @@ HRESULT CAdResponseBox::createButtons() { }
// textual
else {
- btn->SetText(_responses[i]->_text);
+ btn->setText(_responses[i]->_text);
btn->_font = (_font == NULL) ? Game->_systemFont : _font;
btn->_fontHover = (_fontHover == NULL) ? Game->_systemFont : _fontHover;
btn->_fontPress = btn->_fontHover;
@@ -163,14 +163,14 @@ HRESULT CAdResponseBox::createButtons() { if (btn->_width <= 0) btn->_width = Game->_renderer->_width;
}
btn->setName("response");
- btn->CorrectSize();
+ btn->correctSize();
// make the responses touchable
if (Game->_touchInterface)
btn->_height = MAX(btn->_height, 50);
//btn->SetListener(this, btn, _responses[i]->_iD);
- btn->SetListener(this, btn, i);
+ btn->setListener(this, btn, i);
btn->_visible = false;
_respButtons.Add(btn);
@@ -327,7 +327,7 @@ HRESULT CAdResponseBox::loadBuffer(byte *Buffer, bool Complete) { if (_window) {
for (int i = 0; i < _window->_widgets.GetSize(); i++) {
if (!_window->_widgets[i]->_listenerObject)
- _window->_widgets[i]->SetListener(this, _window->_widgets[i], 0);
+ _window->_widgets[i]->setListener(this, _window->_widgets[i], 0);
}
}
@@ -455,8 +455,8 @@ HRESULT CAdResponseBox::display() { // show appropriate scroll buttons
if (_window) {
- _window->ShowWidget("prev", _scrollOffset > 0);
- _window->ShowWidget("next", scroll_needed);
+ _window->showWidget("prev", _scrollOffset > 0);
+ _window->showWidget("next", scroll_needed);
}
// go exclusive
@@ -639,7 +639,7 @@ HRESULT CAdResponseBox::getObjects(CBArray<CUIObject *, CUIObject *> &Objects, b for (int i = 0; i < _respButtons.GetSize(); i++) {
Objects.Add(_respButtons[i]);
}
- if (_window) _window->GetWindowObjects(Objects, InteractiveOnly);
+ if (_window) _window->getWindowObjects(Objects, InteractiveOnly);
return S_OK;
}
diff --git a/engines/wintermute/UI/UIButton.cpp b/engines/wintermute/UI/UIButton.cpp index 7898b6f5c9..58440d0095 100644 --- a/engines/wintermute/UI/UIButton.cpp +++ b/engines/wintermute/UI/UIButton.cpp @@ -352,7 +352,7 @@ HRESULT CUIButton::loadBuffer(byte *Buffer, bool Complete) { break;
case TOKEN_TEXT:
- SetText((char *)params);
+ setText((char *)params);
Game->_stringTable->Expand(&_text);
break;
@@ -434,7 +434,7 @@ HRESULT CUIButton::loadBuffer(byte *Buffer, bool Complete) { return E_FAIL;
}
- CorrectSize();
+ correctSize();
return S_OK;
}
@@ -539,7 +539,7 @@ HRESULT CUIButton::saveAsText(CBDynBuffer *Buffer, int Indent) { }
//////////////////////////////////////////////////////////////////////////
-void CUIButton::CorrectSize() {
+void CUIButton::correctSize() {
RECT rect;
CBSprite *img = NULL;
@@ -573,7 +573,7 @@ void CUIButton::CorrectSize() { if (_height <= 0) _height = 100;
- if (_back) _back->CorrectSize(&_width, &_height);
+ if (_back) _back->correctSize(&_width, &_height);
}
@@ -591,7 +591,7 @@ HRESULT CUIButton::display(int OffsetX, int OffsetY) { _hover = (!_disable && Game->_activeObject == this && (Game->_interactive || Game->_state == GAME_SEMI_FROZEN));
if ((_press && _hover && !Game->_mouseLeftDown) ||
- (_oneTimePress && CBPlatform::GetTime() - _oneTimePressTime >= 100)) Press();
+ (_oneTimePress && CBPlatform::GetTime() - _oneTimePressTime >= 100)) press();
if (_disable) {
@@ -606,7 +606,7 @@ HRESULT CUIButton::display(int OffsetX, int OffsetY) { if (_backHover) back = _backHover;
if (_imageHover) image = _imageHover;
if (_text && _fontHover) font = _fontHover;
- } else if (_canFocus && IsFocused()) {
+ } else if (_canFocus && isFocused()) {
if (_backFocus) back = _backFocus;
if (_imageFocus) image = _imageFocus;
if (_text && _fontFocus) font = _fontFocus;
@@ -654,7 +654,7 @@ HRESULT CUIButton::display(int OffsetX, int OffsetY) { //////////////////////////////////////////////////////////////////////////
-void CUIButton::Press() {
+void CUIButton::press() {
applyEvent("Press");
if (_listenerObject) _listenerObject->listen(_listenerParamObject, _listenerParamDWORD);
if (_parentNotify && _parent) _parent->applyEvent(_name);
diff --git a/engines/wintermute/UI/UIButton.h b/engines/wintermute/UI/UIButton.h index b404a781d1..bc3ba87257 100644 --- a/engines/wintermute/UI/UIButton.h +++ b/engines/wintermute/UI/UIButton.h @@ -43,11 +43,11 @@ public: bool _oneTimePress;
uint32 _oneTimePressTime;
DECLARE_PERSISTENT(CUIButton, CUIObject)
- void Press();
+ void press();
virtual HRESULT display(int OffsetX = 0, int OffsetY = 0);
bool _press;
bool _hover;
- void CorrectSize();
+ void correctSize();
TTextAlign _align;
CBSprite *_imageHover;
CBSprite *_imagePress;
diff --git a/engines/wintermute/UI/UIEdit.cpp b/engines/wintermute/UI/UIEdit.cpp index cab0be5ba8..cc98830898 100644 --- a/engines/wintermute/UI/UIEdit.cpp +++ b/engines/wintermute/UI/UIEdit.cpp @@ -62,7 +62,7 @@ CUIEdit::CUIEdit(CBGame *inGame): CUIObject(inGame) { _scrollOffset = 0;
_cursorChar = NULL;
- SetCursorChar("|");
+ setCursorChar("|");
#ifdef __WIN32__
_cursorBlinkRate = GetCaretBlinkTime();
@@ -71,7 +71,7 @@ CUIEdit::CUIEdit(CBGame *inGame): CUIObject(inGame) { #endif
_frameWidth = 0;
- SetText("");
+ setText("");
_lastBlinkTime = 0;
_cursorVisible = true;
@@ -220,7 +220,7 @@ HRESULT CUIEdit::loadBuffer(byte *Buffer, bool Complete) { break;
case TOKEN_TEXT:
- SetText((char *)params);
+ setText((char *)params);
Game->_stringTable->Expand(&_text);
break;
@@ -296,7 +296,7 @@ HRESULT CUIEdit::loadBuffer(byte *Buffer, bool Complete) { return E_FAIL;
}
- CorrectSize();
+ correctSize();
return S_OK;
}
@@ -490,7 +490,7 @@ HRESULT CUIEdit::scSetProperty(const char *Name, CScValue *Value) { // CursorChar
//////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "CursorChar") == 0) {
- SetCursorChar(Value->GetString());
+ setCursorChar(Value->GetString());
return S_OK;
}
@@ -516,9 +516,9 @@ HRESULT CUIEdit::scSetProperty(const char *Name, CScValue *Value) { else if (strcmp(Name, "Text") == 0) {
if (Game->_textEncoding == TEXT_UTF8) {
WideString wstr = StringUtil::Utf8ToWide(Value->GetString());
- SetText(StringUtil::WideToAnsi(wstr).c_str());
+ setText(StringUtil::WideToAnsi(wstr).c_str());
} else {
- SetText(Value->GetString());
+ setText(Value->GetString());
}
return S_OK;
}
@@ -534,7 +534,7 @@ const char *CUIEdit::scToString() { //////////////////////////////////////////////////////////////////////////
-void CUIEdit::SetCursorChar(const char *Char) {
+void CUIEdit::setCursorChar(const char *Char) {
if (!Char) return;
delete[] _cursorChar;
_cursorChar = new char [strlen(Char) + 1];
@@ -564,7 +564,7 @@ HRESULT CUIEdit::display(int OffsetX, int OffsetY) { if (_fontSelected) sfont = _fontSelected;
else sfont = font;
- bool focused = IsFocused();
+ bool focused = isFocused();
_selStart = MAX(_selStart, 0);
_selEnd = MAX(_selEnd, 0);
@@ -707,9 +707,9 @@ bool CUIEdit::handleKeypress(Common::Event *event, bool printable) { case Common::KEYCODE_BACKSPACE:
if (_selStart == _selEnd) {
- if (Game->_textRTL) DeleteChars(_selStart, _selStart + 1);
- else DeleteChars(_selStart - 1, _selStart);
- } else DeleteChars(_selStart, _selEnd);
+ if (Game->_textRTL) deleteChars(_selStart, _selStart + 1);
+ else deleteChars(_selStart - 1, _selStart);
+ } else deleteChars(_selStart, _selEnd);
if (_selEnd >= _selStart) _selEnd -= MAX(1, _selEnd - _selStart);
_selStart = _selEnd;
@@ -755,11 +755,11 @@ bool CUIEdit::handleKeypress(Common::Event *event, bool printable) { case Common::KEYCODE_DELETE:
if (_selStart == _selEnd) {
if (Game->_textRTL) {
- DeleteChars(_selStart - 1, _selStart);
+ deleteChars(_selStart - 1, _selStart);
_selEnd--;
if (_selEnd < 0) _selEnd = 0;
- } else DeleteChars(_selStart, _selStart + 1);
- } else DeleteChars(_selStart, _selEnd);
+ } else deleteChars(_selStart, _selStart + 1);
+ } else deleteChars(_selStart, _selEnd);
if (_selEnd > _selStart) _selEnd -= (_selEnd - _selStart);
_selStart = _selEnd;
@@ -770,12 +770,12 @@ bool CUIEdit::handleKeypress(Common::Event *event, bool printable) { }
return Handled;
} else if (event->type == Common::EVENT_KEYDOWN && printable) {
- if (_selStart != _selEnd) DeleteChars(_selStart, _selEnd);
+ if (_selStart != _selEnd) deleteChars(_selStart, _selEnd);
//WideString wstr = StringUtil::Utf8ToWide(event->kbd.ascii);
WideString wstr;
wstr += (char)event->kbd.ascii;
- _selEnd += InsertChars(_selEnd, (byte *)StringUtil::WideToAnsi(wstr).c_str(), 1);
+ _selEnd += insertChars(_selEnd, (byte *)StringUtil::WideToAnsi(wstr).c_str(), 1);
if (Game->_textRTL) _selEnd = _selStart;
else _selStart = _selEnd;
@@ -789,7 +789,7 @@ bool CUIEdit::handleKeypress(Common::Event *event, bool printable) { //////////////////////////////////////////////////////////////////////////
-int CUIEdit::DeleteChars(int Start, int End) {
+int CUIEdit::deleteChars(int Start, int End) {
if (Start > End) CBUtils::Swap(&Start, &End);
Start = MAX(Start, (int)0);
@@ -810,7 +810,7 @@ int CUIEdit::DeleteChars(int Start, int End) { //////////////////////////////////////////////////////////////////////////
-int CUIEdit::InsertChars(int Pos, byte *Chars, int Num) {
+int CUIEdit::insertChars(int Pos, byte *Chars, int Num) {
if ((int)strlen(_text) + Num > _maxLength) {
Num -= (strlen(_text) + Num - _maxLength);
}
diff --git a/engines/wintermute/UI/UIEdit.h b/engines/wintermute/UI/UIEdit.h index 6ad5f50758..34f849f9fa 100644 --- a/engines/wintermute/UI/UIEdit.h +++ b/engines/wintermute/UI/UIEdit.h @@ -39,8 +39,8 @@ class CUIEdit : public CUIObject { public:
DECLARE_PERSISTENT(CUIEdit, CUIObject)
int _maxLength;
- int InsertChars(int Pos, byte *Chars, int Num);
- int DeleteChars(int Start, int End);
+ int insertChars(int Pos, byte *Chars, int Num);
+ int deleteChars(int Start, int End);
bool _cursorVisible;
uint32 _lastBlinkTime;
virtual HRESULT display(int OffsetX, int OffsetY);
@@ -48,7 +48,7 @@ public: int _scrollOffset;
int _frameWidth;
uint32 _cursorBlinkRate;
- void SetCursorChar(const char *Char);
+ void setCursorChar(const char *Char);
char *_cursorChar;
int _selEnd;
int _selStart;
diff --git a/engines/wintermute/UI/UIEntity.cpp b/engines/wintermute/UI/UIEntity.cpp index 41b197dcd7..deefe965e3 100644 --- a/engines/wintermute/UI/UIEntity.cpp +++ b/engines/wintermute/UI/UIEntity.cpp @@ -142,7 +142,7 @@ HRESULT CUIEntity::loadBuffer(byte *Buffer, bool Complete) { break;
case TOKEN_ENTITY:
- if (FAILED(SetEntity((char *)params))) cmd = PARSERR_GENERIC;
+ if (FAILED(setEntity((char *)params))) cmd = PARSERR_GENERIC;
break;
case TOKEN_SCRIPT:
@@ -163,7 +163,7 @@ HRESULT CUIEntity::loadBuffer(byte *Buffer, bool Complete) { return E_FAIL;
}
- CorrectSize();
+ correctSize();
if (Game->_editorMode) {
_width = 50;
@@ -208,10 +208,10 @@ HRESULT CUIEntity::saveAsText(CBDynBuffer *Buffer, int Indent) { }
//////////////////////////////////////////////////////////////////////////
-HRESULT CUIEntity::SetEntity(const char *Filename) {
+HRESULT CUIEntity::setEntity(const char *filename) {
if (_entity) Game->UnregisterObject(_entity);
_entity = new CAdEntity(Game);
- if (!_entity || FAILED(_entity->loadFile(Filename))) {
+ if (!_entity || FAILED(_entity->loadFile(filename))) {
delete _entity;
_entity = NULL;
return E_FAIL;
@@ -272,7 +272,7 @@ HRESULT CUIEntity::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th const char *Filename = Stack->Pop()->GetString();
- if (SUCCEEDED(SetEntity(Filename)))
+ if (SUCCEEDED(setEntity(Filename)))
Stack->PushBool(true);
else
Stack->PushBool(false);
diff --git a/engines/wintermute/UI/UIEntity.h b/engines/wintermute/UI/UIEntity.h index 813831af67..bd588f7d37 100644 --- a/engines/wintermute/UI/UIEntity.h +++ b/engines/wintermute/UI/UIEntity.h @@ -44,7 +44,7 @@ public: virtual HRESULT display(int OffsetX = 0, int OffsetY = 0);
CAdEntity *_entity;
- HRESULT SetEntity(const char *Filename);
+ HRESULT setEntity(const char *Filename);
// scripting interface
virtual CScValue *scGetProperty(const char *Name);
diff --git a/engines/wintermute/UI/UIObject.cpp b/engines/wintermute/UI/UIObject.cpp index 94033389f8..aaeeb6e5dd 100644 --- a/engines/wintermute/UI/UIObject.cpp +++ b/engines/wintermute/UI/UIObject.cpp @@ -85,7 +85,7 @@ CUIObject::~CUIObject() { //////////////////////////////////////////////////////////////////////////
-void CUIObject::SetText(const char *Text) {
+void CUIObject::setText(const char *Text) {
if (_text) delete [] _text;
_text = new char [strlen(Text) + 1];
if (_text) {
@@ -104,7 +104,7 @@ HRESULT CUIObject::display(int OffsetX, int OffsetY) { //////////////////////////////////////////////////////////////////////////
-void CUIObject::SetListener(CBScriptHolder *Object, CBScriptHolder *ListenerObject, uint32 ListenerParam) {
+void CUIObject::setListener(CBScriptHolder *Object, CBScriptHolder *ListenerObject, uint32 ListenerParam) {
_listenerObject = Object;
_listenerParamObject = ListenerObject;
_listenerParamDWORD = ListenerParam;
@@ -112,7 +112,7 @@ void CUIObject::SetListener(CBScriptHolder *Object, CBScriptHolder *ListenerObje //////////////////////////////////////////////////////////////////////////
-void CUIObject::CorrectSize() {
+void CUIObject::correctSize() {
RECT rect;
if (_width <= 0) {
@@ -129,7 +129,7 @@ void CUIObject::CorrectSize() { }
}
- if (_back) _back->CorrectSize(&_width, &_height);
+ if (_back) _back->correctSize(&_width, &_height);
}
@@ -209,7 +209,7 @@ HRESULT CUIObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th //////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "Focus") == 0) {
Stack->CorrectParams(0);
- Focus();
+ focus();
Stack->PushNULL();
return S_OK;
}
@@ -471,7 +471,7 @@ HRESULT CUIObject::scSetProperty(const char *Name, CScValue *Value) { // Text
//////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "Text") == 0) {
- SetText(Value->GetString());
+ setText(Value->GetString());
return S_OK;
}
@@ -486,7 +486,7 @@ const char *CUIObject::scToString() { //////////////////////////////////////////////////////////////////////////
-bool CUIObject::IsFocused() {
+bool CUIObject::isFocused() {
if (!Game->_focusedWindow) return false;
if (Game->_focusedWindow == this) return true;
@@ -503,14 +503,14 @@ bool CUIObject::IsFocused() { HRESULT CUIObject::handleMouse(TMouseEvent Event, TMouseButton Button) {
// handle focus change
if (Event == MOUSE_CLICK && Button == MOUSE_BUTTON_LEFT) {
- Focus();
+ focus();
}
return CBObject::handleMouse(Event, Button);
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CUIObject::Focus() {
+HRESULT CUIObject::focus() {
CUIObject *obj = this;
bool disabled = false;
while (obj) {
@@ -537,7 +537,7 @@ HRESULT CUIObject::Focus() { //////////////////////////////////////////////////////////////////////////
-HRESULT CUIObject::GetTotalOffset(int *OffsetX, int *OffsetY) {
+HRESULT CUIObject::getTotalOffset(int *OffsetX, int *OffsetY) {
int OffX = 0, OffY = 0;
CUIObject *obj = _parent;
diff --git a/engines/wintermute/UI/UIObject.h b/engines/wintermute/UI/UIObject.h index 272b094131..7e16041bbe 100644 --- a/engines/wintermute/UI/UIObject.h +++ b/engines/wintermute/UI/UIObject.h @@ -40,19 +40,19 @@ class CBFont; class CUIObject : public CBObject {
public:
- HRESULT GetTotalOffset(int *OffsetX, int *OffsetY);
+ HRESULT getTotalOffset(int *offsetX, int *offsetY);
bool _canFocus;
- HRESULT Focus();
+ HRESULT focus();
virtual HRESULT handleMouse(TMouseEvent Event, TMouseButton Button);
- bool IsFocused();
+ bool isFocused();
bool _parentNotify;
DECLARE_PERSISTENT(CUIObject, CBObject)
CUIObject *_parent;
- virtual HRESULT display(int OffsetX = 0, int OffsetY = 0);
- virtual void CorrectSize();
+ virtual HRESULT display(int offsetX = 0, int offsetY = 0);
+ virtual void correctSize();
bool _sharedFonts;
bool _sharedImages;
- void SetText(const char *Text);
+ void setText(const char *text);
char *_text;
CBFont *_font;
bool _visible;
@@ -64,7 +64,7 @@ public: int _height;
TUIObjectType _type;
CBSprite *_image;
- void SetListener(CBScriptHolder *Object, CBScriptHolder *ListenerObject, uint32 ListenerParam);
+ void setListener(CBScriptHolder *Object, CBScriptHolder *ListenerObject, uint32 ListenerParam);
CBScriptHolder *_listenerParamObject;
uint32 _listenerParamDWORD;
CBScriptHolder *_listenerObject;
diff --git a/engines/wintermute/UI/UIText.cpp b/engines/wintermute/UI/UIText.cpp index afff0d204d..4eaa114a83 100644 --- a/engines/wintermute/UI/UIText.cpp +++ b/engines/wintermute/UI/UIText.cpp @@ -215,7 +215,7 @@ HRESULT CUIText::loadBuffer(byte *Buffer, bool Complete) { break;
case TOKEN_TEXT:
- SetText((char *)params);
+ setText((char *)params);
Game->_stringTable->Expand(&_text);
break;
@@ -287,7 +287,7 @@ HRESULT CUIText::loadBuffer(byte *Buffer, bool Complete) { return E_FAIL;
}
- CorrectSize();
+ correctSize();
return S_OK;
}
diff --git a/engines/wintermute/UI/UITiledImage.cpp b/engines/wintermute/UI/UITiledImage.cpp index a259050872..e7734acdc5 100644 --- a/engines/wintermute/UI/UITiledImage.cpp +++ b/engines/wintermute/UI/UITiledImage.cpp @@ -337,7 +337,7 @@ HRESULT CUITiledImage::saveAsText(CBDynBuffer *Buffer, int Indent) { }
//////////////////////////////////////////////////////////////////////////
-void CUITiledImage::CorrectSize(int *Width, int *Height) {
+void CUITiledImage::correctSize(int *Width, int *Height) {
int tile_width = _middleMiddle.right - _middleMiddle.left;
int tile_height = _middleMiddle.bottom - _middleMiddle.top;
diff --git a/engines/wintermute/UI/UITiledImage.h b/engines/wintermute/UI/UITiledImage.h index 62ae6a0cce..d571f1354f 100644 --- a/engines/wintermute/UI/UITiledImage.h +++ b/engines/wintermute/UI/UITiledImage.h @@ -37,7 +37,7 @@ class CBSubFrame; class CUITiledImage : public CBObject {
public:
DECLARE_PERSISTENT(CUITiledImage, CBObject)
- void CorrectSize(int *Width, int *Height);
+ void correctSize(int *Width, int *Height);
HRESULT loadFile(const char *Filename);
HRESULT loadBuffer(byte *Buffer, bool Complete = true);
virtual HRESULT saveAsText(CBDynBuffer *Buffer, int Indent);
diff --git a/engines/wintermute/UI/UIWindow.cpp b/engines/wintermute/UI/UIWindow.cpp index d80f63a464..38fefc4cc7 100644 --- a/engines/wintermute/UI/UIWindow.cpp +++ b/engines/wintermute/UI/UIWindow.cpp @@ -128,7 +128,7 @@ HRESULT CUIWindow::display(int OffsetX, int OffsetY) { if (!_shieldButton) {
_shieldButton = new CUIButton(Game);
_shieldButton->setName("close");
- _shieldButton->SetListener(this, _shieldButton, 0);
+ _shieldButton->setListener(this, _shieldButton, 0);
_shieldButton->_parent = this;
}
if (_shieldButton) {
@@ -153,7 +153,7 @@ HRESULT CUIWindow::display(int OffsetX, int OffsetY) { }
if (!_focusedWidget || (!_focusedWidget->_canFocus || _focusedWidget->_disable || !_focusedWidget->_visible)) {
- MoveFocus();
+ moveFocus();
}
bool PopViewport = false;
@@ -171,7 +171,7 @@ HRESULT CUIWindow::display(int OffsetX, int OffsetY) { CBSprite *image = _image;
CBFont *font = _font;
- if (!IsFocused()) {
+ if (!isFocused()) {
if (_backInactive) back = _backInactive;
if (_imageInactive) image = _imageInactive;
if (_fontInactive) font = _fontInactive;
@@ -381,7 +381,7 @@ HRESULT CUIWindow::loadBuffer(byte *Buffer, bool Complete) { break;
case TOKEN_TITLE:
- SetText((char *)params);
+ setText((char *)params);
Game->_stringTable->Expand(&_text);
break;
@@ -552,7 +552,7 @@ HRESULT CUIWindow::loadBuffer(byte *Buffer, bool Complete) { return E_FAIL;
}
- CorrectSize();
+ correctSize();
if (alpha != 0 && ar == 0 && ag == 0 && ab == 0) {
ar = ag = ab = 255;
@@ -670,7 +670,7 @@ HRESULT CUIWindow::saveAsText(CBDynBuffer *Buffer, int Indent) { }
//////////////////////////////////////////////////////////////////////////
-HRESULT CUIWindow::EnableWidget(const char *Name, bool Enable) {
+HRESULT CUIWindow::enableWidget(const char *Name, bool Enable) {
for (int i = 0; i < _widgets.GetSize(); i++) {
if (scumm_stricmp(_widgets[i]->_name, Name) == 0) _widgets[i]->_disable = !Enable;
}
@@ -679,7 +679,7 @@ HRESULT CUIWindow::EnableWidget(const char *Name, bool Enable) { //////////////////////////////////////////////////////////////////////////
-HRESULT CUIWindow::ShowWidget(const char *Name, bool Visible) {
+HRESULT CUIWindow::showWidget(const char *Name, bool Visible) {
for (int i = 0; i < _widgets.GetSize(); i++) {
if (scumm_stricmp(_widgets[i]->_name, Name) == 0) _widgets[i]->_visible = Visible;
}
@@ -782,7 +782,7 @@ HRESULT CUIWindow::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th //////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "GoExclusive") == 0) {
Stack->CorrectParams(0);
- GoExclusive();
+ goExclusive();
Script->WaitFor(this);
Stack->PushNULL();
return S_OK;
@@ -793,7 +793,7 @@ HRESULT CUIWindow::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th //////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "GoSystemExclusive") == 0) {
Stack->CorrectParams(0);
- GoSystemExclusive();
+ goSystemExclusive();
Script->WaitFor(this);
Stack->PushNULL();
return S_OK;
@@ -1068,7 +1068,7 @@ HRESULT CUIWindow::scSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "Exclusive") == 0) {
if (Value->GetBool())
- GoExclusive();
+ goExclusive();
else {
close();
_visible = true;
@@ -1081,7 +1081,7 @@ HRESULT CUIWindow::scSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "SystemExclusive") == 0) {
if (Value->GetBool())
- GoSystemExclusive();
+ goSystemExclusive();
else {
close();
_visible = true;
@@ -1103,7 +1103,7 @@ const char *CUIWindow::scToString() { bool CUIWindow::handleKeypress(Common::Event *event, bool printable) {
//TODO
if (event->type == Common::EVENT_KEYDOWN && event->kbd.keycode == Common::KEYCODE_TAB) {
- return SUCCEEDED(MoveFocus(!CBKeyboardState::IsShiftDown()));
+ return SUCCEEDED(moveFocus(!CBKeyboardState::IsShiftDown()));
} else {
if (_focusedWidget) return _focusedWidget->handleKeypress(event, printable);
else return false;
@@ -1129,7 +1129,7 @@ HRESULT CUIWindow::handleMouse(TMouseEvent Event, TMouseButton Button) { if (Event == MOUSE_CLICK && Button == MOUSE_BUTTON_LEFT) {
RECT DragRect = _dragRect;
int OffsetX, OffsetY;
- GetTotalOffset(&OffsetX, &OffsetY);
+ getTotalOffset(&OffsetX, &OffsetY);
CBPlatform::OffsetRect(&DragRect, _posX + OffsetX, _posY + OffsetY);
if (CBPlatform::PtInRect(&DragRect, Game->_mousePos)) {
@@ -1181,7 +1181,7 @@ HRESULT CUIWindow::persist(CBPersistMgr *persistMgr) { //////////////////////////////////////////////////////////////////////////
-HRESULT CUIWindow::MoveFocus(bool Forward) {
+HRESULT CUIWindow::moveFocus(bool Forward) {
int i;
bool found = false;
for (i = 0; i < _widgets.GetSize(); i++) {
@@ -1222,7 +1222,7 @@ HRESULT CUIWindow::MoveFocus(bool Forward) { //////////////////////////////////////////////////////////////////////////
-HRESULT CUIWindow::GoExclusive() {
+HRESULT CUIWindow::goExclusive() {
if (_mode == WINDOW_EXCLUSIVE) return S_OK;
if (_mode == WINDOW_NORMAL) {
@@ -1237,7 +1237,7 @@ HRESULT CUIWindow::GoExclusive() { //////////////////////////////////////////////////////////////////////////
-HRESULT CUIWindow::GoSystemExclusive() {
+HRESULT CUIWindow::goSystemExclusive() {
if (_mode == WINDOW_SYSTEM_EXCLUSIVE) return S_OK;
makeFreezable(false);
@@ -1294,14 +1294,14 @@ void CUIWindow::makeFreezable(bool Freezable) { //////////////////////////////////////////////////////////////////////////
-HRESULT CUIWindow::GetWindowObjects(CBArray<CUIObject *, CUIObject *> &Objects, bool InteractiveOnly) {
+HRESULT CUIWindow::getWindowObjects(CBArray<CUIObject *, CUIObject *> &Objects, bool InteractiveOnly) {
for (int i = 0; i < _widgets.GetSize(); i++) {
CUIObject *Control = _widgets[i];
if (Control->_disable && InteractiveOnly) continue;
switch (Control->_type) {
case UI_WINDOW:
- ((CUIWindow *)Control)->GetWindowObjects(Objects, InteractiveOnly);
+ ((CUIWindow *)Control)->getWindowObjects(Objects, InteractiveOnly);
break;
case UI_BUTTON:
diff --git a/engines/wintermute/UI/UIWindow.h b/engines/wintermute/UI/UIWindow.h index bf40df1cb7..e86409e43c 100644 --- a/engines/wintermute/UI/UIWindow.h +++ b/engines/wintermute/UI/UIWindow.h @@ -39,7 +39,7 @@ class CUIButton; class CBViewport;
class CUIWindow : public CUIObject {
public:
- HRESULT GetWindowObjects(CBArray<CUIObject *, CUIObject *> &Objects, bool InteractiveOnly);
+ HRESULT getWindowObjects(CBArray<CUIObject *, CUIObject *> &Objects, bool InteractiveOnly);
bool _pauseMusic;
void cleanup();
@@ -54,17 +54,17 @@ public: CUIWindow *_shieldWindow;
CUIButton *_shieldButton;
HRESULT close();
- HRESULT GoSystemExclusive();
- HRESULT GoExclusive();
+ HRESULT goSystemExclusive();
+ HRESULT goExclusive();
TWindowMode _mode;
- HRESULT MoveFocus(bool Forward = true);
+ HRESULT moveFocus(bool Forward = true);
virtual HRESULT handleMouse(TMouseEvent Event, TMouseButton Button);
POINT _dragFrom;
bool _dragging;
DECLARE_PERSISTENT(CUIWindow, CUIObject)
bool _transparent;
- HRESULT ShowWidget(const char *Name, bool Visible = true);
- HRESULT EnableWidget(const char *Name, bool Enable = true);
+ HRESULT showWidget(const char *Name, bool Visible = true);
+ HRESULT enableWidget(const char *Name, bool Enable = true);
RECT _titleRect;
RECT _dragRect;
virtual HRESULT display(int OffsetX = 0, int OffsetY = 0);
|