diff options
Diffstat (limited to 'externals/microprofile/microprofileui.h')
| -rw-r--r-- | externals/microprofile/microprofileui.h | 75 |
1 files changed, 37 insertions, 38 deletions
diff --git a/externals/microprofile/microprofileui.h b/externals/microprofile/microprofileui.h index 85fbf2cb9..1357a08fd 100644 --- a/externals/microprofile/microprofileui.h +++ b/externals/microprofile/microprofileui.h | |||
| @@ -213,8 +213,8 @@ struct MicroProfileCustom | |||
| 213 | 213 | ||
| 214 | struct SOptionDesc | 214 | struct SOptionDesc |
| 215 | { | 215 | { |
| 216 | SOptionDesc(){} | 216 | SOptionDesc()=default; |
| 217 | SOptionDesc(uint8_t nSubType, uint8_t nIndex, const char* fmt, ...):nSubType(nSubType), nIndex(nIndex) | 217 | SOptionDesc(uint8_t nSubType_, uint8_t nIndex_, const char* fmt, ...):nSubType(nSubType_), nIndex(nIndex_) |
| 218 | { | 218 | { |
| 219 | va_list args; | 219 | va_list args; |
| 220 | va_start (args, fmt); | 220 | va_start (args, fmt); |
| @@ -573,10 +573,10 @@ inline void MicroProfileToolTipMeta(MicroProfileStringArray* pToolTip) | |||
| 573 | } | 573 | } |
| 574 | else | 574 | else |
| 575 | { | 575 | { |
| 576 | for(int i = 0; i < MICROPROFILE_META_MAX; ++i) | 576 | for(int k = 0; k < MICROPROFILE_META_MAX; ++k) |
| 577 | { | 577 | { |
| 578 | nMetaSumInclusive[i] += nMetaSum[i]; | 578 | nMetaSumInclusive[k] += nMetaSum[k]; |
| 579 | nMetaSum[i] = 0; | 579 | nMetaSum[k] = 0; |
| 580 | } | 580 | } |
| 581 | } | 581 | } |
| 582 | break; | 582 | break; |
| @@ -708,10 +708,10 @@ inline void MicroProfileDrawFloatTooltip(uint32_t nX, uint32_t nY, uint32_t nTok | |||
| 708 | 708 | ||
| 709 | if(UI.nMouseLeftMod) | 709 | if(UI.nMouseLeftMod) |
| 710 | { | 710 | { |
| 711 | int nIndex = (g_MicroProfileUI.LockedToolTipFront + MICROPROFILE_TOOLTIP_MAX_LOCKED - 1) % MICROPROFILE_TOOLTIP_MAX_LOCKED; | 711 | int nToolTipIndex = (g_MicroProfileUI.LockedToolTipFront + MICROPROFILE_TOOLTIP_MAX_LOCKED - 1) % MICROPROFILE_TOOLTIP_MAX_LOCKED; |
| 712 | g_MicroProfileUI.nLockedToolTipColor[nIndex] = S.TimerInfo[nTimerId].nColor; | 712 | g_MicroProfileUI.nLockedToolTipColor[nToolTipIndex] = S.TimerInfo[nTimerId].nColor; |
| 713 | MicroProfileStringArrayCopy(&g_MicroProfileUI.LockedToolTips[nIndex], &ToolTip); | 713 | MicroProfileStringArrayCopy(&g_MicroProfileUI.LockedToolTips[nToolTipIndex], &ToolTip); |
| 714 | g_MicroProfileUI.LockedToolTipFront = nIndex; | 714 | g_MicroProfileUI.LockedToolTipFront = nToolTipIndex; |
| 715 | 715 | ||
| 716 | } | 716 | } |
| 717 | } | 717 | } |
| @@ -917,9 +917,8 @@ inline void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int | |||
| 917 | float fStart = floor(fMsBase*fRcpStep) * fStep; | 917 | float fStart = floor(fMsBase*fRcpStep) * fStep; |
| 918 | for(float f = fStart; f < fMsEnd; ) | 918 | for(float f = fStart; f < fMsEnd; ) |
| 919 | { | 919 | { |
| 920 | float fStart = f; | ||
| 921 | float fNext = f + fStep; | 920 | float fNext = f + fStep; |
| 922 | MicroProfileDrawBox(((fStart-fMsBase) * fMsToScreen), nBaseY, (fNext-fMsBase) * fMsToScreen+1, nBaseY + nHeight, UI.nOpacityBackground | g_nMicroProfileBackColors[nColorIndex++ & 1]); | 921 | MicroProfileDrawBox(((f-fMsBase) * fMsToScreen), nBaseY, (fNext-fMsBase) * fMsToScreen+1, nBaseY + nHeight, UI.nOpacityBackground | g_nMicroProfileBackColors[nColorIndex++ & 1]); |
| 923 | f = fNext; | 922 | f = fNext; |
| 924 | } | 923 | } |
| 925 | } | 924 | } |
| @@ -1116,9 +1115,9 @@ inline void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int | |||
| 1116 | 1115 | ||
| 1117 | nMaxStackDepth = MicroProfileMax(nMaxStackDepth, nStackPos); | 1116 | nMaxStackDepth = MicroProfileMax(nMaxStackDepth, nStackPos); |
| 1118 | float fMsStart = fToMs * MicroProfileLogTickDifference(nBaseTicks, nTickStart); | 1117 | float fMsStart = fToMs * MicroProfileLogTickDifference(nBaseTicks, nTickStart); |
| 1119 | float fMsEnd = fToMs * MicroProfileLogTickDifference(nBaseTicks, nTickEnd); | 1118 | float fMsEnd2 = fToMs * MicroProfileLogTickDifference(nBaseTicks, nTickEnd); |
| 1120 | float fXStart = fMsStart * fMsToScreen; | 1119 | float fXStart = fMsStart * fMsToScreen; |
| 1121 | float fXEnd = fMsEnd * fMsToScreen; | 1120 | float fXEnd = fMsEnd2 * fMsToScreen; |
| 1122 | float fYStart = (float)(nY + nStackPos * nYDelta); | 1121 | float fYStart = (float)(nY + nStackPos * nYDelta); |
| 1123 | float fYEnd = fYStart + (MICROPROFILE_DETAILED_BAR_HEIGHT); | 1122 | float fYEnd = fYStart + (MICROPROFILE_DETAILED_BAR_HEIGHT); |
| 1124 | float fXDist = MicroProfileMax(fXStart - fMouseX, fMouseX - fXEnd); | 1123 | float fXDist = MicroProfileMax(fXStart - fMouseX, fMouseX - fXEnd); |
| @@ -1269,22 +1268,22 @@ inline void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int | |||
| 1269 | if(UI.nRangeBegin != UI.nRangeEnd) | 1268 | if(UI.nRangeBegin != UI.nRangeEnd) |
| 1270 | { | 1269 | { |
| 1271 | float fMsStart = fToMsCpu * MicroProfileLogTickDifference(nBaseTicksCpu, UI.nRangeBegin); | 1270 | float fMsStart = fToMsCpu * MicroProfileLogTickDifference(nBaseTicksCpu, UI.nRangeBegin); |
| 1272 | float fMsEnd = fToMsCpu * MicroProfileLogTickDifference(nBaseTicksCpu, UI.nRangeEnd); | 1271 | float fMsEnd3 = fToMsCpu * MicroProfileLogTickDifference(nBaseTicksCpu, UI.nRangeEnd); |
| 1273 | float fXStart = fMsStart * fMsToScreen; | 1272 | float fXStart = fMsStart * fMsToScreen; |
| 1274 | float fXEnd = fMsEnd * fMsToScreen; | 1273 | float fXEnd = fMsEnd3 * fMsToScreen; |
| 1275 | MicroProfileDrawBox(fXStart, nBaseY, fXEnd, nHeight, MICROPROFILE_FRAME_COLOR_HIGHTLIGHT, MicroProfileBoxTypeFlat); | 1274 | MicroProfileDrawBox(fXStart, nBaseY, fXEnd, nHeight, MICROPROFILE_FRAME_COLOR_HIGHTLIGHT, MicroProfileBoxTypeFlat); |
| 1276 | MicroProfileDrawLineVertical(fXStart, nBaseY, nHeight, MICROPROFILE_FRAME_COLOR_HIGHTLIGHT | 0x44000000); | 1275 | MicroProfileDrawLineVertical(fXStart, nBaseY, nHeight, MICROPROFILE_FRAME_COLOR_HIGHTLIGHT | 0x44000000); |
| 1277 | MicroProfileDrawLineVertical(fXEnd, nBaseY, nHeight, MICROPROFILE_FRAME_COLOR_HIGHTLIGHT | 0x44000000); | 1276 | MicroProfileDrawLineVertical(fXEnd, nBaseY, nHeight, MICROPROFILE_FRAME_COLOR_HIGHTLIGHT | 0x44000000); |
| 1278 | 1277 | ||
| 1279 | fMsStart += fDetailedOffset; | 1278 | fMsStart += fDetailedOffset; |
| 1280 | fMsEnd += fDetailedOffset; | 1279 | fMsEnd3 += fDetailedOffset; |
| 1281 | char sBuffer[32]; | 1280 | char sBuffer[32]; |
| 1282 | uint32_t nLenStart = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsStart); | 1281 | uint32_t nLenStart = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsStart); |
| 1283 | float fStartTextWidth = (float)((1+MICROPROFILE_TEXT_WIDTH) * nLenStart); | 1282 | float fStartTextWidth = (float)((1+MICROPROFILE_TEXT_WIDTH) * nLenStart); |
| 1284 | float fStartTextX = fXStart - fStartTextWidth - 2; | 1283 | float fStartTextX = fXStart - fStartTextWidth - 2; |
| 1285 | MicroProfileDrawBox(fStartTextX, nBaseY, fStartTextX + fStartTextWidth + 2, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat); | 1284 | MicroProfileDrawBox(fStartTextX, nBaseY, fStartTextX + fStartTextWidth + 2, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat); |
| 1286 | MicroProfileDrawText(fStartTextX+1, nBaseY, UINT32_MAX, sBuffer, nLenStart); | 1285 | MicroProfileDrawText(fStartTextX+1, nBaseY, UINT32_MAX, sBuffer, nLenStart); |
| 1287 | uint32_t nLenEnd = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsEnd); | 1286 | uint32_t nLenEnd = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsEnd3); |
| 1288 | MicroProfileDrawBox(fXEnd+1, nBaseY, fXEnd+1+(1+MICROPROFILE_TEXT_WIDTH) * nLenEnd + 3, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat); | 1287 | MicroProfileDrawBox(fXEnd+1, nBaseY, fXEnd+1+(1+MICROPROFILE_TEXT_WIDTH) * nLenEnd + 3, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat); |
| 1289 | MicroProfileDrawText(fXEnd+2, nBaseY+1, UINT32_MAX, sBuffer, nLenEnd); | 1288 | MicroProfileDrawText(fXEnd+2, nBaseY+1, UINT32_MAX, sBuffer, nLenEnd); |
| 1290 | 1289 | ||
| @@ -1297,9 +1296,9 @@ inline void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int | |||
| 1297 | if(UI.nRangeBeginGpu != UI.nRangeEndGpu) | 1296 | if(UI.nRangeBeginGpu != UI.nRangeEndGpu) |
| 1298 | { | 1297 | { |
| 1299 | float fMsStart = fToMsGpu * MicroProfileLogTickDifference(nBaseTicksGpu, UI.nRangeBeginGpu); | 1298 | float fMsStart = fToMsGpu * MicroProfileLogTickDifference(nBaseTicksGpu, UI.nRangeBeginGpu); |
| 1300 | float fMsEnd = fToMsGpu * MicroProfileLogTickDifference(nBaseTicksGpu, UI.nRangeEndGpu); | 1299 | float fMsEnd4 = fToMsGpu * MicroProfileLogTickDifference(nBaseTicksGpu, UI.nRangeEndGpu); |
| 1301 | float fXStart = fMsStart * fMsToScreen; | 1300 | float fXStart = fMsStart * fMsToScreen; |
| 1302 | float fXEnd = fMsEnd * fMsToScreen; | 1301 | float fXEnd = fMsEnd4 * fMsToScreen; |
| 1303 | MicroProfileDrawBox(fXStart, nBaseY, fXEnd, nHeight, MICROPROFILE_FRAME_COLOR_HIGHTLIGHT_GPU, MicroProfileBoxTypeFlat); | 1302 | MicroProfileDrawBox(fXStart, nBaseY, fXEnd, nHeight, MICROPROFILE_FRAME_COLOR_HIGHTLIGHT_GPU, MicroProfileBoxTypeFlat); |
| 1304 | MicroProfileDrawLineVertical(fXStart, nBaseY, nHeight, MICROPROFILE_FRAME_COLOR_HIGHTLIGHT_GPU | 0x44000000); | 1303 | MicroProfileDrawLineVertical(fXStart, nBaseY, nHeight, MICROPROFILE_FRAME_COLOR_HIGHTLIGHT_GPU | 0x44000000); |
| 1305 | MicroProfileDrawLineVertical(fXEnd, nBaseY, nHeight, MICROPROFILE_FRAME_COLOR_HIGHTLIGHT_GPU | 0x44000000); | 1304 | MicroProfileDrawLineVertical(fXEnd, nBaseY, nHeight, MICROPROFILE_FRAME_COLOR_HIGHTLIGHT_GPU | 0x44000000); |
| @@ -1307,14 +1306,14 @@ inline void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int | |||
| 1307 | nBaseY += MICROPROFILE_TEXT_HEIGHT+1; | 1306 | nBaseY += MICROPROFILE_TEXT_HEIGHT+1; |
| 1308 | 1307 | ||
| 1309 | fMsStart += fDetailedOffset; | 1308 | fMsStart += fDetailedOffset; |
| 1310 | fMsEnd += fDetailedOffset; | 1309 | fMsEnd4 += fDetailedOffset; |
| 1311 | char sBuffer[32]; | 1310 | char sBuffer[32]; |
| 1312 | uint32_t nLenStart = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsStart); | 1311 | uint32_t nLenStart = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsStart); |
| 1313 | float fStartTextWidth = (float)((1+MICROPROFILE_TEXT_WIDTH) * nLenStart); | 1312 | float fStartTextWidth = (float)((1+MICROPROFILE_TEXT_WIDTH) * nLenStart); |
| 1314 | float fStartTextX = fXStart - fStartTextWidth - 2; | 1313 | float fStartTextX = fXStart - fStartTextWidth - 2; |
| 1315 | MicroProfileDrawBox(fStartTextX, nBaseY, fStartTextX + fStartTextWidth + 2, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat); | 1314 | MicroProfileDrawBox(fStartTextX, nBaseY, fStartTextX + fStartTextWidth + 2, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat); |
| 1316 | MicroProfileDrawText(fStartTextX+1, nBaseY, UINT32_MAX, sBuffer, nLenStart); | 1315 | MicroProfileDrawText(fStartTextX+1, nBaseY, UINT32_MAX, sBuffer, nLenStart); |
| 1317 | uint32_t nLenEnd = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsEnd); | 1316 | uint32_t nLenEnd = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsEnd4); |
| 1318 | MicroProfileDrawBox(fXEnd+1, nBaseY, fXEnd+1+(1+MICROPROFILE_TEXT_WIDTH) * nLenEnd + 3, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat); | 1317 | MicroProfileDrawBox(fXEnd+1, nBaseY, fXEnd+1+(1+MICROPROFILE_TEXT_WIDTH) * nLenEnd + 3, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat); |
| 1319 | MicroProfileDrawText(fXEnd+2, nBaseY+1, UINT32_MAX, sBuffer, nLenEnd); | 1318 | MicroProfileDrawText(fXEnd+2, nBaseY+1, UINT32_MAX, sBuffer, nLenEnd); |
| 1320 | } | 1319 | } |
| @@ -1716,8 +1715,8 @@ bool MicroProfileDrawGraph(uint32_t nScreenWidth, uint32_t nScreenHeight) | |||
| 1716 | uint32_t nTextCount = 0; | 1715 | uint32_t nTextCount = 0; |
| 1717 | uint32_t nGraphIndex = (S.nGraphPut + MICROPROFILE_GRAPH_HISTORY - int(MICROPROFILE_GRAPH_HISTORY*(1.f - fMouseXPrc))) % MICROPROFILE_GRAPH_HISTORY; | 1716 | uint32_t nGraphIndex = (S.nGraphPut + MICROPROFILE_GRAPH_HISTORY - int(MICROPROFILE_GRAPH_HISTORY*(1.f - fMouseXPrc))) % MICROPROFILE_GRAPH_HISTORY; |
| 1718 | 1717 | ||
| 1719 | uint32_t nX = UI.nMouseX; | 1718 | uint32_t nMouseX = UI.nMouseX; |
| 1720 | uint32_t nY = UI.nMouseY + 20; | 1719 | uint32_t nMouseY = UI.nMouseY + 20; |
| 1721 | 1720 | ||
| 1722 | for(uint32_t i = 0; i < MICROPROFILE_MAX_GRAPHS; ++i) | 1721 | for(uint32_t i = 0; i < MICROPROFILE_MAX_GRAPHS; ++i) |
| 1723 | { | 1722 | { |
| @@ -1736,7 +1735,7 @@ bool MicroProfileDrawGraph(uint32_t nScreenWidth, uint32_t nScreenHeight) | |||
| 1736 | } | 1735 | } |
| 1737 | if(nTextCount) | 1736 | if(nTextCount) |
| 1738 | { | 1737 | { |
| 1739 | MicroProfileDrawFloatWindow(nX, nY, Strings.ppStrings, Strings.nNumStrings, 0, pColors); | 1738 | MicroProfileDrawFloatWindow(nMouseX, nMouseY, Strings.ppStrings, Strings.nNumStrings, 0, pColors); |
| 1740 | } | 1739 | } |
| 1741 | 1740 | ||
| 1742 | if(UI.nMouseRight) | 1741 | if(UI.nMouseRight) |
| @@ -2321,8 +2320,8 @@ inline void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight) | |||
| 2321 | uint32_t nMenuX[MICROPROFILE_MENU_MAX] = {0}; | 2320 | uint32_t nMenuX[MICROPROFILE_MENU_MAX] = {0}; |
| 2322 | uint32_t nNumMenuItems = 0; | 2321 | uint32_t nNumMenuItems = 0; |
| 2323 | 2322 | ||
| 2324 | int nLen = snprintf(buffer, 127, "MicroProfile"); | 2323 | int nMPTextLen = snprintf(buffer, 127, "MicroProfile"); |
| 2325 | MicroProfileDrawText(nX, nY, UINT32_MAX, buffer, nLen); | 2324 | MicroProfileDrawText(nX, nY, UINT32_MAX, buffer, nMPTextLen); |
| 2326 | nX += (sizeof("MicroProfile")+2) * (MICROPROFILE_TEXT_WIDTH+1); | 2325 | nX += (sizeof("MicroProfile")+2) * (MICROPROFILE_TEXT_WIDTH+1); |
| 2327 | pMenuText[nNumMenuItems++] = "Mode"; | 2326 | pMenuText[nNumMenuItems++] = "Mode"; |
| 2328 | pMenuText[nNumMenuItems++] = "Groups"; | 2327 | pMenuText[nNumMenuItems++] = "Groups"; |
| @@ -2438,16 +2437,16 @@ inline void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight) | |||
| 2438 | int nNumLines = 0; | 2437 | int nNumLines = 0; |
| 2439 | bool bSelected = false; | 2438 | bool bSelected = false; |
| 2440 | const char* pString = CB(nNumLines, &bSelected); | 2439 | const char* pString = CB(nNumLines, &bSelected); |
| 2441 | uint32_t nWidth = 0, nHeight = 0; | 2440 | uint32_t nTextWidth = 0, nTextHeight = 0; |
| 2442 | while(pString) | 2441 | while(pString) |
| 2443 | { | 2442 | { |
| 2444 | nWidth = MicroProfileMax<int>(nWidth, (int)strlen(pString)); | 2443 | nTextWidth = MicroProfileMax<int>(nTextWidth, (int)strlen(pString)); |
| 2445 | nNumLines++; | 2444 | nNumLines++; |
| 2446 | pString = CB(nNumLines, &bSelected); | 2445 | pString = CB(nNumLines, &bSelected); |
| 2447 | } | 2446 | } |
| 2448 | nWidth = (2+nWidth) * (MICROPROFILE_TEXT_WIDTH+1); | 2447 | nTextWidth = (2+nTextWidth) * (MICROPROFILE_TEXT_WIDTH+1); |
| 2449 | nHeight = nNumLines * (MICROPROFILE_TEXT_HEIGHT+1); | 2448 | nTextHeight = nNumLines * (MICROPROFILE_TEXT_HEIGHT+1); |
| 2450 | if(UI.nMouseY <= nY + nHeight+0 && UI.nMouseY >= nY-0 && UI.nMouseX <= nX + nWidth + 0 && UI.nMouseX >= nX - 0) | 2449 | if(UI.nMouseY <= nY + nTextHeight+0 && UI.nMouseY >= nY-0 && UI.nMouseX <= nX + nTextWidth + 0 && UI.nMouseX >= nX - 0) |
| 2451 | { | 2450 | { |
| 2452 | UI.nActiveMenu = nMenu; | 2451 | UI.nActiveMenu = nMenu; |
| 2453 | } | 2452 | } |
| @@ -2455,21 +2454,21 @@ inline void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight) | |||
| 2455 | { | 2454 | { |
| 2456 | UI.nActiveMenu = UINT32_MAX; | 2455 | UI.nActiveMenu = UINT32_MAX; |
| 2457 | } | 2456 | } |
| 2458 | MicroProfileDrawBox(nX, nY, nX + nWidth, nY + nHeight, 0xff000000|g_nMicroProfileBackColors[1]); | 2457 | MicroProfileDrawBox(nX, nY, nX + nTextWidth, nY + nTextHeight, 0xff000000|g_nMicroProfileBackColors[1]); |
| 2459 | for(int i = 0; i < nNumLines; ++i) | 2458 | for(int i = 0; i < nNumLines; ++i) |
| 2460 | { | 2459 | { |
| 2461 | bool bSelected = false; | 2460 | bool bSelected2 = false; |
| 2462 | const char* pString = CB(i, &bSelected); | 2461 | const char* pString2 = CB(i, &bSelected2); |
| 2463 | if(UI.nMouseY >= nY && UI.nMouseY < nY + MICROPROFILE_TEXT_HEIGHT + 1) | 2462 | if(UI.nMouseY >= nY && UI.nMouseY < nY + MICROPROFILE_TEXT_HEIGHT + 1) |
| 2464 | { | 2463 | { |
| 2465 | if(UI.nMouseLeft || UI.nMouseRight) | 2464 | if(UI.nMouseLeft || UI.nMouseRight) |
| 2466 | { | 2465 | { |
| 2467 | CBClick[nMenu](i); | 2466 | CBClick[nMenu](i); |
| 2468 | } | 2467 | } |
| 2469 | MicroProfileDrawBox(nX, nY, nX + nWidth, nY + MICROPROFILE_TEXT_HEIGHT + 1, 0xff888888); | 2468 | MicroProfileDrawBox(nX, nY, nX + nTextWidth, nY + MICROPROFILE_TEXT_HEIGHT + 1, 0xff888888); |
| 2470 | } | 2469 | } |
| 2471 | int nLen = snprintf(buffer, SBUF_SIZE-1, "%c %s", bSelected ? '*' : ' ' ,pString); | 2470 | int nTextLen = snprintf(buffer, SBUF_SIZE-1, "%c %s", bSelected2 ? '*' : ' ' ,pString2); |
| 2472 | MicroProfileDrawText(nX, nY, UINT32_MAX, buffer, nLen); | 2471 | MicroProfileDrawText(nX, nY, UINT32_MAX, buffer, nTextLen); |
| 2473 | nY += MICROPROFILE_TEXT_HEIGHT+1; | 2472 | nY += MICROPROFILE_TEXT_HEIGHT+1; |
| 2474 | } | 2473 | } |
| 2475 | } | 2474 | } |
| @@ -2605,7 +2604,7 @@ inline void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight) | |||
| 2605 | for(uint32_t i = 0; i < nCount; ++i) | 2604 | for(uint32_t i = 0; i < nCount; ++i) |
| 2606 | { | 2605 | { |
| 2607 | nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT); | 2606 | nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT); |
| 2608 | uint32_t nWidth = MicroProfileMin(nMaxWidth, (uint32_t)(nMaxWidth * pMs[i] * fRcpReference)); | 2607 | nWidth = MicroProfileMin(nMaxWidth, (uint32_t)(nMaxWidth * pMs[i] * fRcpReference)); |
| 2609 | MicroProfileDrawBox(nMaxOffsetX, nOffsetY, nMaxOffsetX+nWidth, nOffsetY+MICROPROFILE_TEXT_HEIGHT, pColors[i]|0xff000000); | 2608 | MicroProfileDrawBox(nMaxOffsetX, nOffsetY, nMaxOffsetX+nWidth, nOffsetY+MICROPROFILE_TEXT_HEIGHT, pColors[i]|0xff000000); |
| 2610 | } | 2609 | } |
| 2611 | } | 2610 | } |