Skip to content

Commit

Permalink
Consistent view title separators
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtnvgr committed Nov 1, 2024
1 parent 73ab708 commit fde553d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 33 deletions.
4 changes: 2 additions & 2 deletions sources/Application/Views/ChainView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,8 @@ void ChainView::OnPlayerUpdate(PlayerEventType eventType, unsigned int tick) {
pos._x += 200;
/*
if (player->Clipped()) {
w_.DrawString("clip",pos,props);
w_.DrawString("clip",pos,props);
} else {
w_.DrawString("----",pos,props);
w_.DrawString("----",pos,props);
}
*/} ;
27 changes: 13 additions & 14 deletions sources/Application/Views/GrooveView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ GrooveView::GrooveView(GUIWindow &w,ViewData *viewData):View(w,viewData) {
}

GrooveView::~GrooveView() {
}
}

void GrooveView::updateCursor(int dir) {
position_+=dir ;
Expand All @@ -25,7 +25,7 @@ void GrooveView::updateCursorValue(int val,bool sync) {
if (val<1) val=1 ;
if (val>0xF) val=0xF ;
grooveData[position_]=val ;
isDirty_=true;
isDirty_=true;
} ;

void GrooveView::warpGroove(int dir) {
Expand Down Expand Up @@ -53,15 +53,15 @@ void GrooveView::clearCursorValue() {
unsigned char *grooveData=Groove::GetInstance()->GetGrooveData(viewData_->currentGroove_) ;
grooveData[position_]=NO_GROOVE_DATA ;
isDirty_=true ;
}
}

void GrooveView::ProcessButtonMask(unsigned short mask,bool pressed) {

if (!pressed) return ;

Player *player=Player::GetInstance() ;

if (mask&EPBM_B) {
if (mask&EPBM_B) {
if (mask&EPBM_LEFT) {
warpGroove(-1) ;
}
Expand All @@ -80,7 +80,7 @@ void GrooveView::ProcessButtonMask(unsigned short mask,bool pressed) {
} else {

// A modifier
if (mask&EPBM_A) {
if (mask&EPBM_A) {
if (mask&EPBM_LEFT) {
updateCursorValue(-1) ;
}
Expand Down Expand Up @@ -108,7 +108,7 @@ void GrooveView::ProcessButtonMask(unsigned short mask,bool pressed) {
}
if (mask&EPBM_START) {
player->OnStartButton(PM_PHRASE,viewData_->songX_,true,viewData_->chainRow_) ;
}
}

} else {
// No modifier
Expand All @@ -118,8 +118,8 @@ void GrooveView::ProcessButtonMask(unsigned short mask,bool pressed) {
player->OnStartButton(PM_PHRASE,viewData_->songX_,false,viewData_->chainRow_) ;
}
}
}
}

}
} ;

Expand All @@ -135,14 +135,13 @@ void GrooveView::DrawView() {
char title[40] ;

SetColor(CD_NORMAL) ;

sprintf(title,"Groove: %2.2x",viewData_->currentGroove_) ;
sprintf(title,"Groove %2.2x", viewData_->currentGroove_) ;
DrawString(pos._x,pos._y,title,props) ;

// Compute song grid location

GUIPoint anchor=GetAnchor() ;

// Display row numbers

char buffer[6] ;
Expand Down Expand Up @@ -170,7 +169,7 @@ void GrooveView::DrawView() {
} else {
strcpy(buffer,"--") ;
} ;
props.invert_=(j==position_) ;
props.invert_=(j==position_) ;
DrawString(pos._x,pos._y,buffer,props) ;
pos._y++ ;
}
Expand All @@ -188,7 +187,7 @@ void GrooveView::OnPlayerUpdate(PlayerEventType ,unsigned int tick) {
pos._x=anchor._x-1 ;
pos._y=anchor._y+lastPosition_ ;
DrawString(pos._x,pos._y," ",props) ;

Groove *gr=Groove::GetInstance() ;
// Get current channel
int channel=viewData_->songX_ ;
Expand Down
24 changes: 12 additions & 12 deletions sources/Application/Views/InstrumentView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void InstrumentView::onInstrumentChange() {
T_SimpleList<UIField>::Empty() ;

InstrumentType it=getInstrumentType() ;

switch (it) {
case IT_MIDI:
fillMidiParameters() ;
Expand Down Expand Up @@ -77,7 +77,7 @@ void InstrumentView::fillSampleParameters() {
I_Instrument *instr=bank->GetInstrument(i) ;
SampleInstrument *instrument=(SampleInstrument *)instr ;
GUIPoint position=GetAnchor() ;

// position._y+=View::fieldSpaceHeight_;
Variable *v=instrument->FindVariable(SIP_SAMPLE) ;
SamplePool *sp=SamplePool::GetInstance() ;
Expand All @@ -90,11 +90,11 @@ void InstrumentView::fillSampleParameters() {
f1 = new UIIntVarField(position, *v, "%s", 0, 3, 1, 2);
T_SimpleList<UIField>::Insert(f1) ;

position._x += 8;
position._x += 7;
v = instrument->FindVariable(SIP_IR_WET);
f1 = new UIIntVarField(position, *v, "wet:%d%%", 0, 100, 1, 10);
T_SimpleList<UIField>::Insert(f1);
position._x += 8;
position._x += 9;

v = instrument->FindVariable(SIP_IR_PAD);
f1 = new UIIntVarField(position, *v, "pad:%dms", 0, 5000, 5, 100);
Expand All @@ -105,7 +105,7 @@ void InstrumentView::fillSampleParameters() {
v=instrument->FindVariable(SIP_VOLUME) ;
f1=new UIIntVarField(position,*v,"volume: %d [%2.2X]",0,255,1,10) ;
T_SimpleList<UIField>::Insert(f1) ;

position._y+=1 ;
v=instrument->FindVariable(SIP_PAN) ;
f1=new UIIntVarField(position,*v,"pan: %2.2X",0,0xFE,1,0x10) ;
Expand Down Expand Up @@ -188,7 +188,7 @@ void InstrumentView::fillSampleParameters() {
v=instrument->FindVariable(SIP_INTERPOLATION) ;
f1=new UIIntVarField(position,*v,"interpolation: %s",0,1,1,1) ;
T_SimpleList<UIField>::Insert(f1) ;

position._y+=1 ;
v=instrument->FindVariable(SIP_LOOPMODE) ;
f1=new UIIntVarField(position,*v,"loop mode: %s",0,SILM_LAST-1,1,1) ;
Expand Down Expand Up @@ -347,11 +347,11 @@ void InstrumentView::ProcessButtonMask(unsigned short mask,bool pressed) {
}

FieldView::ProcessButtonMask(mask) ;

Player *player=Player::GetInstance() ;
// B Modifier

if (mask&EPBM_B) {
if (mask&EPBM_B) {
if (mask&EPBM_LEFT) warpToNext(-1) ;
if (mask&EPBM_RIGHT) warpToNext(+1);
if (mask&EPBM_DOWN) warpToNext(-16) ;
Expand Down Expand Up @@ -442,8 +442,8 @@ void InstrumentView::ProcessButtonMask(unsigned short mask,bool pressed) {
player->OnStartButton(PM_PHRASE,viewData_->songX_,false,viewData_->chainRow_) ;
}
}
}
}

}

UIIntVarField *field=(UIIntVarField *)GetFocus() ;
Expand All @@ -465,7 +465,7 @@ void InstrumentView::DrawView() {

char title[20];
SetColor(CD_NORMAL) ;
sprintf(title,"Instrument %2.2X",viewData_->currentInstrument_) ;
sprintf(title,"Instrument %2.2X", viewData_->currentInstrument_) ;
DrawString(pos._x,pos._y,title,props) ;

// Draw fields
Expand All @@ -475,7 +475,7 @@ void InstrumentView::DrawView() {
} ;

void InstrumentView::OnFocus() {
onInstrumentChange() ;
onInstrumentChange() ;
}


Expand Down
8 changes: 4 additions & 4 deletions sources/Application/Views/ProjectView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ProjectView::ProjectView(GUIWindow &w,ViewData *data):FieldView(w,data) {
project_=data->project_ ;

GUIPoint position=GetAnchor() ;

Variable *v=project_->FindVariable(VAR_TEMPO) ;
UITempoField *f=new UITempoField(ACTION_TEMPO_CHANGED,position,*v,"tempo: %d [%2.2x] ",60,400,1,10) ;
T_SimpleList<UIField>::Insert(f) ;
Expand Down Expand Up @@ -128,7 +128,7 @@ ProjectView::ProjectView(GUIWindow &w,ViewData *data):FieldView(w,data) {
position._y+=2 ;
UIIntVarField *f2=new UIIntVarField(position,*v,"transpose: %3.2d",-48,48,0x1,0xC) ;
T_SimpleList<UIField>::Insert(f2) ;

v = project_->FindVariable(VAR_SCALE);
// if scale name is not found, set the default chromatic scale
if (v->GetInt() < 0) {
Expand Down Expand Up @@ -205,7 +205,7 @@ void ProjectView::ProcessButtonMask(unsigned short mask,bool pressed) {
} ;

void ProjectView::DrawView() {

Clear() ;

GUITextProperties props ;
Expand All @@ -214,7 +214,7 @@ void ProjectView::DrawView() {
// Draw title

char projectString[80] ;
sprintf(projectString,"Project - Build %s.%s.%s",PROJECT_NUMBER,PROJECT_RELEASE,BUILD_COUNT) ;
sprintf(projectString,"Project (Build %s.%s.%s)",PROJECT_NUMBER,PROJECT_RELEASE,BUILD_COUNT) ;

SetColor(CD_NORMAL) ;
DrawString(pos._x,pos._y,projectString,props) ;
Expand Down
2 changes: 1 addition & 1 deletion sources/Application/Views/SongView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ void SongView::DrawView() {
std::ostringstream os;

os << ((player->GetSequencerMode() == SM_SONG) ? "Song" : "Live");
os << " - ";
os << ": ";
os << songname_;
std::string buffer(os.str());

Expand Down

0 comments on commit fde553d

Please sign in to comment.