Creepy-simulation
 
Loading...
Searching...
No Matches
view.ui_elems.CreeperSlider Class Reference
Inheritance diagram for view.ui_elems.CreeperSlider:
view.ui_elems.UiElement

Public Member Functions

 __init__ (self, app)
 
 linear_to_log (self, linear_value)
 
 log_to_linear (self, log_value)
 
 handel (self, event)
 
- Public Member Functions inherited from view.ui_elems.UiElement
 add_label (self, label)
 

Public Attributes

 lin_min
 
 lin_max
 
 log_min
 
 log_max
 
 event
 
- Public Attributes inherited from view.ui_elems.UiElement
 label
 
 event
 
 app
 

Detailed Description

@class CreeperSlider
@brief UI element for adjusting the number of creepers in the simulation.

The CreeperSlider provides a logarithmic slider for selecting the number of creepers,
with an associated label to display the current value.

Constructor & Destructor Documentation

◆ __init__()

view.ui_elems.CreeperSlider.__init__ (   self,
  app 
)
Initializes a CreeperSlider object.

@param app: The main application object managing the UI.

Reimplemented from view.ui_elems.UiElement.

Member Function Documentation

◆ handel()

view.ui_elems.CreeperSlider.handel (   self,
  event 
)
Handles events related to the slider.

Updates the creeper count in the application parameters.

@param event: The event to handle.

Reimplemented from view.ui_elems.UiElement.

◆ linear_to_log()

view.ui_elems.CreeperSlider.linear_to_log (   self,
  linear_value 
)
Converts a linear value to a logarithmic scale.

@param lin_value: The linear value to convert.
@return: The corresponding logarithmic value.

◆ log_to_linear()

view.ui_elems.CreeperSlider.log_to_linear (   self,
  log_value 
)
Converts a logarithmic value to a linear scale.

@param log_value: The logarithmic value to convert.
@return: The corresponding linear value.

Member Data Documentation

◆ event

view.ui_elems.CreeperSlider.event

◆ lin_max

view.ui_elems.CreeperSlider.lin_max

◆ lin_min

view.ui_elems.CreeperSlider.lin_min

◆ log_max

view.ui_elems.CreeperSlider.log_max

◆ log_min

view.ui_elems.CreeperSlider.log_min

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