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

Public Member Functions

virtual void addRange ()
virtual void addText ()
virtual void adjustDigitsForStep ()
 ATTRIB (Label, currentText, string)
 ATTRIB (Label, text, string)
 ATTRIB (Label, textEntity, entity)
 ATTRIB (MenuItem, parent, entity)
 ATTRIB (MenuItem, tooltip, string)
 ATTRIB (Slider, sliderAnim, entity)
 ATTRIB (Slider, src, string)
 ATTRIB (XonoticMixedSlider, controlledCvar, string)
virtual void autofix ()
virtual void clearValues ()
virtual void configureLabel ()
virtual void configureMixedSliderValues ()
virtual void configureSliderValues ()
virtual void configureSliderVisuals ()
virtual void configureXonoticMixedSlider ()
virtual void configureXonoticMixedSliderValues ()
virtual void configureXonoticPicmipSlider ()
virtual void destroy ()
virtual void draw ()
virtual void focusEnter ()
virtual void focusLeave ()
virtual void getNumberIdentifier ()
virtual void hideNotify ()
virtual void insertRange ()
virtual void insertText ()
virtual void keyDown ()
virtual void keyUp ()
virtual void loadCvars ()
virtual void mouseDrag ()
virtual void mouseMove ()
virtual void mousePress ()
virtual void mouseRelease ()
virtual void rangedIdentifierToText ()
virtual void recalcPositionWithText ()
virtual void relinquishFocus ()
virtual void resizeNotify ()
virtual void saveCvars ()
virtual void setSliderValue ()
virtual void setText ()
virtual void setValue ()
virtual void setValueFromNumberIdentifier ()
virtual void setValueSpace ()
virtual void showNotify ()
virtual void toString ()
virtual void valueToNumberIdentifier ()
virtual void valueToText ()

Public Attributes

float align = 0.5
bool allowColors = false
bool allowCut = false
bool allowFocusSound = true
bool allowWrap = false
float allowWrap_spacing = 0
float alpha = SKINALPHA_TEXT
bool animated = true
vector color = SKINCOLOR_SLIDER_N
vector color2 = SKINCOLOR_SLIDER_S
vector colorC = SKINCOLOR_SLIDER_C
vector colorD = SKINCOLOR_SLIDER_D
vector colorF = SKINCOLOR_SLIDER_F
vector colorL = SKINCOLOR_TEXT
float condenseFactor = 1
float controlWidth = 0
float disabled = 0
float disabledAlpha = SKINALPHA_DISABLED
bool focusable = true
bool focused = false
float fontSize = SKINFONTSIZE_NORMAL
string formatString = ""
float have_s3tc = 0
string image = SKINGFX_SLIDER
bool isBold = false
float keepspaceLeft = 0
float keepspaceRight = 0
float marginLeft = 0
float marginRight = 0
int nValues = 0
vector origin = '0 0 0'
bool overrideCondenseFactor = false
vector overrideRealOrigin = '0 0 0'
float preferredFocusPriority = 0
float pressed = 0
float pressOffset = 0
float previousValue = 0
vector realFontSize = '0 0 0'
vector realOrigin = '0 0 0'
bool recalcPos = false
float sendCvars = 0
vector size = '0 0 0'
float sliderValue = 0
vector tolerance = '0.2 2 0'
float value = 0
float valueDigits = 0
float valueDisplayMultiplier = 1.0
float valueKeyStep = 0
float valueMax = 0
float valueMin = 0
float valueNumberIdentifiers [256]
float valuePageStep = 0
float valueSpace = SKINWIDTH_SLIDERTEXT
float valueStep = 0
string valueStrings [256]

Detailed Description

Definition at line 4 of file slider_picmip.qh.

Member Function Documentation

◆ addRange()

virtual void MixedSlider::addRange ( )
virtualinherited

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

Referenced by addRange().

◆ addText()

virtual void MixedSlider::addText ( )
virtualinherited

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

Referenced by addText().

◆ adjustDigitsForStep()

virtual void MixedSlider::adjustDigitsForStep ( )
virtualinherited

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

Referenced by adjustDigitsForStep().

◆ ATTRIB() [1/8]

Label::ATTRIB ( Label ,
currentText ,
string  )
inherited

References ATTRIB().

◆ ATTRIB() [2/8]

Label::ATTRIB ( Label ,
text ,
string  )
inherited

References ATTRIB().

Referenced by ATTRIB(), ATTRIB(), and ATTRIB().

◆ ATTRIB() [3/8]

Label::ATTRIB ( Label ,
textEntity ,
entity  )
inherited

References ATTRIB(), and entity().

◆ ATTRIB() [4/8]

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

References entity(), and parent.

◆ ATTRIB() [5/8]

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

◆ ATTRIB() [6/8]

Slider::ATTRIB ( Slider ,
sliderAnim ,
entity  )
inherited

References ATTRIB(), and entity().

◆ ATTRIB() [7/8]

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

References ATTRIB().

Referenced by ATTRIB(), and ATTRIB().

◆ ATTRIB() [8/8]

XonoticMixedSlider::ATTRIB ( XonoticMixedSlider ,
controlledCvar ,
string  )
inherited

References ATTRIB(), and controlledCvar.

Referenced by ATTRIB().

◆ autofix()

virtual void XonoticPicmipSlider::autofix ( )
virtual

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

Referenced by autofix().

◆ clearValues()

virtual void MixedSlider::clearValues ( )
virtualinherited

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

Referenced by clearValues().

◆ configureLabel()

virtual void Label::configureLabel ( )
virtualinherited

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

Referenced by configureLabel().

◆ configureMixedSliderValues()

virtual void MixedSlider::configureMixedSliderValues ( )
virtualinherited

◆ configureSliderValues()

virtual void Slider::configureSliderValues ( )
virtualinherited

◆ configureSliderVisuals()

virtual void Slider::configureSliderVisuals ( )
virtualinherited

◆ configureXonoticMixedSlider()

virtual void XonoticMixedSlider::configureXonoticMixedSlider ( )
virtualinherited

◆ configureXonoticMixedSliderValues()

virtual void XonoticMixedSlider::configureXonoticMixedSliderValues ( )
virtualinherited

◆ configureXonoticPicmipSlider()

virtual void XonoticPicmipSlider::configureXonoticPicmipSlider ( )
virtual

◆ destroy()

◆ draw()

virtual void XonoticPicmipSlider::draw ( )
virtual

Reimplemented from Slider.

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

Referenced by draw().

◆ 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()

void MenuItem::focusLeave ( )
virtualinherited

Reimplemented in Container, InputContainer, ListBox, XonoticCharmap, XonoticColorpicker, and XonoticInputBox.

Definition at line 99 of file item.qc.

100 {}

References focusLeave().

Referenced by focusLeave().

◆ getNumberIdentifier()

virtual void MixedSlider::getNumberIdentifier ( )
virtualinherited

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

Referenced by getNumberIdentifier().

◆ hideNotify()

void MenuItem::hideNotify ( )
virtualinherited

Reimplemented in Container, and XonoticCvarList.

Definition at line 59 of file item.qc.

60 {}

References hideNotify().

Referenced by hideNotify().

◆ insertRange()

virtual void MixedSlider::insertRange ( )
virtualinherited

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

Referenced by insertRange().

◆ insertText()

virtual void MixedSlider::insertText ( )
virtualinherited

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

Referenced by insertText().

◆ keyDown()

virtual void Slider::keyDown ( )
virtualinherited

Reimplemented from MenuItem.

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

Referenced by keyDown().

◆ keyUp()

virtual void Slider::keyUp ( )
virtualinherited

Reimplemented from MenuItem.

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

Referenced by keyUp().

◆ loadCvars()

virtual void XonoticMixedSlider::loadCvars ( )
virtualinherited

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

Referenced by loadCvars().

◆ mouseDrag()

virtual void Slider::mouseDrag ( )
virtualinherited

Reimplemented from MenuItem.

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

Referenced by mouseDrag().

◆ mouseMove()

void MenuItem::mouseMove ( )
virtualinherited

Reimplemented in Container, InputBox, InputContainer, ListBox, Nexposee, XonoticPicker, XonoticScreenshotImage, and XonoticServerList.

Definition at line 72 of file item.qc.

73 {
74 return 0; // unhandled
75 }

References mouseMove(), and vector.

Referenced by mouseMove().

◆ mousePress()

