📄 cscriptmanager.cpp
字号:
CMD_CS("#BODYIMAGE")
GetImage(fp, &BodyImage);
CMD_CS("#HEADHEIGHT")
HeadHei = fp->GetWord();
CMD_CS("#BODYHEIGHT")
BodyHei = fp->GetWord();
CMD_CS("#INSERTCOLUMN")
cListCtrl * win = (cListCtrl *)wnd;
int col_idx = fp->GetInt();
int msg_idx = fp->GetInt();
char msg2[255]={0,};
strcpy( msg2, GetMsg(msg_idx) );
int colSize = fp->GetInt();
win->InsertColoumn(col_idx, msg2, colSize);
CMD_CS("#SETITEMTEXT")
cListCtrl * win = (cListCtrl *)wnd;
int col_idx = fp->GetInt();
int row_idx = fp->GetInt();
int msg_idx = fp->GetInt();
char msg2[255]={0,};
strcpy( msg2, GetMsg(msg_idx) );
win->SetItemText(col_idx, row_idx, msg2);
CMD_CS("#SPINMINMAX")
minValue = fp->GetLong();
maxValue = fp->GetLong();
CMD_CS("#SPINUNIT")
spinUnit = fp->GetLong();
CMD_CS("#LINEUPWARD")
lineUpward = fp->GetBool();
CMD_CS("#LISTBARINTERVAL")
interval = fp->GetInt();
CMD_CS("#LISTBARPOINT")
listBarPoint.x = fp->GetDword();
listBarPoint.y = fp->GetDword();
listBarPoint.w = fp->GetDword();
listBarPoint.h = fp->GetDword();
CMD_CS("#LISTBARIMAGE")
GetImage(fp, &ListBarImage);
//listBarPoint = fp->
CMD_CS("#LISTMAXLINE")
maxLine = fp->GetWord();
CMD_CS("#LINEHEIGHT")
listMaxHeight = fp->GetLong();
CMD_CS("#BTNCLICKSOUND")
soundIdx = fp->GetInt();
CMD_CS("#MINMAXMIDDLENUM")
minMiddleNum = fp->GetByte();
maxMiddleNum = fp->GetByte();
CMD_CS("#INITGRID")
gridPos.x = fp->GetDword();
gridPos.y = fp->GetDword();
gridPos.w = fp->GetDword();
gridPos.h = fp->GetDword();
gridBorderX = fp->GetWord();
gridBorderY = fp->GetWord();
CMD_CS("#INITGUAGEBAR")
cGuageBar * win = (cGuageBar *)wnd;
interval = fp->GetLong();
vertical = fp->GetBool();
win->InitGuageBar(interval, vertical);
CMD_CS("#MAXSPRITE")
cAni * win = (cAni *)wnd;
win->SetMaxSprite(fp->GetWord());
CMD_CS("#SPRITELOOP")
fSpriteloop = fp->GetBool();
CMD_CS("#TRAVELINGTYPE")
travelingType = fp->GetWord();
CMD_CS("#ADDSPRITE")
cAni * win = (cAni *)wnd;
GetImage(fp, &AniSpriteImage);
WORD delayTime = fp->GetWord();
win->AddSprite(&AniSpriteImage, delayTime);
CMD_CS("#GUAGEPIECEIMAGE")
// cGuage * win = (cGuage *)wnd;
GetImage(fp, &GuagePieceImage);
// win->SetPieceImage(&GuagePieceImage);
CMD_CS("#GUAGEMINVALUE")
guageMinVal = fp->GetFloat();
CMD_CS("#GUAGEMAXVALUE")
guageMaxVal = fp->GetFloat();
CMD_CS("#GUAGECURVALUE")
guageCurVal = fp->GetFloat();
CMD_CS("#GUAGENEVALUE")
guageCurVal = fp->GetFloat();
guageEstTime = fp->GetDword();
CMD_CS("#GUAGEPOS")
guagePos.x = fp->GetLong();
guagePos.y = fp->GetLong();
CMD_CS("#CHECKBOXIMAGE")
GetImage(fp, &CheckBoxImage);
CMD_CS("#CHECKIMAGE")
GetImage(fp, &CheckImage);
CMD_CS("#SETCHECK")
bChecked = fp->GetBool();
CMD_CS("#SCALE")
scale.x = fp->GetFloat();
scale.y = fp->GetFloat();
CMD_CS("#LISTSCALE")
ListScale.x = fp->GetFloat();
ListScale.y = fp->GetFloat();
CMD_CS("#GUAGEWIDTH")
guageWidth = fp->GetFloat();
CMD_CS("#GUAGEPIECEWIDTH")
guagePieceWidth = fp->GetFloat();
CMD_CS("#GUAGEEFFECTPIECEIMAGE")
GetImage(fp, &guageEffectPieceImage);
CMD_CS("#GUAGEEFFECTPIECEWIDTH")
guageEffectPieceWidth = fp->GetFloat();
CMD_CS("#GUAGEPIECEHEIGHTSCALE")
guagePieceHeightScaleY = fp->GetFloat();
CMD_CS("#GUAGEEFFECTPIECEHEIGHTSCALE")
guageEffectPieceHeightScaleY = fp->GetFloat();
CMD_CS("#BALLOONIMAGETOP")
GetImage(fp, &BalloonImage[0]);
GetImage(fp, &BalloonImage[1]);
GetImage(fp, &BalloonImage[2]);
CMD_CS("#BALLOONIMAGEMIDDLE")
GetImage(fp, &BalloonImage[3]);
GetImage(fp, &BalloonImage[4]);
GetImage(fp, &BalloonImage[5]);
CMD_CS("#BALLOONIMAGEBOTTOM")
GetImage(fp, &BalloonImage[6]);
GetImage(fp, &BalloonImage[7]);
GetImage(fp, &BalloonImage[8]);
CMD_CS("#BALLOONIMAGETAIL")
GetImage(fp, &BalloonImage[9]);
CMD_CS("#BALLOONIMAGEBORDER")
BalloonBorder = fp->GetFloat();
CMD_EN
}
// 葛电 扩档快俊 殿废
wnd->SetAutoClose(bAutoClose);
wnd->SetFontIdx(fontIdx);
wnd->SetImageSrcRect(&imgSrcRect);
wnd->SetScale(&scale);
wnd->OnCreate(fActive);
SWINDOWTYPE(wnd->GetType())
/*CASE(WT_DIVIDEBOX)
cDivideBox * win = (cDivideBox *)wnd;
*/
CASE(WT_GUAGE)
cGuage * win = (cGuage *)wnd;
win->Init(point.x, point.y, point.w, point.h, &BasicImage, IDSEARCH(IDName));
win->InitGuage(guagePos.x,guagePos.y);
win->SetMinValue(guageMinVal);
win->SetMaxValue(guageMaxVal);
win->SetCurValue(guageCurVal);
win->SetPieceImage(&GuagePieceImage);
BREAK
CASE(WT_GUAGEN)
cGuagen * win = (cGuagen *)wnd;
win->Init(point.x, point.y, point.w, point.h, &BasicImage, IDSEARCH(IDName));
win->SetGuageImagePos(guagePos.x,guagePos.y);
win->SetValue(guageCurVal);
win->SetPieceImage(&GuagePieceImage);
win->SetGuageWidth(guageWidth);
win->SetGuagePieceWidth(guagePieceWidth);
BREAK
CASE(WT_GUAGENE)
CObjectGuagen * win = (CObjectGuagen *)wnd;
win->Init(point.x, point.y, point.w, point.h, &BasicImage, IDSEARCH(IDName));
win->SetGuageImagePos(guagePos.x,guagePos.y);
win->SetValue(guageCurVal, guageEstTime);
win->SetPieceImage(&GuagePieceImage);
win->SetGuageWidth(guageWidth);
win->SetGuagePieceWidth(guagePieceWidth);
win->SetGuagePieceHeightScale(guagePieceHeightScaleY);
win->SetGuageEffectPieceWidth(guageEffectPieceWidth);
win->SetEffectPieceImage(&guageEffectPieceImage);
win->SetGuageEffectPieceHeightScale(guageEffectPieceHeightScaleY);
BREAK
CASE(WT_ANI)
cAni * win = (cAni *)wnd;
win->Init(point.x, point.y, point.w, point.h, &BasicImage, IDSEARCH(IDName));
win->SetValidXY(validXY.x,validXY.y);
win->SetLoop(fSpriteloop);
win->SetTravelingType(travelingType);
win->SetAlpha(alphaDepth);
BREAK
CASE(WT_SPIN)
cSpin * win = (cSpin *)wnd;
if(FUNCSEARCH(funcName) == -1)
win->Init(point.x, point.y, point.w, point.h, &BasicImage, NULL, IDSEARCH(IDName));
else
win->Init(point.x, point.y, point.w, point.h, &BasicImage, g_mt_func[FUNCSEARCH(funcName)]._func, IDSEARCH(IDName));
win->SetValidXY(validXY.x,validXY.y);
win->InitSpin(EditBoxSize, EditBoxEableTypingSize);
win->SetActiveTextColor(RGB_HALF(activeTextColor.r,activeTextColor.g,activeTextColor.b));
win->SetNonactiveTextColor(RGB_HALF(nonactiveTextColor.r,nonactiveTextColor.g,nonactiveTextColor.b));
win->SetMinMax(minValue, maxValue);
win->SetUnit(spinUnit);
win->SetAlpha(alphaDepth);
BREAK
CASE(WT_STATIC)
cStatic * win = (cStatic *)wnd;
win->Init(point.x, point.y, point.w, point.h, &BasicImage, IDSEARCH(IDName));
win->SetValidXY(validXY.x,validXY.y);
win->SetTextXY(textXY.x, textXY.y);
win->SetStaticText(staticText);
win->SetAlign( nTextAlign );
win->SetFGColor(RGB_HALF(fgColor.r, fgColor.g, fgColor.b));
win->SetShadowTextXY(shadowTextX, shadowTextY);
win->SetShadowColor(RGB_HALF(dwShadowColor.r, dwShadowColor.g, dwShadowColor.b));
win->SetShadow(bShadow);
BREAK
CASE(WT_PUSHUPBUTTON)
cPushupButton * win = (cPushupButton *)wnd;
win->SetValidXY(validXY.x,validXY.y);
if(FUNCSEARCH(funcName) == -1)
win->Init(point.x, point.y, point.w, point.h, &BasicImage, &OverImage, &PressImage, NULL, IDSEARCH(IDName));
else
win->Init(point.x, point.y, point.w, point.h, &BasicImage, &OverImage, &PressImage, g_mt_func[FUNCSEARCH(funcName)]._func, IDSEARCH(IDName));
win->SetToolTip(toolTipMsg, RGBA_MAKE(color.r,color.g,color.b, 255), &ToolTipImage);
win->SetPush(fPush);
win->SetText(szBtnText, RGB_HALF(btnTextBasicCol.r,btnTextBasicCol.g,btnTextBasicCol.b), RGB_HALF(btnTextOverCol.r,btnTextOverCol.g,btnTextOverCol.b), RGB_HALF(btnTextPressCol.r,btnTextPressCol.g,btnTextPressCol.b));
win->SetTextXY(textXY.x,textXY.y);
win->SetAlpha(alphaDepth);
win->SetTextAni(btnTextAniX, btnTextAniY );
win->SetAlign( nTextAlign );
win->SetShadowTextXY(shadowTextX, shadowTextY);
win->SetShadowColor(RGB_HALF(dwShadowColor.r, dwShadowColor.g, dwShadowColor.b));
win->SetShadow(bShadow);
win->SetPassive(bPassive);
BREAK
CASE(WT_COMBOBOX)
cComboBox * win = (cComboBox *)wnd;
win->SetValidXY(validXY.x,validXY.y);
win->Init(point.x, point.y, point.w, point.h, &BasicImage, NULL, IDSEARCH(IDName));
win->SetComboTextColor(RGB_HALF(comboTextColor.r, comboTextColor.g, comboTextColor.b));
win->SetAlpha(alphaDepth);
win->SelectComboText(selectComboIdx);
win->SetOverImageScale(ListScale.x, ListScale.y); // over image 眠啊
if(-1 != FUNCSEARCH(funcName))
win->SetcbFunc(g_mt_func[FUNCSEARCH(funcName)]._func);
//win->Init()
BREAK
CASE(WT_COMBOBOXEX)
cComboBoxEx * win = (cComboBoxEx *)wnd;
win->SetValidXY(validXY.x,validXY.y);
win->Init(point.x, point.y, point.w, point.h, &BasicImage, NULL, IDSEARCH(IDName));
win->SetComboTextColor(RGB_HALF(comboTextColor.r, comboTextColor.g, comboTextColor.b));
win->SetAlpha(alphaDepth);
win->SelectComboText(selectComboIdx);
win->SetOverImageScale(ListScale.x, ListScale.y); // over image 眠啊
if(-1 != FUNCSEARCH(funcName))
win->SetcbFunc(g_mt_func[FUNCSEARCH(funcName)]._func);
//win->Init()
BREAK
CASE(WT_BUTTON)
cButton * win = (cButton *)wnd;
//btn->Init(point.x, point.y, point.w, point.h, pBtnImageBasic, pBtnImageOver, pBtnImagePress, mt_func[MT_FUNCSEARCH(funcName)], MT_IDSEARCH(IDName));
if(FUNCSEARCH(funcName) == -1)
win->Init(point.x, point.y, point.w, point.h, &BasicImage, &OverImage, &PressImage, NULL, IDSEARCH(IDName));
else
win->Init(point.x, point.y, point.w, point.h, &BasicImage, &OverImage, &PressImage, g_mt_func[FUNCSEARCH(funcName)]._func, IDSEARCH(IDName));
win->SetToolTip(toolTipMsg, RGBA_MAKE(color.r,color.g,color.b, 255), &ToolTipImage);
if(*szBtnText != 0)
win->SetText(szBtnText, RGB_HALF(btnTextBasicCol.r,btnTextBasicCol.g,btnTextBasicCol.b), RGB_HALF(btnTextOverCol.r,btnTextOverCol.g,btnTextOverCol.b), RGB_HALF(btnTextPressCol.r,btnTextPressCol.g,btnTextPressCol.b));
win->SetTextXY(textXY.x,textXY.y);
win->SetAlpha(alphaDepth);
win->SetTextAni(btnTextAniX, btnTextAniY );
win->SetAlign( nTextAlign );
win->SetShadowTextXY(shadowTextX, shadowTextY);
win->SetShadowColor(RGB_HALF(dwShadowColor.r, dwShadowColor.g, dwShadowColor.b));
win->SetShadow(bShadow);
if( soundIdx != -1 )
win->SetClickSound( soundIdx );
BREAK
CASE(WT_CHECKBOX)
cCheckBox * win = (cCheckBox *)wnd;
if(FUNCSEARCH(funcName) == -1)
win->Init(point.x, point.y, point.w, point.h, &BasicImage, &CheckBoxImage, &CheckImage, NULL, IDSEARCH(IDName));
else
win->Init(point.x, point.y, point.w, point.h, &BasicImage, &CheckBoxImage, &CheckImage, g_mt_func[FUNCSEARCH(funcName)]._func, IDSEARCH(IDName));
win->SetChecked(bChecked);
win->SetCheckBoxMsg(staticText, RGB_HALF(fgColor.r,fgColor.g,fgColor.b));
BREAK
CASE(WT_EDITBOX)
cEditBox * win = (cEditBox *)wnd;
//editBox->Init(point.x, point.y, point.w, point.h, &BasicImage, MT_IDSEARCH(IDName));
win->Init(point.x, point.y, point.w, point.h, &BasicImage, &FocusImage, IDSEARCH(IDName));
win->InitEditbox(EditBoxSize, EditBoxEableTypingSize);
win->SetAlign( nTextAlign );
win->SetToolTip(toolTipMsg, RGBA_MAKE(color.r,color.g,color.b, 255), &ToolTipImage);
if(-1 != FUNCSEARCH(funcName))
win->SetcbFunc(g_mt_func[FUNCSEARCH(funcName)]._func);
//win->SetcbFunc(mt_func[FUNCSEARCH(funcName)]);
win->SetSecret(fSecret);
win->SetActiveTextColor(RGB_HALF(activeTextColor.r,activeTextColor.g,activeTextColor.b));
win->SetNonactiveTextColor(RGB_HALF(nonactiveTextColor.r,nonactiveTextColor.g,nonactiveTextColor.b));
win->SetAlpha(alphaDepth);
win->SetReadOnly(bReadOnly);
BREAK
CASE(WT_GUAGEBAR)
cGuageBar * win = (cGuageBar *)wnd;
win->SetValidXY(validXY.x,validXY.y);
win->Init(point.x, point.y, point.w, point.h, &BasicImage, IDSEARCH(IDName));
win->InitValue(guageMinVal, guageMaxVal, guageCurVal);
win->SetAlpha(alphaDepth);
//if(-1 != FUNCSEARCH(funcName))
// win->SetcbFunc(g_mt_func[FUNCSEARCH(funcName)]._func);
BREAK
CASE(WT_TEXTAREA)
cTextArea * win = (cTextArea *)wnd;
win->SetValidXY(validXY.x,validXY.y);
win->Init(point.x, point.y, point.w, point.h, &BasicImage, IDSEARCH(IDName));
win->InitTextArea(&textRect, nLimitBytes, &TopImage, topHei, &MiddleImage, middleHei, &DownImage, downHei );
win->SetLimitLine( limitLineNum ); //inittextarea焊促 酒贰俊 乐绢具茄促.
win->SetAlpha(alphaDepth);
win->SetReadOnly(bReadOnly);
win->SetMiddleScale( ListScale );
win->SetScriptText(staticText);
//if(-1 != FUNCSEARCH(funcName))
// win->SetcbFunc(g_mt_func[FUNCSEARCH(funcName)]._func);
BREAK
CASE(WT_LIST)
cList * win = (cList *)wnd;
win->SetValidXY(validXY.x,validXY.y);
win->Init(point.x, point.y, point.w, point.h, &TopImage, IDSEARCH(IDName));
win->InitList(maxLine, &textRect);
win->SetLineUpward(lineUpward);
win->SetListBarImage(&ListBarImage);
win->SetListBar(listBarPoint.x, listBarPoint.y, listBarPoint.w, listBarPoint.h, interval);
win->SetMaxLine(maxLine);
win->SetAlpha(alphaDepth);
//if(-1 != FUNCSEARCH(funcName))
// win->SetcbFunc(g_mt_func[FUNCSEARCH(funcName)]._func);
BREAK
CASE(WT_LISTCTRL)
cListCtrl * win = (cListCtrl *)wnd;
win->SetValidXY(validXY.x,validXY.y);
win->Init(point.x, point.y, point.w, point.h, &BasicImage, IDSEARCH(IDName));
win->InitListCtrl(cols, rows);
win->InitListCtrlImage(&HeadImage, HeadHei, &BodyImage, BodyHei, &ListOverImage );
win->SetOverImageScale(ListScale.x, ListScale.y); // over image 眠啊
win->SetAlpha(alphaDepth);
win->SetSelectOption( wOption );
BREAK
CASE(WT_LISTCTRLEX)
cListCtrlEx * win = (cListCtrlEx *)wnd;
win->SetValidXY(validXY.x,validXY.y);
win->Init(point.x, point.y, point.w, point.h, &BasicImage, IDSEARCH(IDName));
win->InitListCtrlEx( cols, middleNum, middleHei, nLeftMargin, nTopMargin );
win->InitListCtrlExImage( &HeadImage, &BodyImage, &DownImage, &SelectedImage, &ListOverImage );
win->SetAlpha(alphaDepth);
BREAK
CASE(WT_LISTDIALOG)
cListDialog * win = (cListDialog *)wnd;
win->SetValidXY(validXY.x,validXY.y);
win->SetMinMaxMiddleNum(minMiddleNum, maxMiddleNum);
win->Init(point.x, point.y, point.w, &TopImage, topHei, &MiddleImage, middleHei, &DownImage, downHei, &ListOverImage, middleNum, IDSEARCH(IDName));
win->SetLineHeight(listMaxHeight);
win->InitList(maxLine, &textRect);
win->SetMaxLine(maxLine);
win->SetOverImageScale(ListScale.x, ListScale.y); // over image 眠啊
//win->SetListBarImage(&ListBarImage);
//win->SetListBar(listBarPoint.x, listBarPoint.y, listBarPoint.w, listBarPoint.h, interval);
win->SetAlpha(alphaDepth);
win->SetAutoScroll( bAutoScroll );
if(-1 != FUNCSEARCH(funcName))
win->SetcbFunc(g_mt_func[FUNCSEARCH(funcName)]._func);
//dlg->Init(point.x, point.y, point.w, point.h, &BasicImage, MT_IDSEARCH(IDName));
//win->Init(point.x, point.y, point.w, point.h, &BasicImage, IDSEARCH(IDName));
//win->SetMovable(fMovable);
//win->SetCaptionRect(&captionRect);
BREAK
CASE(WT_CHARMAKEDIALOG)
cCharMakeDlg * win = (cCharMakeDlg *)wnd;
win->SetValidXY(validXY.x,validXY.y);
//dlg->Init(point.x, point.y, point.w, point.h, &BasicImage, MT_IDSEARCH(IDName));
win->Init(point.x, point.y, point.w, point.h, &BasicImage, IDSEARCH(IDName));
win->SetMovable(fMovable);
win->SetCaptionRect(&captionRect);
win->SetAlpha(alphaDepth);
if(-1 != FUNCSEARCH(funcName))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -