Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
XonoticHUDSkinList Class Reference
Inheritance diagram for XonoticHUDSkinList:
Collaboration diagram for XonoticHUDSkinList:

Public Member Functions

 ATTRIB (ListBox, src, string)
 ATTRIB (MenuItem, parent, entity)
 ATTRIB (MenuItem, tooltip, string)
 ATTRIB (XonoticHUDSkinList, filterString, string)
 ATTRIB (XonoticHUDSkinList, savedName, string)
virtual void clickListBoxItem ()
virtual void configureListBox ()
virtual void configureXonoticHUDSkinList ()
virtual void configureXonoticListBox ()
virtual void destroy ()
virtual void doubleClickListBoxItem ()
virtual void draw ()
virtual void drawListBoxItem ()
virtual void focusedItemChangeNotify ()
virtual void focusEnter ()
virtual void focusLeave ()
virtual void getFirstFullyVisibleItemAtScrollPos ()
virtual void getHUDSkins ()
virtual void getItemAtPos ()
virtual void getItemHeight ()
virtual void getItemStart ()
virtual void getLastFullyVisibleItemAtScrollPos ()
virtual void getTotalHeight ()
virtual void hideNotify ()
virtual void hudskinAuthor ()
virtual void hudskinName ()
virtual void hudskinPath ()
virtual void hudskinTitle ()
virtual void isScrolling ()
virtual void keyDown ()
virtual void keyUp ()
virtual void mouseDrag ()
virtual void mouseMove ()
virtual void mousePress ()
virtual void mouseRelease ()
virtual void relinquishFocus ()
virtual void resizeNotify ()
virtual void scrollToItem ()
virtual void setFocusedItem ()
virtual void setHUDSkin ()
virtual void setSelected ()
virtual void showNotify ()
virtual void toString ()
virtual void updateControlTopBottom ()

Public Attributes

bool allowFocusSound = true
float alphaBG = SKINALPHA_LISTBOX_BACKGROUND
vector color = SKINCOLOR_SCROLLBAR_N
vector color2 = SKINCOLOR_SCROLLBAR_S
vector colorBG = SKINCOLOR_LISTBOX_BACKGROUND
vector colorC = SKINCOLOR_SCROLLBAR_C
vector colorF = SKINCOLOR_SCROLLBAR_F
float columnNameOrigin = 0
float columnNameSize = 0
float controlBottom = 0
float controlTop = 0
float controlWidth = 0
float delayedRefreshTime = 0
vector dragScrollPos = '0 0 0'
bool focusable = true
bool focused = false
int focusedItem = -1
float focusedItemAlpha = 0.3
float fontSize = SKINFONTSIZE_NORMAL
vector itemAbsSize = '0 0 0'
float itemHeight = 0
float lastClickedItem = -1
float lastClickedTime = 0
float listHUDSkin = -1
float mouseMoveOffset = -1
float needScrollToItem = -1
int nItems = 42
vector origin = '0 0 0'
float preferredFocusPriority = 0
float pressed = 0
float pressOffset = 0
float previousValue = 0
vector realFontSize = '0 0 0'
float realUpperMargin = 0
float rowsPerItem = 1
float scrollbarWidth = SKINWIDTH_SCROLLBAR
float scrollPos = 0
float scrollPosTarget = 0
int selectedItem = 0
bool selectionDoesntMatter = false
vector size = '0 0 0'
string src = SKINGFX_SCROLLBAR
vector tolerance = '2 0.2 0'

Detailed Description

Definition at line 4 of file hudskinlist.qh.

Member Function Documentation

◆ ATTRIB() [1/5]

ListBox::ATTRIB ( ListBox ,
src ,
string  )
inherited

References ATTRIB().

Referenced by ATTRIB().

◆ ATTRIB() [2/5]

MenuItem::ATTRIB ( MenuItem ,
parent ,
entity  )
inherited

References entity(), and parent.

◆ ATTRIB() [3/5]

MenuItem::ATTRIB ( MenuItem ,
tooltip ,
string  )
inherited

◆ ATTRIB() [4/5]

XonoticHUDSkinList::ATTRIB ( XonoticHUDSkinList ,
filterString ,
string  )

References ATTRIB().

Referenced by ATTRIB(), and ATTRIB().

◆ ATTRIB() [5/5]

XonoticHUDSkinList::ATTRIB ( XonoticHUDSkinList ,
savedName ,
string  )

References ATTRIB(), and ENDCLASS.

◆ clickListBoxItem()

virtual void ListBox::clickListBoxItem ( )
virtualinherited

◆ configureListBox()

virtual void ListBox::configureListBox ( )
virtualinherited

References configureListBox(), entity(), and METHOD.

Referenced by configureListBox().

◆ configureXonoticHUDSkinList()

virtual void XonoticHUDSkinList::configureXonoticHUDSkinList ( )
virtual

◆ configureXonoticListBox()

◆ destroy()

virtual void XonoticHUDSkinList::destroy ( )
virtual

Reimplemented from MenuItem.

References destroy(), entity(), and METHOD.

Referenced by destroy().

◆ doubleClickListBoxItem()

virtual void XonoticHUDSkinList::doubleClickListBoxItem ( )
virtual

Reimplemented from ListBox.

References doubleClickListBoxItem(), entity(), METHOD, and vector.

Referenced by doubleClickListBoxItem().

◆ draw()

virtual void XonoticHUDSkinList::draw ( )
virtual

Reimplemented from ListBox.

References draw(), entity(), and METHOD.

Referenced by draw().

◆ drawListBoxItem()

virtual void XonoticHUDSkinList::drawListBoxItem ( )
virtual

Reimplemented from ListBox.

References drawListBoxItem(), entity(), METHOD, and vector.

Referenced by drawListBoxItem().

◆ focusedItemChangeNotify()

virtual void ListBox::focusedItemChangeNotify ( )
virtualinherited

◆ focusEnter()

void MenuItem::focusEnter ( )
virtualinherited

Reimplemented in Nexposee, XonoticCreditsDialog, XonoticServerList, and XonoticWinnerDialog.

Definition at line 94 of file item.qc.

95 {
97 }
bool allowFocusSound
Definition item.qh:26
void m_play_focus_sound()
Definition menu.qc:1097

References allowFocusSound, focusEnter(), and m_play_focus_sound().

Referenced by focusEnter().

◆ focusLeave()

virtual void ListBox::focusLeave ( )
virtualinherited

Reimplemented from MenuItem.

References entity(), focusLeave(), and METHOD.

Referenced by focusLeave().

◆ getFirstFullyVisibleItemAtScrollPos()

virtual void ListBox::getFirstFullyVisibleItemAtScrollPos ( )
virtualinherited

◆ getHUDSkins()

virtual void XonoticHUDSkinList::getHUDSkins ( )
virtual

References entity(), getHUDSkins(), and METHOD.

Referenced by getHUDSkins().

◆ getItemAtPos()

virtual void ListBox::getItemAtPos ( )
virtualinherited

Reimplemented in XonoticScrollPanel, and XonoticServerList.

References entity(), getItemAtPos(), and METHOD.

Referenced by getItemAtPos(), and mousePress().

◆ getItemHeight()

virtual void ListBox::getItemHeight ( )
virtualinherited

Reimplemented in XonoticScrollPanel, and XonoticServerList.

References ENDCLASS, entity(), getItemHeight(), and METHOD.

Referenced by getItemHeight().

◆ getItemStart()

virtual void ListBox::getItemStart ( )
virtualinherited

Reimplemented in XonoticScrollPanel, and XonoticServerList.

References entity(), getItemStart(), and METHOD.

Referenced by getItemStart().

◆ getLastFullyVisibleItemAtScrollPos()

virtual void ListBox::getLastFullyVisibleItemAtScrollPos ( )
virtualinherited

◆ getTotalHeight()

virtual void ListBox::getTotalHeight ( )
virtualinherited

Reimplemented in XonoticScrollPanel, and XonoticServerList.

References entity(), getTotalHeight(), and METHOD.

Referenced by getTotalHeight(), and mousePress().

◆ hideNotify()

void MenuItem::hideNotify ( )
virtualinherited

Reimplemented in Container, and XonoticCvarList.

Definition at line 59 of file item.qc.

60 {}

References hideNotify().

Referenced by hideNotify().

◆ hudskinAuthor()