void Slider::mousePress ( )
virtualinherited

Reimplemented from MenuItem.

Definition at line 195 of file slider.qc.

196 {
197 float controlCenter;
198 if (this.disabled) return false;
199 if (pos.x < 0) return false;
200 if (pos.y < 0) return false;
201 if (pos.x >= 1 - this.valueSpace) return false;
202 if (pos.y >= 1) return false;
203 controlCenter = (this.value - this.valueMin) / (this.valueMax - this.valueMin) * (1 - this.valueSpace - this.controlWidth) + 0.5 * this.controlWidth;
204 if (fabs(pos.x - controlCenter) <= 0.5 * this.controlWidth)
205 {
206 this.pressed = 1;
207 this.pressOffset = pos.x - controlCenter;
208 this.previousValue = this.value;
209 // this.mouseDrag(this, pos);
210 }
211 else
212 {
213 float clickValue, pageValue, inRange;
214 clickValue = median(0, (pos.x - this.pressOffset - 0.5 * this.controlWidth) / (1 - this.valueSpace - this.controlWidth), 1) * (this.valueMax - this.valueMin) + this.valueMin;
215 inRange = (almost_in_bounds(this.valueMin, this.value, this.valueMax));
216 if (pos.x < controlCenter)
217 {
218 pageValue = this.value - this.valuePageStep;
219 if (this.valueStep) clickValue = floor(clickValue / this.valueStep) * this.valueStep;
220 pageValue = max(pageValue, clickValue);
221 }
222 else
223 {
224 pageValue = this.value + this.valuePageStep;
225 if (this.valueStep) clickValue = ceil(clickValue / this.valueStep) * this.valueStep;
226 pageValue = min(pageValue, clickValue);
227 }
228 if (inRange) this.setValue(this, median(this.valueMin, pageValue, this.valueMax), autocvar_menu_animations > 0);
229 else this.setValue(this, this.valueMax, autocvar_menu_animations > 0);
230 if(this.applyButton)
231 this.applyButton.disabled = false;
232 if (pageValue == clickValue)
233 {
234 controlCenter = (this.value - this.valueMin) / (this.valueMax - this.valueMin) * (1 - this.valueSpace - this.controlWidth) + 0.5 * this.controlWidth;
235 this.pressed = 1;
236 this.pressOffset = pos.x - controlCenter;
237 this.previousValue = this.value;
238 // this.mouseDrag(this, pos);
239 }
240 }
241 return true;
242 }
float autocvar_menu_animations
Definition animation.qh:3
float disabled
Definition slider.qh:43
float controlWidth
Definition slider.qh:38
float pressOffset
Definition slider.qh:40
virtual void setValue()
float valueStep
Definition slider.qh:31
float valueMax
Definition slider.qh:30
float valueSpace
Definition slider.qh:37
float previousValue
Definition slider.qh:41
float pressed
Definition slider.qh:39
float valuePageStep
Definition slider.qh:34
float valueMin
Definition slider.qh:29
float value
Definition slider.qh:25
entity applyButton
Definition slider.qc:38
ERASEABLE float median(float a, float b, float c)
Definition math.qh:213
ERASEABLE float almost_in_bounds(float a, float b, float c)
Definition math.qh:233
float ceil(float f)
float min(float f,...)
float fabs(float f)
float floor(float f)
float max(float f,...)

References almost_in_bounds(), applyButton, autocvar_menu_animations, ceil(), controlWidth, disabled, fabs(), floor(), max(), median(), min(), mousePress(), pressed, pressOffset, previousValue, setValue(), value, valueMax, valueMin, valuePageStep, valueSpace, valueStep, and vector.

Referenced by keyUp(), and mousePress().

◆ mouseRelease()

virtual void Slider::mouseRelease ( )
virtualinherited

Reimplemented from MenuItem.

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

Referenced by mouseRelease().

◆ rangedIdentifierToText()

virtual void MixedSlider::rangedIdentifierToText ( )
virtualinherited

◆ recalcPositionWithText()

virtual void Label::recalcPositionWithText ( )
virtualinherited

Reimplemented in BorderImage.

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

Referenced by recalcPositionWithText().

◆ 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 Slider::resizeNotify ( )
virtualinherited

Reimplemented from Label.

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

Referenced by resizeNotify().

