Exemple #1
0
//--------------------------------------------------------------
void Device::loadXMLColor(ofxXmlSettings& settings)
{
  float	colorManualHsb[2];
  colorManualHsb[0]			= settings.getValue("device:color:colorMode_manual_hsb:hue", 			127.0f);
  colorManualHsb[1]			= settings.getValue("device:color:colorMode_manual_hsb:saturation", 	127.0f);
  setColorHueSaturation(colorManualHsb[0],colorManualHsb[1]);
  OFAPPLOG->println(" - colorManualHsb, (hue="+ofToString(colorManualHsb[0])+", saturation="+ofToString(colorManualHsb[1])+")");

  int enable = settings.getValue("device:color:enable", 			0);
  enableColor(enable>0 ? true : false);
}
Exemple #2
0
void ColorToolItem::actionSelected(ActionGroup group, ActionType action) {
	XOJ_CHECK_TYPE(ColorToolItem);

	inUpdate = true;
	if (this->group == group && this->item) {
		if (isSelector()) {
			gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(this->item), isSelector());
		}
		enableColor(toolHandler->getColor());
	}
	inUpdate = false;
}