📄 edit.c
字号:
#include "GeneralHeader.h"
/*
void SetEditValue (int curValue,int minVal,int maxVal){
edit.Value = curValue;
edit.MaxVal = maxVal;
edit.MinVal = minVal;
}
void ChangeEditValue (unsigned char dirChange){
switch (dirChange){
case PREV:
if (edit.Value > edit.MinVal)
edit.Value--;
else
edit.Value = edit.MaxVal;
break;
case NEXT:
if (edit.Value < edit.MaxVal)
edit.Value++;
else
edit.Value = edit.MinVal;
break;
}
}
*/
int DecEditValue (int maxVal,int minVal,int curValue){
int tempValue;
// tempValue = curValue;
if (curValue > minVal)
tempValue = curValue - 1;
else
tempValue = maxVal;
return tempValue;
}
int IncEditValue (int maxVal,int minVal,int curValue){
int tempValue;
// tempValue = curValue;
if (curValue < maxVal)
tempValue = curValue + 1;
else
tempValue = minVal;
return tempValue;
}
void EditStrOut (int strX, int strY, char * string, unsigned char iEditChar, unsigned char numSpacePixel){
char * ptrString;
unsigned char modeOut, iCurrentChar;
letterX = strX;
letterY = strY;
iCurrentChar = 0;
ptrString = string;
while ((*ptrString)!= '\0'){
letterX += numSpacePixel;
if (iEditChar == iCurrentChar){
DrawLine (letterX - 1,letterY - 1,letterX - 1,letterY + currentFont.Height - 1,TOTAL);
modeOut = INVERSE;
}
else {
DrawLine (letterX - 1,letterY - 1,letterX - 1,letterY + currentFont.Height - 1,CLEARED);
modeOut = TOTAL;
}
CharOut (modeOut,*ptrString);
letterX += currentFont.Width;
ptrString++;
iCurrentChar++;
}
}
unsigned char InputName (unsigned char * ptrString){
}
void SetEditChar (unsigned char tempEditChar){
unsigned char iStr,strOffset;
iStr = 0;
strOffset = 0;
for (iStr = 0 ; iStr < NUM_ELEM(inputMap) ; iStr++){
for (strOffset = 0 ; strOffset < NUM_ELEM(inputStr_0) - 1 ; strOffset++){
if (*(inputMap[iStr] + strOffset) == tempEditChar){
editScreen.iInputStr = iStr;
editScreen.inputStrOffset = strOffset;
}
}
}
}
void PrintInputNameScreen (){
unsigned char iStr;
int xTemp,yTemp;
/*
// 吓桌臆 岩形嗜 忍磐
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -