Rename init to initialize for examples

This commit is contained in:
Tomoya Tanjo 2016-01-05 22:17:47 +09:00
parent 54511f6305
commit 3d170edd8f
4 changed files with 8 additions and 8 deletions

View File

@ -96,9 +96,9 @@ class EditFrame : AppFrame {
MenuItem mainMenuItems; MenuItem mainMenuItems;
override protected void init() { override protected void initialize() {
_appName = "DMLEdit"; _appName = "DMLEdit";
super.init(); super.initialize();
updatePreview(); updatePreview();
} }

View File

@ -46,9 +46,9 @@ class EditFrame : AppFrame {
MenuItem mainMenuItems; MenuItem mainMenuItems;
override protected void init() { override protected void initialize() {
_appName = "DlangUISpreadSheet"; _appName = "DlangUISpreadSheet";
super.init(); super.initialize();
} }
/// create main menu /// create main menu

View File

@ -264,7 +264,7 @@ class CupWidget : Widget {
/// start new game /// start new game
void newGame() { void newGame() {
setLevel(1); setLevel(1);
init(_cols, _rows); initialize(_cols, _rows);
_cup.dropNextFigure(); _cup.dropNextFigure();
setCupState(CupState.NewFigure); setCupState(CupState.NewFigure);
if (window && _gameOverPopup) { if (window && _gameOverPopup) {
@ -278,8 +278,8 @@ class CupWidget : Widget {
} }
/// init cup /// init cup
void init(int cols, int rows) { void initialize(int cols, int rows) {
_cup.init(cols, rows); _cup.initialize(cols, rows);
_cols = cols; _cols = cols;
_rows = rows; _rows = rows;
} }

View File

@ -205,7 +205,7 @@ struct Cup {
return _rows; return _rows;
} }
/// inits empty cup of specified size /// inits empty cup of specified size
void init(int cols, int rows) { void initialize(int cols, int rows) {
_cols = cols; _cols = cols;
_rows = rows; _rows = rows;
_cup = new int[_cols * _rows]; _cup = new int[_cols * _rows];