📄 cscriptmanager.cpp
字号:
cPoint listBarPoint={0,0,0,0};
char toolTipMsg[256]={0,};
char buff[256]={0,};
char funcName[256]={0,};
char IDName[256]={0,};
char staticText[256]={0,};
char imagePath[256]={0,};
RGBCOLOR color={0,0,0};
BOOL fMovable = TRUE;
BOOL fActive = TRUE;
BOOL fPush = FALSE;
cImage BasicImage;
cImage OverImage;
cImage ListOverImage;
cImage PressImage ;
cImage ToolTipImage ;
cImage TopImage ;
cImage MiddleImage ;
cImage DownImage ;
cImage HeadImage ;
cImage BodyImage ;
cImage ListBarImage ;
cImage FocusImage ;
cImage SelectedImage;
cImage AniSpriteImage ;
cImage GuagePieceImage ;
cImage CheckImage ;
cImage CheckBoxImage ;
cImage selectedBGImage ;
cImage dragoverBGImage ;
cImage guageEffectPieceImage ;
cImage BalloonImage[10];
FLOAT BalloonBorder = 8;
BOOL bChecked = FALSE;
WORD HeadHei = 0;
WORD BodyHei = 0;
int nLeftMargin = 0;
int nTopMargin = 0;
WORD EditBoxSize = 0;
WORD EditBoxEableTypingSize = 0;
BOOL fSecret = FALSE;
RGBCOLOR activeTextColor={0,0,0};
RGBCOLOR nonactiveTextColor={0,0,0};
RGBCOLOR fgColor={0,0,0};
RGBCOLOR comboTextColor={0,0,0};
char szBtnText[256]={0,};
RGBCOLOR btnTextBasicCol={0,0,0};
RGBCOLOR btnTextOverCol={0,0,0};
RGBCOLOR btnTextPressCol={0,0,0};
BYTE alphaDepth = 255;
cCoord coord;
RECT captionRect={0,0,0,0};
RECT textRect={0,0,0,0};
RECT imgSrcRect={0,0,0,0};
BYTE cols=0;
BYTE rows=0;
BYTE tabNum=0;
BYTE middleNum=0;
WORD topHei = 0;
WORD middleHei = 0;
WORD downHei = 0;
LONG minValue = 0;
LONG maxValue = 100;
LONG spinUnit = 10;
BOOL lineUpward = TRUE;
int interval = 0;
WORD maxLine = 0;
LONG listMaxHeight = 15;
BYTE minMiddleNum=0;
BYTE maxMiddleNum=0;
WORD gridBorderX = 0;
WORD gridBorderY = 0;
cPoint gridPos ={0,0,0,0};
cCoord validXY={0,0};
BOOL vertical = FALSE;
BOOL fSpriteloop = TRUE;
WORD travelingType = 0;
float guageMinVal=0;
float guageMaxVal=0;
float guageCurVal=0;
cCoord guagePos = {0,0};
WORD selectComboIdx = 0;
BOOL bAutoClose = FALSE;
cCoord textXY = {5,6};
WORD fontIdx = 0;
BOOL bReadOnly = FALSE;
LONG limitLineNum = 20;
int soundIdx = -1;
WORD wOption = 0;
//KES 030916
int nLimitBytes = 256;
int nTextAlign = TXT_LEFT | TXT_TOP;
BYTE btnTextAniX = 1;
BYTE btnTextAniY = 1;
BOOL bAutoScroll = TRUE;
BOOL bPassive = FALSE;
//
cImageScale scale={1,1};
cImageScale ListScale={1,1};
float guageWidth = 0.f;
float guagePieceWidth = 0.f;
float guageEffectPieceWidth = 0.f;
float guagePieceHeightScaleY = 1.f;
float guageEffectPieceHeightScaleY = 1.f;
DWORD guageEstTime = 0;
LONG shadowTextX=0;
LONG shadowTextY=0;
RGBCOLOR dwShadowColor={10,10,10};
BOOL bShadow = FALSE;
while(1)
{
fp->GetString(buff);
if(buff[0] == '}'|| fp->IsEOF())
break;
if(buff[0] == '{')
continue;
if(buff[0] == '$')
{
GetCtrlInfo(wnd, buff, fp);
continue;
}
if(buff[0] == '@')
{
fp->GetLineX(buff, 256);
continue;
}
CMD_ST(buff)
CMD_CS("#POINT")
point.x = fp->GetDword();
point.y = fp->GetDword();
point.w = fp->GetDword();
point.h = fp->GetDword();
wnd->cWindow::SetAbsXY(point.x, point.y);
wnd->cWindow::SetRelXY(point.x, point.y);
CMD_CS("#FUNC")
fp->GetString(funcName);
CMD_CS("#ID")
fp->GetString(IDName);
CMD_CS("#FONTIDX")
fontIdx = fp->GetWord();
CMD_CS("#AUTOCLOSE")
bAutoClose = fp->GetBool();
CMD_CS("#TOOLTIPIMAGE")
GetImage(fp, &ToolTipImage);
CMD_CS("#TOOLTIPMSG")
strcpy( toolTipMsg, GetMsg(fp->GetInt()));
CMD_CS("#TOOLTIPCOL")
color.r = fp->GetByte();
color.g = fp->GetByte();
color.b = fp->GetByte();
CMD_CS("#TEXTXY")
textXY.x = fp->GetDword();
textXY.y = fp->GetDword();
CMD_CS("#MOVEABLE")
fMovable = fp->GetBool();
CMD_CS("#ACTIVE")
fActive = fp->GetBool();
CMD_CS("#BASICIMAGE")
GetImage(fp, &BasicImage);
CMD_CS("#OVERIMAGE")
GetImage(fp, &OverImage);
CMD_CS("#LISTOVERIMAGE")
GetImage(fp, &ListOverImage);
CMD_CS("#SELECTIMAGE")
GetImage(fp, &SelectedImage);
CMD_CS("#PRESSIMAGE")
GetImage(fp, &PressImage);
CMD_CS("#FOCUSIMAGE")
GetImage(fp, &FocusImage);
CMD_CS("#BTNTEXT")
strcpy( szBtnText, GetMsg(fp->GetInt()) );
btnTextBasicCol.r = fp->GetByte();
btnTextBasicCol.g = fp->GetByte();
btnTextBasicCol.b = fp->GetByte();
btnTextOverCol.r = fp->GetByte();
btnTextOverCol.g = fp->GetByte();
btnTextOverCol.b = fp->GetByte();
btnTextPressCol.r = fp->GetByte();
btnTextPressCol.g = fp->GetByte();
btnTextPressCol.b = fp->GetByte();
CMD_CS("#BTNTEXTANI")
btnTextAniX = fp->GetByte();
btnTextAniY = fp->GetByte();
CMD_CS("#IMAGESRCRECT")
imgSrcRect.left = fp->GetLong();
imgSrcRect.top = fp->GetLong();
imgSrcRect.right = fp->GetLong();
imgSrcRect.bottom = fp->GetLong();
CMD_CS("#ALPHA")
alphaDepth = fp->GetByte();
CMD_CS("#EDITSIZE");
EditBoxSize = fp->GetWord();
EditBoxEableTypingSize = fp->GetWord();
CMD_CS("#SPINSIZE");
EditBoxSize = fp->GetWord();
EditBoxEableTypingSize = fp->GetWord();
CMD_CS("#SECRET")
fSecret = fp->GetBool();
CMD_CS("#TEXTCOLOR")
activeTextColor.r = fp->GetByte();
activeTextColor.g = fp->GetByte();
activeTextColor.b = fp->GetByte();
nonactiveTextColor.r = fp->GetByte();
nonactiveTextColor.g = fp->GetByte();
nonactiveTextColor.b = fp->GetByte();
CMD_CS("#COORD")
coord.x = fp->GetDword();
coord.y = fp->GetDword();
CMD_CS("#FGCOLOR")
fgColor.r = fp->GetByte();
fgColor.g = fp->GetByte();
fgColor.b = fp->GetByte();
CMD_CS("#TEXT")
int msg_idx = fp->GetInt();
strcpy( staticText, GetMsg(msg_idx) );
CMD_CS("#SHADOW")
bShadow = fp->GetBool();
CMD_CS("#SHADOWCOLOR")
dwShadowColor.r = fp->GetByte();
dwShadowColor.g = fp->GetByte();
dwShadowColor.b = fp->GetByte();
CMD_CS("#SHADOWTEXTXY")
shadowTextX = fp->GetLong();
shadowTextY = fp->GetLong();
CMD_CS("#MESSAGE")
int msg_idx = fp->GetInt();
strcpy( staticText, GetMsg(msg_idx) );
fgColor.r = fp->GetByte();
fgColor.g = fp->GetByte();
fgColor.b = fp->GetByte();
CMD_CS("#TEXTRECT")
textRect.left = fp->GetLong();
textRect.top = fp->GetLong();
textRect.right = fp->GetLong();
textRect.bottom = fp->GetLong();
CMD_CS("#PUSHUP")
fPush = fp->GetBool();
CMD_CS("#VALIDXY")
validXY.x = fp->GetDword();
validXY.y = fp->GetDword();
CMD_CS("#CAPTIONRECT")
captionRect.left = fp->GetLong();
captionRect.top = fp->GetLong();
captionRect.right = fp->GetLong();
captionRect.bottom = fp->GetLong();
CMD_CS("#ICONCELLNUM")
cIconDialog * win = (cIconDialog *)wnd;
win->SetCellNum(fp->GetByte());
CMD_CS("#ICONCELL")
RECT iconCellRect={0,0,0,0};
iconCellRect.left = fp->GetLong();
iconCellRect.top = fp->GetLong();
iconCellRect.right = fp->GetLong();
iconCellRect.bottom = fp->GetLong();
cIconDialog * win = (cIconDialog *)wnd;
win->AddIconCell(&iconCellRect);
CMD_CS("#SELECTOPTION")
wOption = fp->GetWord();
CMD_CS("#CELLRECT")
RECT CellRect={0,0,0,0};
CellRect.left = fp->GetLong();
CellRect.top = fp->GetLong();
CellRect.right = fp->GetLong();
CellRect.bottom = fp->GetLong();
cIconGridDialog * win = (cIconGridDialog *)wnd;
win->SetCellRect(&CellRect);
CMD_CS("#LIMITLINENUM")
limitLineNum = fp->GetLong();
//KES 030916
CMD_CS("#LIMITBYTES")
nLimitBytes = fp->GetInt();
CMD_CS("#TEXTALIGN")
nTextAlign = fp->GetInt();
if( nTextAlign == 0 ) nTextAlign = TXT_LEFT;
else if( nTextAlign == 1 ) nTextAlign = TXT_RIGHT;
else if( nTextAlign == 2 ) nTextAlign = TXT_CENTER;
CMD_CS("#AUTOSCROLL")
bAutoScroll = fp->GetByte();
CMD_CS("#PASSIVE")
bPassive = fp->GetByte();
//
CMD_CS("#TABNUM")
cTabDialog * win = (cTabDialog *)wnd;
tabNum = fp->GetByte();
win->InitTab(tabNum);
CMD_CS("#ICONCELLBGIMAGE")
GetImage(fp, &selectedBGImage);
CMD_CS("#DRAGOVERBGIMAGE")
GetImage(fp, &dragoverBGImage);
CMD_CS("#COLS")
cols = fp->GetByte();
CMD_CS("#ROWS")
rows = fp->GetByte();
CMD_CS("#MIDDLENUM")
middleNum = fp->GetByte();
CMD_CS("#TOPIMAGE")
GetImage(fp, &TopImage);
topHei = fp->GetWord();
CMD_CS("#TOPHEIGHT")
topHei = fp->GetWord();
CMD_CS("#DOWNHEIGHT")
downHei = fp->GetWord();
CMD_CS("#MIDDELIMAGE") // 捞芭 枚磊 官层具 登堪 ^^;;
GetImage(fp, &MiddleImage);
middleHei = fp->GetWord();
CMD_CS("#MIDDLEHEIGHT")
middleHei = fp->GetWord();
CMD_CS("#DOWNIMAGE")
GetImage(fp, &DownImage);
downHei = fp->GetWord();
CMD_CS("#COMBOTEXTCOLOR")
comboTextColor.r = fp->GetByte();
comboTextColor.g = fp->GetByte();
comboTextColor.b = fp->GetByte();
CMD_CS("#SELECTCOMBOINDEX")
selectComboIdx = fp->GetWord();
CMD_CS("#READONLY")
bReadOnly = fp->GetBool();
CMD_CS("#ADDSTRING")
int msg_idx = fp->GetInt();
char msg2[255]={0,};
strcpy( msg2, GetMsg(msg_idx) );
RGBCOLOR comboListColor={0,0,0};
comboListColor.r = fp->GetByte();
comboListColor.g = fp->GetByte();
comboListColor.b = fp->GetByte();
switch(wnd->GetType())
{
case WT_LIST:
{
cList * win = (cList *)wnd;
ITEM* pItem = new ITEM;
strcpy(pItem->string, msg2);
pItem->rgb = RGB_HALF(comboListColor.r, comboListColor.g, comboListColor.b);
win->AddItem(pItem);
}
break;
case WT_LISTDIALOG:
{
cListDialog * win = (cListDialog *)wnd;
win->AddItem(msg2, RGB_HALF(comboListColor.r, comboListColor.g, comboListColor.b));
}
break;
case WT_COMBOBOX:
{
cComboBox * win = (cComboBox *)wnd;
ITEM* pItem = new ITEM;
strcpy(pItem->string, msg2);
pItem->rgb = RGB_HALF(comboListColor.r, comboListColor.g, comboListColor.b);
win->AddItem(pItem);
}
break;
}
CMD_CS("#INITCOMBOLIST")
cComboBox * win = (cComboBox *)wnd;
WORD listWidth = fp->GetWord();
win->SetMaxLine(fp->GetWord());
GetImage(fp, &TopImage);
topHei = fp->GetWord();
GetImage(fp, &MiddleImage);
middleHei = fp->GetWord();
GetImage(fp, &DownImage);
downHei = fp->GetWord();
GetImage(fp, &ListOverImage);
win->InitComboList(listWidth, &TopImage, topHei, &MiddleImage, middleHei, &DownImage, downHei, &ListOverImage);
// LISTCTRL俊辑 荤侩窍绰 加己
CMD_CS("#CREATE")
cListCtrl * win = (cListCtrl *)wnd;
win->Create(fp->GetInt());
CMD_CS("#HEADIMAGE")
GetImage(fp, &HeadImage);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -