MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / ListBox

Method ListBox

extensions/olcPGEX_QuickGUI.h:989–997  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

987
988#pragma region ListBox
989 ListBox::ListBox(olc::QuickGUI::Manager& manager, std::vector<std::string>& vList, const olc::vf2d& pos, const olc::vf2d& size)
990 : BaseControl(manager), m_vList(vList)
991 {
992 m_group.CopyThemeFrom(m_manager);
993 vPos = pos;
994 vSize = size;
995 m_pSlider = new Slider(m_group, { pos.x + size.x - m_manager.fGrabRad - 1, pos.y + m_manager.fGrabRad + 1 },
996 { pos.x + size.x - m_manager.fGrabRad - 1, pos.y + size.y - m_manager.fGrabRad - 1 }, 0, float(m_vList.size()), 0);
997 }
998
999 void ListBox::Update(olc::PixelGameEngine* pge)
1000 {

Callers

nothing calls this directly

Calls 2

CopyThemeFromMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected