当前位置: 首页>>代码示例>>C++>>正文


C++ UTFT::setBackColor方法代码示例

本文整理汇总了C++中UTFT::setBackColor方法的典型用法代码示例。如果您正苦于以下问题:C++ UTFT::setBackColor方法的具体用法?C++ UTFT::setBackColor怎么用?C++ UTFT::setBackColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UTFT的用法示例。


在下文中一共展示了UTFT::setBackColor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: highCalibration

void ECCalibrateScreen::highCalibration()
{
	myUTFT.clrScr();
	myUTFT.setColor(255, 0, 0);
	myUTFT.fillRect(0, 0, 220, 13);
	myUTFT.setColor(255, 255, 255);
	myUTFT.setBackColor(255, 0, 0);
	myUTFT.drawLine(0, 14, 320, 14);
	myUTFT.print("EC Calibration", CENTER, 1);
	myUTFT.setBackColor(0, 0, 0);

	myUTFT.print("Calibrate now with the high side liquid", LEFT, 30);
	myUTFT.print("Place the sensor in the 3,000Us ", LEFT, 42);
	myUTFT.print("calibration liquid. This process", LEFT, 54);
	myUTFT.print("will take 5 minutes to complete", LEFT, 66);
	myUTFT.print("Wait for process to finish before ", LEFT, 78);
	myUTFT.print("removing the sensor from the liquid", LEFT, 90);
	myUTFT.print("", LEFT, 102);
	myUTFT.print("************************************", LEFT, 114);
	myUTFT.print("Touch screen to continue", CENTER, 162);

	waitForTouch();
	myUTFT.clrScr();

	inputstring = "C\r";  //set in continious mode

	myUTFT.clrScr();
	String thisSt = String(iSeconds);
	myUTFT.print("Calibration in Progress", CENTER, 30);
	myUTFT.print("Seconds left until ready " + thisSt, CENTER, 42);
	simpleTimer.setTimer(3000, updateWaitScreen, /*100*/ 4); //Update screen every 3 seconds for 5 minues.

}
开发者ID:markcgriffiths,项目名称:hydrocontroller,代码行数:33,代码来源:ECCalibrateScreen.cpp

示例2: SdrawScreen

void ECCalibrateScreen::SdrawScreen()
{
	myUTFT.clrScr();
	myUTFT.setBackColor(0, 0, 255);

	myButtons.setButtonColors(VGA_WHITE, VGA_GRAY, VGA_BLACK, VGA_RED, VGA_BLUE);

	myButtons.addButton( 10, 10, MAIN_BUTTON_X, MAIN_BUTTON_Y, mainButton);
	myButtons.addButton( 160, 10, MAIN_BUTTON_X, MAIN_BUTTON_Y, mainButton);
	myButtons.addButton( 10, 64, MAIN_BUTTON_X, MAIN_BUTTON_Y, mainButton);
	myButtons.addButton( 160, 64, MAIN_BUTTON_X, MAIN_BUTTON_Y, mainButton);
	myButtons.addButton( 10, 116, MAIN_BUTTON_X, MAIN_BUTTON_Y, mainButton);
	myButtons.addButton( 160, 116, MAIN_BUTTON_X, MAIN_BUTTON_Y, mainButton);
	myButtons.addButton( 10, 170, MAIN_BUTTON_X, MAIN_BUTTON_Y, mainButton);
	myButtons.addButton( 160, 170, MAIN_BUTTON_X, MAIN_BUTTON_Y, mainButton);

	myButtons.drawButtons();

	//Add text to buttons.
	myUTFT.setBackColor (161,190,237);
	myUTFT.print("Reset", 55, 30);
	myUTFT.print("Info", 190, 30);
	myUTFT.print("Read", 55, 90);
	myUTFT.print("TRead", 190, 90);
	myUTFT.print("Stop", 55, 146);
	myUTFT.print("Start", 190, 146);
	myUTFT.print("Back", 55, 195);
	myUTFT.print("Calibrate", 185, 195);
}
开发者ID:markcgriffiths,项目名称:hydrocontroller,代码行数:29,代码来源:ECCalibrateScreen.cpp

示例3: drawPrepareScreen

void  PlugScreen::drawPrepareScreen()
{
	Serial.println("PlugScreen::handlePlugScreen SET LIGHTS ID  \n");
	myUTFT.setFont(SmallFont);
	myUTFT.clrScr();
	myUTFT.setColor(255, 0, 0);
	myUTFT.fillRect(0, 0, 220, 13);
	myUTFT.setColor(255, 255, 255);
	myUTFT.setBackColor(255, 0, 0);
	myUTFT.drawLine(0, 14, 320, 14);
	myUTFT.print("Plug Setting", CENTER, 1);
	myUTFT.setBackColor(0, 0, 0);

	myUTFT.print("Use the remote that came with your", LEFT, 30);
	myUTFT.print("plugs to set which unit and address it", LEFT, 42);
	myUTFT.print("uses.Just point the remote at the screen", LEFT, 54);
	myUTFT.print("and press a button for the unit you want", LEFT, 66);
	myUTFT.print("to use for the lights", LEFT, 78);
	myUTFT.print("", LEFT, 90);
	myUTFT.print("Please press a unit for the lights", LEFT, 102);
	myUTFT.print("", LEFT, 114);

	exitButton = myButtons.addButton( 10, 170, 145, 53, mainButton);
	myButtons.drawButton(exitButton);
	myUTFT.setBackColor (161,190,237);
	myUTFT.print("Cancel", 55, 195);
	myUTFT.setFont(BigFont);
}
开发者ID:markcgriffiths,项目名称:hydrocontroller,代码行数:28,代码来源:PlugScreen.cpp

示例4: drawScreen

void PlugScreen::drawScreen(  )
{
	//Clear What was there.
	 myUTFT.clrScr();

	 resetButtons();
	 myUTFT.setBackColor (0, 0, 0);
	 myUTFT.print("Plug Setup", CENTER, 1);
	 myUTFT.setBackColor(0, 0, 255);

	 //Draw Lights button
	 lightsButton = myButtons.addButton( 10, 54, 145, 53, mainButton);
	 myButtons.drawButton(lightsButton);
	 myUTFT.print("Lights", 35, 71);

	 heaterButton = myButtons.addButton( 10, 110, 145, 53, mainButton);
	 myButtons.drawButton(heaterButton);
	 myUTFT.print("Heater", 35, 135);


	 pumpButton = myButtons.addButton( 160, 54, 145, 53, mainButton);
	 myButtons.drawButton(pumpButton);
	 myUTFT.print("Pump", 190, 71);

	 settingsButton = myButtons.addButton( 160, 110, 145, 53, mainButton);
	 myButtons.drawButton(settingsButton);
	 myUTFT.print("Override", 175, 135);

	 //Draw back button
	 back2SetupButton = myButtons.addButton( 10, 170, 145, 53, mainButton);
	 myButtons.drawButton(back2SetupButton);
	 myUTFT.print("Back", 55, 195);

}
开发者ID:markcgriffiths,项目名称:hydrocontroller,代码行数:34,代码来源:PlugScreen.cpp

示例5: dryCalibration

void ECCalibrateScreen::dryCalibration()
{

	myUTFT.clrScr();
	myUTFT.setColor(255, 0, 0);
	myUTFT.fillRect(0, 0, 220, 13);
	myUTFT.setColor(255, 255, 255);
	myUTFT.setBackColor(255, 0, 0);
	myUTFT.drawLine(0, 14, 320, 14);
	myUTFT.print("EC Calibration", CENTER, 1);
	myUTFT.setBackColor(0, 0, 0);

	myUTFT.print("Do NOT put sensor in any Liquid you are", LEFT, 30);
	myUTFT.print("going to calibrate for a dry condition", LEFT, 42);
	myUTFT.print("This is much like setting a TARE on a", LEFT, 54);
	myUTFT.print("scale", LEFT, 66);
	myUTFT.print("", LEFT, 78);
	myUTFT.print("Please make sure that the EC sensor is", LEFT, 90);
	myUTFT.print("connected to the BNC connector before", LEFT, 102);
	myUTFT.print("you continue", LEFT, 114);
	//myUTFT.print("crosshairs in sequence.", LEFT, 126);
	myUTFT.print("Touch screen to continue", CENTER, 162);

	waitForTouch();
	myUTFT.clrScr();

	inputstring = "Z0\r";  //Command to get info
	Serial3.print(inputstring); //send command to sensor.

}
开发者ID:markcgriffiths,项目名称:hydrocontroller,代码行数:30,代码来源:ECCalibrateScreen.cpp

示例6: waitForReceiver

void PlugScreen::waitForReceiver(NewRemoteCode receivedCode)
{
	//Clear What was there.
	myUTFT.setFont(SmallFont);
	myUTFT.clrScr();
	myUTFT.setColor(255, 0, 0);
	myUTFT.fillRect(0, 0, 220, 13);
	myUTFT.setColor(255, 255, 255);
	myUTFT.setBackColor(255, 0, 0);
	myUTFT.drawLine(0, 14, 320, 14);
	myUTFT.print("ID Set", CENTER, 1);
	myUTFT.setBackColor(0, 0, 0);

	setAddresstoEEPROM(receivedCode.address);
	if(plugDevice.lights)
	{
		EEPROM.write(EEPROM_LEARNED_LIGHTS_UNIT,receivedCode.unit);
		plugDevice.lights = false;
	}
	if(plugDevice.pump)
	{
		EEPROM.write(EEPROM_LEARNED_PUMP_UNIT,receivedCode.unit);
		plugDevice.pump = false;
	}
	if(plugDevice.heater)
	{
		EEPROM.write(EEPROM_LEARNED_HEATER_UNIT,receivedCode.unit);
		plugDevice.heater = false;
	}

	//unsigned long add = getAddress();
	String sAddress(receivedCode.address);
	String slightID(receivedCode.unit);

	myUTFT.print("The unit has been set to unit ", LEFT, 30);
	myUTFT.print(slightID, LEFT, 42);
	myUTFT.print("The Transmitting Address is", LEFT, 54);
	myUTFT.print(sAddress, LEFT, 66);
	myUTFT.print("You can now use the plug", LEFT, 78);
	myUTFT.print("**********************************", LEFT, 90);

	myButtons.deleteAllButtons();
	exitButton = -1;

	exitButton = myButtons.addButton( 10, 170, 145, 53, mainButton);
	myButtons.drawButton(exitButton);
	myUTFT.setBackColor (161,190,237);
	myUTFT.print("Back", 55, 195);
	myUTFT.setFont(BigFont);

}
开发者ID:markcgriffiths,项目名称:hydrocontroller,代码行数:51,代码来源:PlugScreen.cpp

示例7: endCalibration

void ECCalibrateScreen::endCalibration()
{
	myUTFT.fillScr(VGA_BLUE);
	myUTFT.setColor(VGA_RED);
	myUTFT.fillRoundRect(80, 70, 239, 169);

	myUTFT.setColor(VGA_WHITE);
	myUTFT.setBackColor(VGA_RED);
	myUTFT.print("! All Done !", CENTER, 93);
	myUTFT.print("Touch Screen", CENTER, 119);
	myUTFT.print("To Exit", CENTER, 132);

	SwaitForTouch();
	myUTFT.clrScr();

	myUTFT.setFont(BigFont);

	myButtons.enableButton( /*resetButton*/ 0);
	myButtons.enableButton( /*infoButton*/ 1);
	myButtons.enableButton( /*readButton*/ 2);
	myButtons.enableButton( /*tempReadButton*/ 3);
	myButtons.enableButton( /*stopButton*/ 4);
	myButtons.enableButton( /*startButton*/ 5);
	myButtons.enableButton( /*backButton*/6);
	myButtons.enableButton( /*calibrateButton*/7);

	SdrawScreen();

}
开发者ID:markcgriffiths,项目名称:hydrocontroller,代码行数:29,代码来源:ECCalibrateScreen.cpp

示例8:

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
void Screen1::doUpdate(TFTMenu* menu)
{
    // тут обновляем внутреннее состояние
	if (isActive())
	{
		DS3231Time tm = RealtimeClock.getTime();
		if (oldsecond != tm.second)
		{
			oldsecond = tm.second;
			UTFT* dc = menu->getDC();
			dc->setColor(VGA_WHITE);
			dc->setBackColor(VGA_BLACK);
			// получаем компоненты даты в виде строк
			String strDate = RealtimeClock.getDateStr(tm);
			String strTime = RealtimeClock.getTimeStr(tm);
			dc->setFont(SmallRusFont);
			// печатаем их
			dc->print(strDate, 5, 305);
			dc->print(strTime, 160, 305);
															//dc->printNumF(setupPin.power3V3, 1, 195, 1);    //
															//dc->printNumF(setupPin.power5V0, 1, 195, 15);   //
															//dc->printNumI(setupPin.power200, 195, 30);      //
		}
	}
}
开发者ID:XBeeModule,项目名称:XBee,代码行数:26,代码来源:Screen1.cpp

示例9:

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
void Screen1_0::doDraw(TFTMenu* menu)
{
  UTFT* dc = menu->getDC();
  dc->setColor(VGA_WHITE);
  dc->setBackColor(VGA_BLACK);
  dc->setFont(TFT_FONT);
  
  // тут рисуем, что надо именно нам, кнопки прорисуются сами после того, как мы тут всё отрисуем
  menu->print("Настройки", 50, 0);
}
开发者ID:XBeeModule,项目名称:XBee,代码行数:11,代码来源:Screen1_0.cpp

示例10: drawStoppingScreen

void ECCalibrateScreen::drawStoppingScreen()
{
	myUTFT.clrScr();
	resetButtons();

	myButtons.setButtonColors(VGA_WHITE, VGA_GRAY, VGA_BLACK, VGA_RED, VGA_BLACK);

	myUTFT.setBackColor (VGA_BLACK);
	myUTFT.print("EC STOPPED", CENTER, 1);

	myUTFT.print("All EC Readings", CENTER, 30);
	myUTFT.print("Now Stopped", CENTER, 54);
	myUTFT.print("Sensor Standby", CENTER, 78);

	//Draw back button
	subBackButton = myButtons.addButton( 10, 168, 145, 53, mainButton);
	myButtons.drawButton(subBackButton);
	myUTFT.setBackColor (161,190,237);
	myUTFT.print("Back", 45, 185);
}
开发者ID:markcgriffiths,项目名称:hydrocontroller,代码行数:20,代码来源:ECCalibrateScreen.cpp

示例11: doDraw

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
void SoundLevelScreen::doDraw(TFTMenu* menu)
{
	UTFT* dc = menu->getDC();
	dc->setColor(VGA_WHITE);
	uint8_t* oldFont = dc->getFont();

	dc->setFont(BigRusFont);
	dc->setBackColor(VGA_BLACK);

	// тут рисуем, что надо именно нам, кнопки прорисуются сами после того, как мы тут всё отрисуем
	menu->print("УРОВЕНЬ ЗВУКА", 105, 10);
	dc->setFont(oldFont);
}
开发者ID:ArduinoNanoV3,项目名称:ArduinoNanoV3,代码行数:14,代码来源:Screen2.cpp

示例12: lowCalibration

