~ubuntu-branches/debian/sid/stella/sid

« back to all changes in this revision

Viewing changes to src/cheat/CheatCodeDialog.cxx

  • Committer: Package Import Robot
  • Author(s): Stephen Kitt
  • Date: 2013-06-28 09:53:13 UTC
  • mfrom: (1.3.6)
  • Revision ID: package-import@ubuntu.com-20130628095313-j8jkkgxpvx1t18ym
Tags: 3.9-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
// See the file "License.txt" for information on usage and redistribution of
15
15
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
16
16
//
17
 
// $Id: CheatCodeDialog.cxx 2579 2013-01-04 19:49:01Z stephena $
 
17
// $Id: CheatCodeDialog.cxx 2743 2013-05-29 16:27:12Z stephena $
18
18
//
19
19
//   Based on code from ScummVM - Scumm Interpreter
20
20
//   Copyright (C) 2002-2004 The ScummVM project
59
59
  myCheatList =
60
60
    new CheckListWidget(this, font, xpos, ypos, _w - buttonWidth - 25,
61
61
                        _h - 2*buttonHeight - 10);
62
 
  myCheatList->setStyle(kXFill);
63
62
  myCheatList->setEditable(false);
64
63
  wid.push_back(myCheatList);
65
64
 
150
149
void CheatCodeDialog::addCheat()
151
150
{
152
151
  myCheatInput->show();    // Center input dialog over entire screen
153
 
  myCheatInput->setEditString("", 0);
154
 
  myCheatInput->setEditString("", 1);
 
152
  myCheatInput->setText("", 0);
 
153
  myCheatInput->setText("", 1);
155
154
  myCheatInput->setTitle("");
156
155
  myCheatInput->setFocus(0);
157
156
  myCheatInput->setEmitSignal(kCheatAdded);
169
168
  const string& code = list[idx]->code();
170
169
 
171
170
  myCheatInput->show();    // Center input dialog over entire screen
172
 
  myCheatInput->setEditString(name, 0);
173
 
  myCheatInput->setEditString(code, 1);
 
171
  myCheatInput->setText(name, 0);
 
172
  myCheatInput->setText(code, 1);
174
173
  myCheatInput->setTitle("");
175
174
  myCheatInput->setFocus(1);
176
175
  myCheatInput->setEmitSignal(kCheatEdited);
187
186
void CheatCodeDialog::addOneShotCheat()
188
187
{
189
188
  myCheatInput->show();    // Center input dialog over entire screen
190
 
  myCheatInput->setEditString("One-shot cheat", 0);
191
 
  myCheatInput->setEditString("", 1);
 
189
  myCheatInput->setText("One-shot cheat", 0);
 
190
  myCheatInput->setText("", 1);
192
191
  myCheatInput->setTitle("");
193
192
  myCheatInput->setFocus(1);
194
193
  myCheatInput->setEmitSignal(kOneShotCheatAdded);
209
208
      close();
210
209
      break;
211
210
 
212
 
    case kListItemDoubleClickedCmd:
 
211
    case ListWidget::kDoubleClickedCmd:
213
212
      editCheat();
214
213
      break;
215
214