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 | |
@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.
| 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.
| 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.
| 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.
| 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.
| view.ui_elems.CreeperSlider.event |
| view.ui_elems.CreeperSlider.lin_max |
| view.ui_elems.CreeperSlider.lin_min |
| view.ui_elems.CreeperSlider.log_max |
| view.ui_elems.CreeperSlider.log_min |