Add missing virtual calls to UIList methods (#80)

* Add missing virtual calls to UIList methods

* Add missing virtual call in UICheckBox::Draw
This commit is contained in:
pryon 2023-11-12 17:39:04 +01:00 committed by GitHub
parent d6b7fecb69
commit 64429232f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -75,6 +75,8 @@ void UIList::Draw
)
{
UpdateUIElement();
// draw the item text
if (m_currentItem)
{
@ -197,11 +199,14 @@ void UIList::Pressed
float mouse_ypos = ev->GetFloat(2);
int buttons = ev->GetInteger(3); // unused
FrameInitialized();
// previous arrow is clicked
if (m_prev_arrow_region->contains(mouse_xpos, mouse_ypos))
{
m_prev_arrow_depressed = qtrue;
ScrollPrev();
UpdateData();
return;
}
@ -210,6 +215,7 @@ void UIList::Pressed
{
m_next_arrow_depressed = qtrue;
ScrollNext();
UpdateData();
}
}
@ -305,6 +311,7 @@ void UIList::UpdateUIElement
if (!cvarstring)
{
m_currentItem = 1;
UpdateData();
return;
}