virtual void XonoticHUDSkinList::hudskinAuthor ( )
virtual

References entity(), hudskinAuthor(), and METHOD.

Referenced by hudskinAuthor().

◆ hudskinName()

virtual void XonoticHUDSkinList::hudskinName ( )
virtual

References entity(), hudskinName(), and METHOD.

Referenced by hudskinName().

◆ hudskinPath()

virtual void XonoticHUDSkinList::hudskinPath ( )
virtual

References entity(), hudskinPath(), and METHOD.

Referenced by hudskinPath().

◆ hudskinTitle()

virtual void XonoticHUDSkinList::hudskinTitle ( )
virtual

References entity(), hudskinTitle(), and METHOD.

Referenced by hudskinTitle().

◆ isScrolling()

virtual void ListBox::isScrolling ( )
virtualinherited

References entity(), isScrolling(), and METHOD.

Referenced by isScrolling().

◆ keyDown()

virtual void XonoticHUDSkinList::keyDown ( )
virtual

Reimplemented from ListBox.

References entity(), keyDown(), and METHOD.

Referenced by keyDown().

◆ keyUp()

void MenuItem::keyUp ( )
virtualinherited

Reimplemented in Container, Nexposee, and Slider.

Definition at line 67 of file item.qc.

68 {
69 return 0; // unhandled
70 }

References keyUp().

Referenced by keyUp().

◆ mouseDrag()

virtual void ListBox::mouseDrag ( )
virtualinherited

Reimplemented from MenuItem.

Reimplemented in XonoticPlayList, and XonoticWeaponsList.

References entity(), METHOD, mouseDrag(), and vector.

Referenced by mouseDrag().

◆ mouseMove()

virtual void ListBox::mouseMove ( )
virtualinherited

Reimplemented from MenuItem.

Reimplemented in XonoticServerList.

References entity(), METHOD, mouseMove(), mousePress(), this, and vector.

Referenced by mouseMove().

◆ mousePress()

void ListBox::mousePress ( )
virtualinherited

Reimplemented from MenuItem.

Definition at line 212 of file listbox.qc.

213 {
214 if (pos.x < 0) return false;
215 if (pos.y < 0) return false;
216 if (pos.x >= 1) return false;
217 if (pos.y >= 1) return false;
218 this.dragScrollPos = pos;
219 this.updateControlTopBottom(this);
220 if (pos.x >= 1 - this.controlWidth)
221 {
222 // if hit, set this.pressed, otherwise scroll by one page
223 if (pos.y < this.controlTop)
224 {
225 // page up
226 this.scrollPosTarget = max(this.scrollPosTarget - 1, 0);
227 }
228 else if (pos.y > this.controlBottom)
229 {
230 // page down
231 this.scrollPosTarget = min(this.scrollPosTarget + 1, this.getTotalHeight(this) - 1);
232 }
233 else
234 {
235 this.pressed = 1;
236 this.pressOffset = pos.y;
237 this.previousValue = this.scrollPos;
238 }
239 }
240 else
241 {
242 // continue doing that while dragging (even when dragging outside). When releasing, forward the click to the then selected item.
243 this.pressed = 2;
244 // an item has been clicked. Select it, ...
245 int clickeditem = this.getItemAtPos(this, this.scrollPos + pos.y);
246 this.setSelected(this, clickeditem);
247 this.setFocusedItem(this, clickeditem);
248 }
249 return true;
250 }
virtual void setSelected()
virtual void getTotalHeight()
vector dragScrollPos
Definition listbox.qh:36
float pressOffset
Definition listbox.qh:30
virtual void getItemAtPos()
virtual void updateControlTopBottom()
float pressed
Definition listbox.qh:29
float previousValue
Definition listbox.qh:28
float scrollPosTarget
Definition listbox.qh:24
virtual void setFocusedItem()
float scrollPos
Definition listbox.qh:23
float min(float f,...)
float max(float f,...)

References dragScrollPos, getItemAtPos(), getTotalHeight(), max(), min(), mousePress(), pressed, pressOffset, previousValue, scrollPos, scrollPosTarget, setFocusedItem(), setSelected(), updateControlTopBottom(), and vector.

Referenced by mouseMove(), and mousePress().

