Bend BendDialog::getBend() const { return Bend( static_cast<Bend::BendType>(ui->bendTypeComboBox->currentIndex()), ui->bentPitchComboBox->itemData(ui->bentPitchComboBox->currentIndex()).toInt(), ui->releasePitchComboBox->itemData(ui->bentPitchComboBox->currentIndex()).toInt(), ui->bendDurationComboBox->currentIndex(), static_cast<Bend::DrawPoint>( ui->vertStartingPointComboBox->currentIndex()), static_cast<Bend::DrawPoint>( ui->vertEndingPointComboBox->currentIndex())); }
void Up() { int i; for(i=0;i<=(bend[bend_no].y-head.y)&&len<length;i++) { GotoXY(head.x,head.y+i); { if(len==0) printf("^"); else printf("*"); } body[len].x=head.x; body[len].y=head.y+i; len++; } Bend(); if(!kbhit()) head.y--; }
void Left() { int i; for(i=0;i<=(bend[bend_no].x-head.x)&&len<length;i++) { GotoXY((head.x+i),head.y); { if(len==0) printf("<"); else printf("*"); } body[len].x=head.x+i; body[len].y=head.y; len++; } Bend(); if(!kbhit()) head.x--; }
void Right() { int i; for(i=0;i<=(head.x-bend[bend_no].x)&&len<length;i++) { //GotoXY((head.x-i),head.y); body[len].x=head.x-i; body[len].y=head.y; GotoXY(body[len].x,body[len].y); { if(len==0) printf(">"); else printf("*"); } /*body[len].x=head.x-i; body[len].y=head.y;*/ len++; } Bend(); if(!kbhit()) head.x++; }