155 lines
4.5 KiB
C++
155 lines
4.5 KiB
C++
//---------------------------------------------------------------------------
|
|
|
|
#ifndef SetupFormUnitH
|
|
#define SetupFormUnitH
|
|
//---------------------------------------------------------------------------
|
|
#include <System.Classes.hpp>
|
|
#include <Vcl.Controls.hpp>
|
|
#include <Vcl.StdCtrls.hpp>
|
|
#include <Vcl.ExtCtrls.hpp>
|
|
#include <Vcl.Imaging.pngimage.hpp>
|
|
#include <Vcl.Imaging.jpeg.hpp>
|
|
#include "gdiplus.h"
|
|
#include "PNGButton.hpp"
|
|
#include "SkinHintWindow.h"
|
|
#include "PNGButton.hpp"
|
|
#include <Vcl.Graphics.hpp>
|
|
|
|
typedef TBitmap* PTBitmap;
|
|
using namespace Gdiplus;
|
|
//---------------------------------------------------------------------------
|
|
class TSetupForm : public TForm
|
|
{
|
|
__published: // IDE-managed Components
|
|
TImage *m_imgBk;
|
|
TPaintBox *m_panPointer;
|
|
TLabel *m_labSpeed;
|
|
TPNGButton *m_btnBrowseRight;
|
|
TPNGButton *m_btnBrowseLeft;
|
|
TPNGButton *m_btnNextStep;
|
|
TPNGButton *m_btnBeat44;
|
|
TPNGButton *m_btnBeat42;
|
|
TPNGButton *m_btnBeat43;
|
|
TPNGButton *m_btnBeat86;
|
|
TPNGButton *m_btnSpeedUp;
|
|
TPNGButton *m_btnSpeedDown;
|
|
TPaintBox *m_panBrowse;
|
|
TPNGButton *m_btnBeatPreview0;
|
|
TPNGButton *m_btnBeatPreview1;
|
|
|
|
void __fastcall FormCreate(TObject *Sender);
|
|
void __fastcall BeatClick(TObject *Sender);
|
|
void __fastcall PointerPanPaint(TObject *Sender);
|
|
void __fastcall FormDestroy(TObject *Sender);
|
|
void __fastcall PointerPanMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift,
|
|
int X, int Y);
|
|
void __fastcall PointerPanMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift,
|
|
int X, int Y);
|
|
void __fastcall PointerPanMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
|
|
void __fastcall PointerPanMouseLeave(TObject *Sender);
|
|
void __fastcall SpeedMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
|
|
void __fastcall StepClick(TObject *Sender);
|
|
void __fastcall BrowsePaint(TObject *Sender);
|
|
void __fastcall BrowseMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
|
|
void __fastcall BrowseMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
|
|
void __fastcall BrowseMouseLeave(TObject *Sender);
|
|
void __fastcall FormActivate(TObject *Sender);
|
|
void __fastcall BtnBrowseMouseDown(TObject *Sender, TMouseButton Button,
|
|
TShiftState Shift, int X, int Y);
|
|
void __fastcall FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
|
|
void __fastcall BeatPreviewClick(TObject *Sender);
|
|
void __fastcall FormDeactivate(TObject *Sender);
|
|
void __fastcall FormKeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
|
|
|
|
private: // User declarations
|
|
TJPEGImage * m_pPicBack;
|
|
|
|
// int sFont7;
|
|
|
|
//关键值
|
|
int m_iTS_Bk,
|
|
m_nTempo_Bk,
|
|
m_idStyle_Bk;
|
|
|
|
//节拍相关
|
|
TPNGButton* m_lstBeat[4];
|
|
|
|
//速度相关
|
|
int m_nPointerAngle;
|
|
bool m_bDraging,
|
|
m_bHover;
|
|
Image *m_pGPImgPointerNormal,
|
|
*m_pGPImgPointerHover;
|
|
Region *m_pGPRgnClick,
|
|
*m_pGPRgnDrag;
|
|
HCURSOR m_hHand0,
|
|
m_hHand1;
|
|
|
|
//tap速度设置 //add by tj 2013/12/20
|
|
int m_nTapClicked;
|
|
Image *m_pGPImgTapNormal,
|
|
*m_pGPImgTapMove,
|
|
*m_pGPImgTapHover;
|
|
Region *m_pGPRgnTapClick;
|
|
TTimer *m_pTimerTapHint;
|
|
TSkinHintWindow * m_pTapWnd;
|
|
void __fastcall HintTimerTapProc(TObject* Sender);
|
|
|
|
//风格视听相关
|
|
// BYTE *m_pPlayData;
|
|
// int m_nPlayData;
|
|
TSTYLEINFO m_aPreStyleInfos[30];
|
|
// String m_aStyleNames[10];
|
|
int m_iOldSelected;
|
|
|
|
//风格浏览相关
|
|
int m_nStyleNum,
|
|
m_iFirstStyle,
|
|
m_iSelStyle,
|
|
m_iHintStyle,
|
|
m_iDirection,
|
|
m_nDiskWidth,
|
|
m_nDiskHeight,
|
|
m_nCoverWidth,
|
|
m_nCoverHeight,
|
|
m_nTileWidth,
|
|
m_xFirstPos,
|
|
m_xCoverPos;
|
|
PTBitmap * m_paImgStyles;
|
|
TBitmap * m_pImgSelStyle;
|
|
TPngImage * m_pImgCover;
|
|
|
|
TTimer *m_pTimerBrowse,
|
|
*m_pTimerHint;
|
|
bool m_bDiskOpening,
|
|
m_bSelectMoving;
|
|
TSkinHintWindow * m_pStyleInfoWnd;
|
|
|
|
bool m_bCanStep;
|
|
|
|
void MovePointer( int deltaX, int deltaY );
|
|
void PlayMidiStyle();
|
|
|
|
void __fastcall BrowseTimerProc(TObject* Sender);
|
|
void __fastcall HintTimerProc(TObject* Sender);
|
|
|
|
MESSAGE void __fastcall UMSetFontPosition(TMessage &msg);
|
|
MESSAGE void __fastcall UMHidePopControl(TMessage &msg);
|
|
|
|
BEGIN_MESSAGE_MAP
|
|
MESSAGE_HANDLER(UM_SETFONTPOSITION, TMessage, UMSetFontPosition)
|
|
MESSAGE_HANDLER(UM_HIDEPOPCONTROL, TMessage, UMHidePopControl)
|
|
END_MESSAGE_MAP(TForm)
|
|
|
|
public: // User declarations
|
|
__fastcall TSetupForm(TComponent* Owner);
|
|
__fastcall ~TSetupForm();
|
|
void CleanData();
|
|
bool IsModifySetInfo();
|
|
void SetDefaultStyle( int iTS=g_iMelodyTimeSignature );
|
|
};
|
|
//---------------------------------------------------------------------------
|
|
extern PACKAGE TSetupForm *SetupForm;
|
|
//---------------------------------------------------------------------------
|
|
#endif
|