void TwinkleEffect::SetDefaultParameters(Model *cls) { TwinklePanel *tp = (TwinklePanel*)panel; if (tp == nullptr) { return; } SetSliderValue(tp->Slider_Twinkle_Count, 3); SetSliderValue(tp->Slider_Twinkle_Steps, 30); SetCheckBoxValue(tp->CheckBox_Twinkle_Strobe, false); SetCheckBoxValue(tp->CheckBox_Twinkle_ReRandom, false); }
void SnowflakesEffect::SetDefaultParameters(Model *cls) { SnowflakesPanel *sp = (SnowflakesPanel*)panel; if (sp == nullptr) { return; } SetSliderValue(sp->Slider_Snowflakes_Count, 5); SetSliderValue(sp->Slider_Snowflakes_Type, 1); SetSliderValue(sp->Slider_Snowflakes_Speed, 10); SetChoiceValue(sp->Choice_Falling, "Driving"); }
void ShimmerEffect::SetDefaultParameters(Model *cls) { ShimmerPanel *sp = (ShimmerPanel*)panel; if (sp == nullptr) { return; } sp->BitmapButton_Shimmer_CyclesVC->SetActive(false); sp->BitmapButton_Shimmer_Duty_FactorVC->SetActive(false); SetSliderValue(sp->Slider_Shimmer_Duty_Factor, 50); SetSliderValue(sp->Slider_Shimmer_Cycles, 10); SetCheckBoxValue(sp->CheckBox_Shimmer_Use_All_Colors, false); }
void FireworksEffect::SetDefaultParameters(Model *cls) { FireworksPanel *fp = (FireworksPanel*)panel; if (fp == nullptr) { return; } SetSliderValue(fp->Slider_Fireworks_Num_Explosions, 16); SetSliderValue(fp->Slider_Fireworks_Count, 50); SetSliderValue(fp->Slider_Fireworks_Velocity, 2); SetSliderValue(fp->Slider_Fireworks_Fade, 50); SetSliderValue(fp->Slider_Fireworks_Sensitivity, 50); SetCheckBoxValue(fp->CheckBox_Fireworks_UseMusic, false); SetCheckBoxValue(fp->CheckBox_FireTiming, false); SetPanelTimingTracks(); }
void PinwheelEffect::SetDefaultParameters(Model *cls) { PinwheelPanel *pp = (PinwheelPanel*)panel; if (pp == nullptr) { return; } pp->BitmapButton_PinwheelXCVC->SetActive(false); pp->BitmapButton_PinwheelYCVC->SetActive(false); pp->BitmapButton_Pinwheel_ArmSizeVC->SetActive(false); pp->BitmapButton_Pinwheel_SpeedVC->SetActive(false); pp->BitmapButton_Pinwheel_ThicknessVC->SetActive(false); pp->BitmapButton_Pinwheel_TwistVC->SetActive(false); SetChoiceValue(pp->Choice_Pinwheel_3D, "none"); SetSliderValue(pp->Slider_PinwheelXC, 0); SetSliderValue(pp->Slider_PinwheelYC, 0); SetSliderValue(pp->Slider_Pinwheel_Arms, 3); SetSliderValue(pp->Slider_Pinwheel_ArmSize, 100); SetSliderValue(pp->Slider_Pinwheel_Thickness, 0); SetSliderValue(pp->Slider_Pinwheel_Twist, 0); SetSliderValue(pp->Slider_Pinwheel_Speed, 10); SetCheckBoxValue(pp->CheckBox_Pinwheel_Rotation, true); }
void TASInputDlg::GetKeyBoardInput(GCPadStatus* PadStatus) { SetStickValue(&m_main_stick.x_cont.set_by_keyboard, &m_main_stick.x_cont.value, m_main_stick.x_cont.text, PadStatus->stickX); SetStickValue(&m_main_stick.y_cont.set_by_keyboard, &m_main_stick.y_cont.value, m_main_stick.y_cont.text, PadStatus->stickY); SetStickValue(&m_c_stick.x_cont.set_by_keyboard, &m_c_stick.x_cont.value, m_c_stick.x_cont.text, PadStatus->substickX); SetStickValue(&m_c_stick.y_cont.set_by_keyboard, &m_c_stick.y_cont.value, m_c_stick.y_cont.text, PadStatus->substickY); SetSliderValue(&m_l_cont, PadStatus->triggerLeft); SetSliderValue(&m_r_cont, PadStatus->triggerRight); for (unsigned int i = 0; i < ArraySize(m_buttons); ++i) { if (m_buttons[i] != nullptr) SetButtonValue(m_buttons[i], ((PadStatus->button & m_gc_pad_buttons_bitmask[i]) != 0)); } SetButtonValue(&m_l, ((PadStatus->triggerLeft) == 255) || ((PadStatus->button & PAD_TRIGGER_L) != 0)); SetButtonValue(&m_r, ((PadStatus->triggerRight) == 255) || ((PadStatus->button & PAD_TRIGGER_R) != 0)); }
void TASInputDlg::GetKeyBoardInput(u8* data, WiimoteEmu::ReportFeatures rptf, int ext, const wiimote_key key) { u8* const coreData = rptf.core ? (data + rptf.core) : nullptr; u8* const accelData = rptf.accel ? (data + rptf.accel) : nullptr; //u8* const irData = rptf.ir ? (data + rptf.ir) : nullptr; u8* const extData = rptf.ext ? (data + rptf.ext) : nullptr; if (coreData) { for (unsigned int i = 0; i < 10; ++i) { if (m_buttons[i] != nullptr) SetButtonValue(m_buttons[i], (((wm_buttons*)coreData)->hex & m_wii_buttons_bitmask[i]) != 0); } } if (accelData) { wm_accel* dt = (wm_accel*)accelData; SetSliderValue(&m_x_cont, dt->x << 2 | ((wm_buttons*)coreData)->acc_x_lsb, m_x_cont.default_value); SetSliderValue(&m_y_cont, dt->y << 2 | ((wm_buttons*)coreData)->acc_y_lsb << 1, m_y_cont.default_value); SetSliderValue(&m_z_cont, dt->z << 2 | ((wm_buttons*)coreData)->acc_z_lsb << 1, m_z_cont.default_value); } // I don't think this can be made to work in a sane manner. //if (irData) //{ // u16 x = 1023 - (irData[0] | ((irData[2] >> 4 & 0x3) << 8)); // u16 y = irData[1] | ((irData[2] >> 6 & 0x3) << 8); // SetStickValue(&m_main_stick.x_cont.set_by_keyboard, &m_main_stick.x_cont.value, m_main_stick.x_cont.text, x, 561); // SetStickValue(&m_main_stick.y_cont.set_by_keyboard, &m_main_stick.y_cont.value, m_main_stick.y_cont.text, y, 486); //} if (extData && ext == 1) { wm_nc& nunchuk = *(wm_nc*)extData; WiimoteDecrypt(&key, (u8*)&nunchuk, 0, sizeof(wm_nc)); nunchuk.bt.hex = nunchuk.bt.hex ^ 0x3; SetButtonValue(m_buttons[11], nunchuk.bt.c != 0); SetButtonValue(m_buttons[12], nunchuk.bt.z != 0); } }
// NOTE: Host / CPU Thread void TASInputDlg::GetKeyBoardInput(GCPadStatus* PadStatus) { SetStickValue(&m_main_stick.x_cont, PadStatus->stickX); SetStickValue(&m_main_stick.y_cont, PadStatus->stickY); SetStickValue(&m_c_stick.x_cont, PadStatus->substickX); SetStickValue(&m_c_stick.y_cont, PadStatus->substickY); SetSliderValue(&m_l_cont, PadStatus->triggerLeft); SetSliderValue(&m_r_cont, PadStatus->triggerRight); for (size_t i = 0; i < m_buttons.size(); ++i) { if (m_buttons[i] != nullptr) SetButtonValue(m_buttons[i], ((PadStatus->button & s_gc_pad_buttons_bitmask[i]) != 0)); } SetButtonValue(&m_l, ((PadStatus->triggerLeft) == 255) || ((PadStatus->button & PAD_TRIGGER_L) != 0)); SetButtonValue(&m_r, ((PadStatus->triggerRight) == 255) || ((PadStatus->button & PAD_TRIGGER_R) != 0)); }
void MarqueeEffect::SetDefaultParameters(Model *cls) { MarqueePanel *mp = (MarqueePanel*)panel; if (mp == nullptr) { return; } SetSliderValue(mp->Slider_MarqueeXC, 0); SetSliderValue(mp->Slider_MarqueeYC, 0); SetSliderValue(mp->Slider_Marquee_Band_Size, 3); SetSliderValue(mp->Slider_Marquee_ScaleX, 100); SetSliderValue(mp->Slider_Marquee_ScaleY, 100); SetSliderValue(mp->Slider_Marquee_Skip_Size, 0); SetSliderValue(mp->Slider_Marquee_Speed, 3); SetSliderValue(mp->Slider_Marquee_Stagger, 0); SetSliderValue(mp->Slider_Marquee_Start, 0); SetSliderValue(mp->Slider_Marquee_Thickness, 1); SetCheckBoxValue(mp->CheckBox_Marquee_Reverse, false); SetCheckBoxValue(mp->CheckBox_Marquee_PixelOffsets, false); SetCheckBoxValue(mp->CheckBox_Marquee_WrapX, false); }
void OnEffect::SetDefaultParameters(Model *cls) { OnPanel *p = (OnPanel*)panel; p->CheckBoxShimmer->SetValue(false); p->TextCtrlStart->SetValue("100"); p->TextCtrlEnd->SetValue("100"); p->TextCtrlCycles->SetValue("1.0"); p->BitmapButton_On_Transparency->SetActive(false); SetSliderValue(p->Slider_On_Transparency, 0); }
void VideoEffect::SetDefaultParameters(Model *cls) { VideoPanel *vp = (VideoPanel*)panel; if (vp == nullptr) { return; } vp->FilePicker_Video_Filename->SetFileName(wxFileName()); SetSliderValue(vp->Slider_Video_Starttime, 0); SetCheckBoxValue(vp->CheckBox_Video_AspectRatio, false); SetChoiceValue(vp->Choice_Video_DurationTreatment, "Normal"); }
void GradientSliderWidget::mouseMoveEvent(QMouseEvent *event) { if (pressedSlider != 0 && sliders.contains(pressedSlider)) { int yLoc = event->y(); TriangleSliderButton *currentSlider = sliders.value(pressedSlider, 0); if (currentSlider) { float newValue = MapYToValue(yLoc); SetSliderValue(pressedSlider, newValue); emit sliderValueChanged(pressedSlider, newValue); UpdateGradientStops(); } } }
void GradientSliderWidget::SetGradientStops(QGradientStops newStops) { QList<uint> keys = sliders.keys(); for (int i=0; i<keys.size(); ++i) { RemoveSlider(keys[i]); } if (newStops.size() >= 2) { for (int i=0; i<newStops.size(); ++i) { unsigned int newSlider = AddSlider(); SetSliderValue(newSlider, minValue + (1.0-newStops[i].first) * (maxValue-minValue)); SetSliderColor(newSlider, newStops[i].second); } } else { CreateDefaultSliders(); } UpdateGradientStops(); }
void TASInputDlg::GetKeyBoardInput(u8* data, WiimoteEmu::ReportFeatures rptf, int ext, const wiimote_key key) { u8* const coreData = rptf.core ? (data + rptf.core) : nullptr; u8* const accelData = rptf.accel ? (data + rptf.accel) : nullptr; //u8* const irData = rptf.ir ? (data + rptf.ir) : nullptr; u8* const extData = rptf.ext ? (data + rptf.ext) : nullptr; if (coreData) { for (unsigned int i = 0; i < 11; ++i) { if (m_buttons[i] != nullptr) SetButtonValue(m_buttons[i], (((wm_buttons*)coreData)->hex & m_wii_buttons_bitmask[i]) != 0); } } if (accelData) { wm_accel* dt = (wm_accel*)accelData; SetSliderValue(&m_x_cont, dt->x << 2 | ((wm_buttons*)coreData)->acc_x_lsb); SetSliderValue(&m_y_cont, dt->y << 2 | ((wm_buttons*)coreData)->acc_y_lsb << 1); SetSliderValue(&m_z_cont, dt->z << 2 | ((wm_buttons*)coreData)->acc_z_lsb << 1); } // I don't think this can be made to work in a sane manner. //if (irData) //{ // u16 x = 1023 - (irData[0] | ((irData[2] >> 4 & 0x3) << 8)); // u16 y = irData[1] | ((irData[2] >> 6 & 0x3) << 8); // SetStickValue(&m_main_stick.x_cont.set_by_keyboard, &m_main_stick.x_cont.value, m_main_stick.x_cont.text, x, 561); // SetStickValue(&m_main_stick.y_cont.set_by_keyboard, &m_main_stick.y_cont.value, m_main_stick.y_cont.text, y, 486); //} if (extData && ext == 1) { wm_nc& nunchuk = *(wm_nc*)extData; WiimoteDecrypt(&key, (u8*)&nunchuk, 0, sizeof(wm_nc)); nunchuk.bt.hex = nunchuk.bt.hex ^ 0x3; SetButtonValue(m_buttons[11], nunchuk.bt.c != 0); SetButtonValue(m_buttons[12], nunchuk.bt.z != 0); } if (extData && ext == 2) { wm_classic_extension& cc = *(wm_classic_extension*)extData; WiimoteDecrypt(&key, (u8*)&cc, 0, sizeof(wm_classic_extension)); cc.bt.hex = cc.bt.hex ^ 0xFFFF; for (unsigned int i = 0; i < 15; ++i) { SetButtonValue(&m_cc_buttons[i], ((cc.bt.hex & m_cc_buttons_bitmask[i]) != 0)); } if (m_cc_l.value == 31) m_cc_buttons[10].checkbox->SetValue(true); if (m_cc_r.value == 31) m_cc_buttons[11].checkbox->SetValue(true); SetSliderValue(&m_cc_l_stick.x_cont, cc.regular_data.lx); SetSliderValue(&m_cc_l_stick.y_cont, cc.regular_data.ly); SetSliderValue(&m_cc_r_stick.x_cont, cc.rx1 | (cc.rx2 << 1) | (cc.rx3 << 3)); SetSliderValue(&m_cc_r_stick.y_cont, cc.ry); } }
void MorphEffect::SetDefaultParameters(Model *cls) { MorphPanel *mp = (MorphPanel*)panel; if (mp == nullptr) { return; } mp->BitmapButton_MorphAccel->SetActive(false); mp->BitmapButton_MorphDuration->SetActive(false); mp->BitmapButton_MorphEndLength->SetActive(false); mp->BitmapButton_MorphStartLength->SetActive(false); mp->BitmapButton_Morph_End_X1->SetActive(false); mp->BitmapButton_Morph_End_Y1->SetActive(false); mp->BitmapButton_Morph_End_X2->SetActive(false); mp->BitmapButton_Morph_End_Y2->SetActive(false); mp->BitmapButton_Morph_Start_X1->SetActive(false); mp->BitmapButton_Morph_Start_Y1->SetActive(false); mp->BitmapButton_Morph_Start_X2->SetActive(false); mp->BitmapButton_Morph_Start_Y2->SetActive(false); mp->BitmapButton_Morph_Stagger->SetActive(false); mp->BitmapButton_Morph_Repeat_Count->SetActive(false); mp->BitmapButton_Morph_Repeat_Skip->SetActive(false); SetSliderValue(mp->Slider_MorphAccel, 0); SetSliderValue(mp->Slider_MorphDuration, 20); SetSliderValue(mp->Slider_MorphEndLength, 1); SetSliderValue(mp->Slider_MorphStartLength, 1); SetSliderValue(mp->Slider_Morph_End_X1, 0); SetSliderValue(mp->Slider_Morph_End_X2, 100); SetSliderValue(mp->Slider_Morph_End_Y1, 100); SetSliderValue(mp->Slider_Morph_End_Y2, 100); SetSliderValue(mp->Slider_Morph_Repeat_Count, 0); SetSliderValue(mp->Slider_Morph_Repeat_Skip, 1); SetSliderValue(mp->Slider_Morph_Stagger, 0); SetSliderValue(mp->Slider_Morph_Start_X1, 0); SetSliderValue(mp->Slider_Morph_Start_X2, 100); SetSliderValue(mp->Slider_Morph_Start_Y1, 0); SetSliderValue(mp->Slider_Morph_Start_Y2, 100); SetCheckBoxValue(mp->CheckBox_Morph_End_Link, false); SetCheckBoxValue(mp->CheckBox_Morph_Start_Link, false); SetCheckBoxValue(mp->CheckBox_ShowHeadAtStart, false); }
void QSliderSpinBox::SetValue(double value) { this->setValue(value); SetSliderValue(value); }