mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
4885: Add dropdown icon r="def-" a=Jupeyy ![image](https://user-images.githubusercontent.com/6654924/159912581-f382179d-9d66-41f8-8a41-647e4e34edf5.png) ## Checklist - [x] Tested the change ingame - [x] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) 4889: Fix text texture name Texture -> TextureOutline r="def-" a=Jupeyy ## Checklist - [x] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Jupeyy <jupjopjap@gmail.com>
This commit is contained in:
commit
e8fc1758a7
|
@ -1911,7 +1911,7 @@ protected:
|
|||
FreeImageMemBlock(TextureOutline.m_ImgMem);
|
||||
vkDestroyImage(m_VKDevice, TextureOutline.m_Img, nullptr);
|
||||
|
||||
vkDestroyImageView(m_VKDevice, Texture.m_ImgView, nullptr);
|
||||
vkDestroyImageView(m_VKDevice, TextureOutline.m_ImgView, nullptr);
|
||||
}
|
||||
|
||||
DestroyTextDescriptorSets(Texture, TextureOutline);
|
||||
|
|
|
@ -1088,6 +1088,15 @@ int CMenus::RenderDropDown(int &CurDropDownState, CUIRect *pRect, int CurSelecti
|
|||
pRect->HSplitTop(24.0f, &Button, pRect);
|
||||
if(DoButton_MenuTab(pID, CurSelection > -1 ? pStr[CurSelection] : "", 0, &Button, CUI::CORNER_ALL, NULL, NULL, NULL, NULL, 4.0f))
|
||||
CurDropDownState = 1;
|
||||
|
||||
CUIRect DropDownIcon = Button;
|
||||
DropDownIcon.HMargin(2.0f, &DropDownIcon);
|
||||
DropDownIcon.VSplitRight(5.0f, &DropDownIcon, nullptr);
|
||||
TextRender()->SetCurFont(TextRender()->GetFont(TEXT_FONT_ICON_FONT));
|
||||
TextRender()->SetRenderFlags(ETextRenderFlags::TEXT_RENDER_FLAG_ONLY_ADVANCE_WIDTH | ETextRenderFlags::TEXT_RENDER_FLAG_NO_X_BEARING | ETextRenderFlags::TEXT_RENDER_FLAG_NO_Y_BEARING | ETextRenderFlags::TEXT_RENDER_FLAG_NO_PIXEL_ALIGMENT | ETextRenderFlags::TEXT_RENDER_FLAG_NO_OVERSIZE);
|
||||
UI()->DoLabelScaled(&DropDownIcon, "\xEF\x84\xBA", DropDownIcon.h * CUI::ms_FontmodHeight, TEXTALIGN_RIGHT);
|
||||
TextRender()->SetRenderFlags(0);
|
||||
TextRender()->SetCurFont(NULL);
|
||||
return CurSelection;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue