Ejemplo n.º 1
0
void RemoveBolusPreset(){
	if (c_operation == e_operation_removeBolusPreset){
		switch(c_bolRemStatus){
		case e_opStatus_idle:
			if (M_bolSelected){
				c_bolRemStatus = e_opStatus_confirm;
				//F_removeBolusPreset = false;
				CopyPreset( &m_bolSelected, &p_bolRemSelected );

			} else {
				;//F_removeBolusPreset = false;
			}
			break;

		case e_opStatus_confirm:
			if ( M_bolRemResp == e_response_accept ){
				c_bolRemStatus = e_opStatus_idle;
				F_removeBolusPreset = true;
				CopyPreset( &p_bolRemSelected, &F_bolusPresetToRemove );
				//RemovePresetFromSet( &p_bolRemSelected );
				CopyPreset( &k_emptyBol, &p_bolRemSelected );

			} else if( M_bolRemResp == e_response_retry){
				c_bolRemStatus = e_opStatus_idle;
			//	F_removeBolusPreset = false;
				CopyPreset( &k_emptyBol, &p_bolRemSelected );

			} else if (M_bolRemResp == e_response_cancel){
				c_bolRemStatus = e_opStatus_idle;
			//	F_removeBolusPreset = false;
				CopyPreset( &k_emptyBol, &p_bolRemSelected );

			}
			break;

		default: break;
		}
	} else {
		//F_removeBolusPreset = false;
		CopyPreset( &k_emptyBol, &p_bolRemSelected );
	}
}
Ejemplo n.º 2
0
void IntermediateSet(SDL_Surface *screen, SDL_Surface *digits, Config *asdcfg, unsigned *unused1)
{
    CopyPreset(asdcfg, Presets[1]);
    asdcfg->prst = intermediate;
    DrawCounters(screen, digits, *asdcfg);
}
Ejemplo n.º 3
0
void ExpertSet(SDL_Surface *screen, SDL_Surface *digits, Config *asdcfg, unsigned *unused1)
{
    CopyPreset(asdcfg, Presets[2]);
    asdcfg->prst = expert;
    DrawCounters(screen, digits, *asdcfg);
}
Ejemplo n.º 4
0
void BeginnerSet(SDL_Surface *screen, SDL_Surface *digits, Config *asdcfg, unsigned *unused1)
{
    CopyPreset(asdcfg, Presets[0]);
    asdcfg->prst = beginner;
    DrawCounters(screen, digits, *asdcfg);
}