void ECCalibrateScreen::lowCalibration()
{
	myUTFT.clrScr();
	myUTFT.setColor(255, 0, 0);
	myUTFT.fillRect(0, 0, 220, 13);
	myUTFT.setColor(255, 255, 255);
	myUTFT.setBackColor(255, 0, 0);
	myUTFT.drawLine(0, 14, 320, 14);
	myUTFT.print("EC Calibration", CENTER, 1);
	myUTFT.setBackColor(0, 0, 0);

	myUTFT.print("Calibrate now with the low side liquid", LEFT, 30);
	myUTFT.print("Place the sensor in the 220Us", LEFT, 42);
	myUTFT.print("calibration liquid.  This process", LEFT, 54);
	myUTFT.print("will take 5 mins to complete", LEFT, 66);
	myUTFT.print("Wait for process to finish before ", LEFT, 78);
	myUTFT.print("removing the sensor from the liquid", LEFT, 90);
	myUTFT.print("", LEFT, 102);
	myUTFT.print("************************************", LEFT, 114);
	myUTFT.print("Touch screen to continue", CENTER, 162);

	SwaitForTouch();
	myUTFT.clrScr();

	inputstring = "C\r";  //set in continious mode

	String thisSt = String(12);
	myUTFT.print("Calibration in Progress", CENTER, 30);
	myUTFT.print("Seconds left until ready " + thisSt, CENTER, 42);
	simpleTimer.setTimer(3000, updateLowWaitScreen, /*100*/ 4); //Update screen every 3 seconds for 5 minues.


	//delay(2000);  //Wait 2 seconds -- make 5mins
	//Serial3.print(inputstring); //send command to sensor.
	//inputstring = "Z2\r";  //set the sensor at this value.
	//Serial3.print(inputstring); //need to send twice??


}
开发者ID:markcgriffiths,项目名称:hydrocontroller,代码行数:39,代码来源:ECCalibrateScreen.cpp

示例13: render

void Mixer::render(UTFT tft) {
	tft.clrScr();

	tft.setColor(255, 255, 255);
	tft.fillRect(0, 0, tft.getDisplayXSize() - 1, 12);
	tft.setBackColor(255, 255, 255);
	tft.setColor(0, 0, 0);
	tft.setFont(SmallFont);
	tft.print("Mixer", 10, 0);

	_tft = tft;
	for(byte x=0;x<3; x++) {
		renderedGains[x] = 0;
		renderMute(x);
	}
	update();
}
开发者ID:danielesteban,项目名称:DarthStep,代码行数:17,代码来源:Mixer.cpp

示例14: getInfo

/*
 * Delivering this instruction will instruct the E.C. Circuit to transmit it device info.
	Full proper syntax: i<cr> or I<CR>
	The E.C. Circuit will respond: E,V3.0,4/11<CR>
	Where:
	E =E.C. Circuit
	V3.1= Firmware version
	5/13= Date firmware was written
 */
void ECCalibrateScreen::getInfo()
{
	inputstring = "I\r";  //Command to get info
	Serial3.print(inputstring); //send command to sensor.

	//Draw part of the screen here and the info when we have it.
	//info comes after the loop has iterated.
	myUTFT.clrScr();
	resetButtons();
	//Draw back button
	subBackButton = myButtons.addButton( 10, 168, 145, 53, mainButton);
	myButtons.drawButton(subBackButton);
	myUTFT.setBackColor (161,190,237);
	myUTFT.print("Back", 45, 185);

	waiting_for_info = true;

}
开发者ID:markcgriffiths,项目名称:hydrocontroller,代码行数:27,代码来源:ECCalibrateScreen.cpp

示例15: getTempSingleReading

void ECCalibrateScreen::getTempSingleReading()
{
	inputstring = ( waterTempString + "\r");  //"17.8\r"Command to get reading.
	Serial3.print(inputstring); //send command to sensor.
	delay(1000); //This takes 1000ms to complete.

	//Draw part of the screen here and the info when we have it.
	//info comes after the loop has iterated.
	myUTFT.clrScr();
	resetButtons();
	//Draw back button
	subBackButton = myButtons.addButton( 10, 168, 145, 53, mainButton);
	myButtons.drawButton(subBackButton);
	myUTFT.setBackColor (161,190,237);
	myUTFT.print("Back", 45, 185);

	waiting_for_single_reading = true;

}
开发者ID:markcgriffiths,项目名称:hydrocontroller,代码行数:19,代码来源:ECCalibrateScreen.cpp


注:本文中的UTFT::setBackColor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。