◆ mouseRelease()

virtual void ListBox::mouseRelease ( )
virtualinherited

Reimplemented from MenuItem.

Reimplemented in XonoticCvarList.

References entity(), METHOD, mouseRelease(), and vector.

Referenced by mouseRelease().

◆ relinquishFocus()

void MenuItem::relinquishFocus ( )
virtualinherited

Definition at line 11 of file item.qc.

12 {
13 entity par = this.parent;
14 if (!par) return;
15 if (par.instanceOfContainer) par.setFocus(par, NULL);
16 }
entity parent
Definition animhost.qc:7
entity() spawn
#define NULL
Definition post.qh:14

References entity(), NULL, parent, and relinquishFocus().

Referenced by relinquishFocus().

◆ resizeNotify()

virtual void XonoticHUDSkinList::resizeNotify ( )
virtual

Reimplemented from XonoticListBox.

References entity(), METHOD, resizeNotify(), and vector.

Referenced by resizeNotify().

◆ scrollToItem()

virtual void ListBox::scrollToItem ( )
virtualinherited

◆ setFocusedItem()

virtual void ListBox::setFocusedItem ( )
virtualinherited

References entity(), METHOD, and setFocusedItem().

Referenced by mousePress(), and setFocusedItem().

◆ setHUDSkin()

virtual void XonoticHUDSkinList::setHUDSkin ( )
virtual

References entity(), METHOD, and setHUDSkin().

Referenced by setHUDSkin().

◆ setSelected()

◆ showNotify()

virtual void XonoticHUDSkinList::showNotify ( )
virtual

Reimplemented from MenuItem.

References entity(), METHOD, and showNotify().

Referenced by showNotify().

◆ toString()

void MenuItem::toString ( )
virtualinherited

Reimplemented in CheckBox, Image, Label, Slider, and XonoticWeaponsList.

Definition at line 102 of file item.qc.

103 {
104 return string_null;
105 }
string string_null
Definition nil.qh:9

References string_null, and toString().

Referenced by toString().

◆ updateControlTopBottom()

virtual void ListBox::updateControlTopBottom ( )
virtualinherited

Member Data Documentation

◆ allowFocusSound

bool ListBox::allowFocusSound = true
inherited

Definition at line 19 of file listbox.qh.

◆ alphaBG

float XonoticListBox::alphaBG = SKINALPHA_LISTBOX_BACKGROUND
inherited

Definition at line 17 of file listbox.qh.

◆ color

vector XonoticListBox::color = SKINCOLOR_SCROLLBAR_N
inherited

Definition at line 12 of file listbox.qh.

◆ color2

vector XonoticListBox::color2 = SKINCOLOR_SCROLLBAR_S
inherited

Definition at line 14 of file listbox.qh.

◆ colorBG

vector XonoticListBox::colorBG = SKINCOLOR_LISTBOX_BACKGROUND
inherited

Definition at line 16 of file listbox.qh.

◆ colorC

vector XonoticListBox::colorC = SKINCOLOR_SCROLLBAR_C
inherited

Definition at line 15 of file listbox.qh.

◆ colorF

vector XonoticListBox::colorF = SKINCOLOR_SCROLLBAR_F
inherited

Definition at line 13 of file listbox.qh.

◆ columnNameOrigin

float XonoticHUDSkinList::columnNameOrigin = 0

Definition at line 23 of file hudskinlist.qh.

◆ columnNameSize

float XonoticHUDSkinList::columnNameSize = 0

Definition at line 24 of file hudskinlist.qh.

◆ controlBottom

float ListBox::controlBottom = 0
inherited

Definition at line 34 of file listbox.qh.

◆ controlTop

float ListBox::controlTop = 0
inherited

Definition at line 33 of file listbox.qh.

◆ controlWidth

float ListBox::controlWidth = 0
inherited

Definition at line 35 of file listbox.qh.

Referenced by XonoticRegisteredSettingsList::resizeNotify().

◆ delayedRefreshTime

float XonoticHUDSkinList::delayedRefreshTime = 0

Definition at line 30 of file hudskinlist.qh.

◆ dragScrollPos

vector ListBox::dragScrollPos = '0 0 0'
inherited

Definition at line 36 of file listbox.qh.

Referenced by mousePress().

◆ focusable

bool ListBox::focusable = true
inherited

Definition at line 14 of file listbox.qh.

◆ focused

bool MenuItem::focused = false
inherited

Definition at line 24 of file item.qh.

◆ focusedItem

int ListBox::focusedItem = -1
inherited

Definition at line 15 of file listbox.qh.

Referenced by XonoticRegisteredSettingsList::focusedItemChangeNotify().

◆ focusedItemAlpha

float ListBox::focusedItemAlpha = 0.3
inherited

Definition at line 16 of file listbox.qh.

Referenced by XonoticRegisteredSettingsList::drawListBoxItem().

◆ fontSize

float XonoticListBox::fontSize = SKINFONTSIZE_NORMAL
inherited

Definition at line 6 of file listbox.qh.

Referenced by XonoticRegisteredSettingsList::resizeNotify().

◆ itemAbsSize

vector XonoticHUDSkinList::itemAbsSize = '0 0 0'

Definition at line 27 of file hudskinlist.qh.

◆ itemHeight

float ListBox::itemHeight = 0
inherited

Definition at line 47 of file listbox.qh.

Referenced by XonoticRegisteredSettingsList::resizeNotify().

◆ lastClickedItem

float ListBox::lastClickedItem = -1
inherited

Definition at line 52 of file listbox.qh.

◆ lastClickedTime

float ListBox::lastClickedTime = 0
inherited

Definition at line 53 of file listbox.qh.

◆ listHUDSkin

float XonoticHUDSkinList::listHUDSkin = -1

Definition at line 21 of file hudskinlist.qh.

◆ mouseMoveOffset

float ListBox::mouseMoveOffset = -1
inherited

Definition at line 18 of file listbox.qh.

◆ needScrollToItem

float ListBox::needScrollToItem = -1
inherited

Definition at line 26 of file listbox.qh.

◆ nItems

int ListBox::nItems = 42
inherited

◆ origin

vector XonoticHUDSkinList::origin = '0 0 0'

Definition at line 26 of file hudskinlist.qh.

◆ preferredFocusPriority

float MenuItem::preferredFocusPriority = 0
inherited

Definition at line 28 of file item.qh.

◆ pressed

float ListBox::pressed = 0
inherited

Definition at line 29 of file listbox.qh.

Referenced by mousePress().

◆ pressOffset

float ListBox::pressOffset = 0
inherited

Definition at line 30 of file listbox.qh.

Referenced by mousePress().

◆ previousValue

float ListBox::previousValue = 0
inherited

Definition at line 28 of file listbox.qh.

Referenced by mousePress().

◆ realFontSize

vector XonoticHUDSkinList::realFontSize = '0 0 0'

Definition at line 22 of file hudskinlist.qh.

◆ realUpperMargin

float XonoticHUDSkinList::realUpperMargin = 0

Definition at line 25 of file hudskinlist.qh.

◆ rowsPerItem

float XonoticHUDSkinList::rowsPerItem = 1

Definition at line 6 of file hudskinlist.qh.

◆ scrollbarWidth

float XonoticListBox::scrollbarWidth = SKINWIDTH_SCROLLBAR
inherited

Definition at line 7 of file listbox.qh.

◆ scrollPos

float ListBox::scrollPos = 0
inherited

Definition at line 23 of file listbox.qh.

Referenced by mousePress().

◆ scrollPosTarget

float ListBox::scrollPosTarget = 0
inherited

Definition at line 24 of file listbox.qh.

Referenced by mousePress().

◆ selectedItem

int ListBox::selectedItem = 0
inherited

Definition at line 20 of file listbox.qh.

◆ selectionDoesntMatter

bool ListBox::selectionDoesntMatter = false
inherited

Definition at line 37 of file listbox.qh.

◆ size

vector ListBox::size = '0 0 0'
inherited

Definition at line 21 of file listbox.qh.

◆ src

string XonoticListBox::src = SKINGFX_SCROLLBAR
inherited

Definition at line 8 of file listbox.qh.

◆ tolerance

vector XonoticListBox::tolerance = '2 0.2 0'
inherited

Definition at line 9 of file listbox.qh.


The documentation for this class was generated from the following file: