fix style

This commit is contained in:
Edgar 2020-09-20 14:05:39 +02:00
parent ffade19e19
commit 9cdaba88dc
No known key found for this signature in database
GPG key ID: 8731E6C0166EAA85

View file

@ -1415,12 +1415,11 @@ static int s_AutoMapConfigCurrent = -100;
int CEditor::PopupSelectConfigAutoMap(CEditor *pEditor, CUIRect View, void *pContext) int CEditor::PopupSelectConfigAutoMap(CEditor *pEditor, CUIRect View, void *pContext)
{ {
CLayerTiles *pLayer = static_cast<CLayerTiles*>(pEditor->GetSelectedLayer(0)); CLayerTiles *pLayer = static_cast<CLayerTiles *>(pEditor->GetSelectedLayer(0));
CUIRect Button; CUIRect Button;
static int s_AutoMapperConfigButtons[256]; static int s_AutoMapperConfigButtons[256];
CAutoMapper *pAutoMapper = &pEditor->m_Map.m_lImages[pLayer->m_Image]->m_AutoMapper; CAutoMapper *pAutoMapper = &pEditor->m_Map.m_lImages[pLayer->m_Image]->m_AutoMapper;
const float ButtonHeight = 12.0f; const float ButtonHeight = 12.0f;
static int s_ScrollBar = 0; static int s_ScrollBar = 0;
@ -1438,7 +1437,6 @@ int CEditor::PopupSelectConfigAutoMap(CEditor *pEditor, CUIRect View, void *pCon
Scroll.HMargin(5.f, &Scroll); Scroll.HMargin(5.f, &Scroll);
s_ScrollValue = pEditor->UiDoScrollbarV(&s_ScrollBar, &Scroll, s_ScrollValue); s_ScrollValue = pEditor->UiDoScrollbarV(&s_ScrollBar, &Scroll, s_ScrollValue);
if(pEditor->UI()->MouseInside(&View) || pEditor->UI()->MouseInside(&Scroll)) if(pEditor->UI()->MouseInside(&View) || pEditor->UI()->MouseInside(&Scroll))
{ {
int ScrollNum = (int)((ListHeight / ButtonHeight) + 1); int ScrollNum = (int)((ListHeight / ButtonHeight) + 1);
@ -1451,7 +1449,6 @@ int CEditor::PopupSelectConfigAutoMap(CEditor *pEditor, CUIRect View, void *pCon
} }
else else
ScrollNum = 0; ScrollNum = 0;
} }
// Margin for scrollbar // Margin for scrollbar
@ -1473,7 +1470,7 @@ int CEditor::PopupSelectConfigAutoMap(CEditor *pEditor, CUIRect View, void *pCon
if(ListCur > ListStopAt) if(ListCur > ListStopAt)
break; break;
if(ListCur>= ListStartAt) if(ListCur >= ListStartAt)
{ {
View.HSplitTop(2.0f, 0, &View); View.HSplitTop(2.0f, 0, &View);
View.HSplitTop(ButtonHeight, &Button, &View); View.HSplitTop(ButtonHeight, &Button, &View);
@ -1493,7 +1490,7 @@ void CEditor::PopupSelectConfigAutoMapInvoke(int Current, float x, float y)
static int s_AutoMapConfigSelectID = 0; static int s_AutoMapConfigSelectID = 0;
s_AutoMapConfigSelected = -100; s_AutoMapConfigSelected = -100;
s_AutoMapConfigCurrent = Current; s_AutoMapConfigCurrent = Current;
CLayerTiles *pLayer = static_cast<CLayerTiles*>(GetSelectedLayer(0)); CLayerTiles *pLayer = static_cast<CLayerTiles *>(GetSelectedLayer(0));
int ItemCount = m_Map.m_lImages[pLayer->m_Image]->m_AutoMapper.ConfigNamesNum(); int ItemCount = m_Map.m_lImages[pLayer->m_Image]->m_AutoMapper.ConfigNamesNum();
if(ItemCount > 5) if(ItemCount > 5)
ItemCount = 5; ItemCount = 5;