(svn r27451) -Feature[FS#6241]: Move sprite 8 positions in sprite aligner with ctrl+click. (based on work by juzza1)

This commit is contained in:
alberth
2015-11-20 10:04:28 +00:00
parent 3ccfc954f3
commit e9f12d666d
2 changed files with 6 additions and 5 deletions

View File

@@ -972,10 +972,11 @@ struct SpriteAlignerWindow : Window {
this->offs_start_map.Insert(this->current_sprite, XyOffs(spr->x_offs, spr->y_offs));
}
switch (widget) {
case WID_SA_UP: spr->y_offs--; break;
case WID_SA_DOWN: spr->y_offs++; break;
case WID_SA_LEFT: spr->x_offs--; break;
case WID_SA_RIGHT: spr->x_offs++; break;
/* Move ten units at a time if ctrl is pressed. */
case WID_SA_UP: spr->y_offs -= _ctrl_pressed ? 8 : 1; break;
case WID_SA_DOWN: spr->y_offs += _ctrl_pressed ? 8 : 1; break;
case WID_SA_LEFT: spr->x_offs -= _ctrl_pressed ? 8 : 1; break;
case WID_SA_RIGHT: spr->x_offs += _ctrl_pressed ? 8 : 1; break;
}
/* Of course, we need to redraw the sprite, but where is it used?
* Everywhere is a safe bet. */