aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/controls16.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/graphics/controls16.cpp')
-rw-r--r--engines/sci/graphics/controls16.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/sci/graphics/controls16.cpp b/engines/sci/graphics/controls16.cpp
index 479044a3e2..138f49e765 100644
--- a/engines/sci/graphics/controls16.cpp
+++ b/engines/sci/graphics/controls16.cpp
@@ -158,50 +158,50 @@ void GfxControls16::kernelTexteditChange(reg_t controlObject, reg_t eventObject)
eventType = readSelectorValue(_segMan, eventObject, SELECTOR(type));
switch (eventType) {
- case SCI_EVENT_MOUSE_PRESS:
+ case kSciEventMousePress:
// TODO: Implement mouse support for cursor change
break;
- case SCI_EVENT_KEYBOARD:
+ case kSciEventKeyDown:
eventKey = readSelectorValue(_segMan, eventObject, SELECTOR(message));
modifiers = readSelectorValue(_segMan, eventObject, SELECTOR(modifiers));
switch (eventKey) {
- case SCI_KEY_BACKSPACE:
+ case kSciKeyBackspace:
if (cursorPos > 0) {
cursorPos--; text.deleteChar(cursorPos);
textChanged = true;
}
break;
- case SCI_KEY_DELETE:
+ case kSciKeyDelete:
if (cursorPos < textSize) {
text.deleteChar(cursorPos);
textChanged = true;
}
break;
- case SCI_KEY_HOME: // HOME
+ case kSciKeyHome:
cursorPos = 0; textChanged = true;
break;
- case SCI_KEY_END: // END
+ case kSciKeyEnd:
cursorPos = textSize; textChanged = true;
break;
- case SCI_KEY_LEFT: // LEFT
+ case kSciKeyLeft:
if (cursorPos > 0) {
cursorPos--; textChanged = true;
}
break;
- case SCI_KEY_RIGHT: // RIGHT
+ case kSciKeyRight:
if (cursorPos + 1 <= textSize) {
cursorPos++; textChanged = true;
}
break;
- case 3: // returned in SCI1 late and newer when Control - C is pressed
- if (modifiers & SCI_KEYMOD_CTRL) {
+ case kSciKeyEtx:
+ if (modifiers & kSciKeyModCtrl) {
// Control-C erases the whole line
cursorPos = 0; text.clear();
textChanged = true;
}
break;
default:
- if ((modifiers & SCI_KEYMOD_CTRL) && eventKey == 99) {
+ if ((modifiers & kSciKeyModCtrl) && eventKey == 99) {
// Control-C in earlier SCI games (SCI0 - SCI1 middle)
// Control-C erases the whole line
cursorPos = 0; text.clear();