◆ saveCvars()

virtual void XonoticMixedSlider::saveCvars ( )
virtualinherited

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

Referenced by saveCvars().

◆ setSliderValue()

virtual void Slider::setSliderValue ( )
virtualinherited

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

Referenced by setSliderValue().

◆ setText()

virtual void Label::setText ( )
virtualinherited

Reimplemented in InputBox, and XonoticInputBox.

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

Referenced by setText().

◆ setValue()

virtual void XonoticMixedSlider::setValue ( )
virtualinherited

Reimplemented from Slider.

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

Referenced by setValue().

◆ setValueFromNumberIdentifier()

virtual void MixedSlider::setValueFromNumberIdentifier ( )
virtualinherited

◆ setValueSpace()

virtual void XonoticMixedSlider::setValueSpace ( )
virtualinherited

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

Referenced by setValueSpace().

◆ showNotify()

virtual void Slider::showNotify ( )
virtualinherited

Reimplemented from MenuItem.

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

Referenced by showNotify().

◆ toString()

virtual void Slider::toString ( )
virtualinherited

Reimplemented from Label.

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

Referenced by toString().

◆ valueToNumberIdentifier()

virtual void MixedSlider::valueToNumberIdentifier ( )
virtualinherited

◆ valueToText()

virtual void MixedSlider::valueToText ( )
virtualinherited

Reimplemented from Slider.

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

Referenced by valueToText().

Member Data Documentation

◆ align

float XonoticMixedSlider::align = 0.5
inherited

Definition at line 13 of file mixedslider.qh.

◆ allowColors

bool Label::allowColors = false
inherited

Definition at line 17 of file label.qh.

◆ allowCut

bool Label::allowCut = false
inherited

Definition at line 16 of file label.qh.

◆ allowFocusSound

bool Slider::allowFocusSound = true
inherited

Definition at line 24 of file slider.qh.

◆ allowWrap

bool Label::allowWrap = false
inherited

Definition at line 32 of file label.qh.

◆ allowWrap_spacing

float Label::allowWrap_spacing = 0
inherited

Definition at line 33 of file label.qh.

◆ alpha

float XonoticMixedSlider::alpha = SKINALPHA_TEXT
inherited

Definition at line 25 of file mixedslider.qh.

◆ animated

bool Slider::animated = true
inherited

Definition at line 26 of file slider.qh.

◆ color

vector XonoticMixedSlider::color = SKINCOLOR_SLIDER_N
inherited

Definition at line 14 of file mixedslider.qh.

◆ color2

vector XonoticMixedSlider::color2 = SKINCOLOR_SLIDER_S
inherited

Definition at line 18 of file mixedslider.qh.

◆ colorC

vector XonoticMixedSlider::colorC = SKINCOLOR_SLIDER_C
inherited

Definition at line 15 of file mixedslider.qh.

◆ colorD

vector XonoticMixedSlider::colorD = SKINCOLOR_SLIDER_D
inherited

Definition at line 17 of file mixedslider.qh.

◆ colorF

vector XonoticMixedSlider::colorF = SKINCOLOR_SLIDER_F
inherited

Definition at line 16 of file mixedslider.qh.

◆ colorL

vector Label::colorL = SKINCOLOR_TEXT
inherited

Definition at line 25 of file label.qh.

◆ condenseFactor

float Label::condenseFactor = 1
inherited

Definition at line 35 of file label.qh.

◆ controlWidth

float Slider::controlWidth = 0
inherited

Definition at line 38 of file slider.qh.

Referenced by mousePress().

◆ disabled

float Slider::disabled = 0
inherited

Definition at line 43 of file slider.qh.

Referenced by mousePress().

◆ disabledAlpha

float XonoticMixedSlider::disabledAlpha = SKINALPHA_DISABLED
inherited

Definition at line 26 of file mixedslider.qh.

◆ focusable

bool Slider::focusable = true
inherited

Definition at line 23 of file slider.qh.

◆ focused

bool MenuItem::focused = false
inherited

Definition at line 24 of file item.qh.

◆ fontSize

float XonoticMixedSlider::fontSize = SKINFONTSIZE_NORMAL
inherited

Definition at line 9 of file mixedslider.qh.

◆ formatString

string Slider::formatString = ""
inherited

Definition at line 36 of file slider.qh.

◆ have_s3tc

float XonoticPicmipSlider::have_s3tc = 0

Definition at line 8 of file slider_picmip.qh.

◆ image

string XonoticMixedSlider::image = SKINGFX_SLIDER
inherited

Definition at line 11 of file mixedslider.qh.

◆ isBold

bool Label::isBold = false
inherited

Definition at line 11 of file label.qh.

◆ keepspaceLeft

float Label::keepspaceLeft = 0
inherited

Definition at line 18 of file label.qh.

◆ keepspaceRight

float Label::keepspaceRight = 0
inherited

Definition at line 19 of file label.qh.

◆ marginLeft

float Label::marginLeft = 0
inherited

Definition at line 20 of file label.qh.

◆ marginRight

float Label::marginRight = 0
inherited

Definition at line 21 of file label.qh.

◆ nValues

int MixedSlider::nValues = 0
inherited

Definition at line 27 of file mixedslider.qh.

◆ origin

vector MenuItem::origin = '0 0 0'
inherited

Definition at line 29 of file item.qh.

Referenced by resizeNotify().

◆ overrideCondenseFactor

bool Label::overrideCondenseFactor = false
inherited

Definition at line 37 of file label.qh.

◆ overrideRealOrigin

vector Label::overrideRealOrigin = '0 0 0'
inherited

Definition at line 36 of file label.qh.

◆ preferredFocusPriority

float MenuItem::preferredFocusPriority = 0
inherited

Definition at line 28 of file item.qh.

◆ pressed

float Slider::pressed = 0
inherited

Definition at line 39 of file slider.qh.

Referenced by mousePress().

◆ pressOffset

float Slider::pressOffset = 0
inherited

Definition at line 40 of file slider.qh.

Referenced by mousePress().

◆ previousValue

float Slider::previousValue = 0
inherited

Definition at line 41 of file slider.qh.

Referenced by mousePress().

◆ realFontSize

vector Label::realFontSize = '0 0 0'
inherited

Definition at line 22 of file label.qh.

◆ realOrigin

vector Label::realOrigin = '0 0 0'
inherited

Definition at line 23 of file label.qh.

◆ recalcPos

bool Label::recalcPos = false
inherited

Definition at line 34 of file label.qh.

◆ sendCvars

float XonoticMixedSlider::sendCvars = 0
inherited

Definition at line 23 of file mixedslider.qh.

◆ size

vector MenuItem::size = '0 0 0'
inherited

Definition at line 30 of file item.qh.

Referenced by resizeNotify().

◆ sliderValue

float Slider::sliderValue = 0
inherited

Definition at line 27 of file slider.qh.

◆ tolerance

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

Definition at line 12 of file mixedslider.qh.

◆ value

float Slider::value = 0
inherited

Definition at line 25 of file slider.qh.

Referenced by mousePress().

◆ valueDigits

float Slider::valueDigits = 0
inherited

Definition at line 32 of file slider.qh.

◆ valueDisplayMultiplier

float Slider::valueDisplayMultiplier = 1.0
inherited

Definition at line 35 of file slider.qh.

◆ valueKeyStep

float Slider::valueKeyStep = 0
inherited

Definition at line 33 of file slider.qh.

◆ valueMax

float Slider::valueMax = 0
inherited

Definition at line 30 of file slider.qh.

Referenced by mousePress().

◆ valueMin

float Slider::valueMin = 0
inherited

Definition at line 29 of file slider.qh.

Referenced by mousePress().

◆ valueNumberIdentifiers

float MixedSlider::valueNumberIdentifiers[256]
inherited

Definition at line 22 of file mixedslider.qh.

◆ valuePageStep

float Slider::valuePageStep = 0
inherited

Definition at line 34 of file slider.qh.

Referenced by mousePress().

◆ valueSpace

float XonoticMixedSlider::valueSpace = SKINWIDTH_SLIDERTEXT
inherited

Definition at line 10 of file mixedslider.qh.

◆ valueStep

float Slider::valueStep = 0
inherited

Definition at line 31 of file slider.qh.

Referenced by mousePress().

◆ valueStrings

string MixedSlider::valueStrings[256]
inherited

Definition at line 21 of file mixedslider.qh.


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