-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
244 additions
and
3 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
docs/VirtualAnatomy/ExplorerLevel/UI/ReusableSliders/SlideBarParmaters.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# SlideBarsParameters.h | ||
|
||
## Overview | ||
This file defines the structures and enumerations used for controlling global simulation parameters and camera sensitivity settings via sliders. It includes functions for manipulating the simulation speed and scale, as well as adjusting camera movement and zoom sensitivities. | ||
|
||
--- | ||
|
||
## Enumerations | ||
|
||
### ESimulationParamToChange | ||
An enumeration for the parameters that can be changed via sliders in the simulation. | ||
|
||
- **Speed**: Represents the speed of the simulation. | ||
- **ScaleFactor**: Represents the scaling factor that affects the speed of the simulation. | ||
|
||
### ESensitivityOf | ||
An enumeration for different types of camera sensitivity settings. | ||
|
||
- **CAMERA_MOVEMENT**: Represents the sensitivity of camera movement. | ||
- **CAMERA_ZOOM**: Represents the sensitivity of camera zoom. | ||
|
||
--- | ||
|
||
## Structs | ||
|
||
### FSimulationSlideBarsParameters | ||
Represents the global parameters of the simulation that are controlled by sliders. | ||
|
||
#### Members: | ||
- **float Speed**: The speed of the simulation, determining how long it takes the cell to complete one full cycle. | ||
- **float ScaleFactor**: A scaling factor applied to adjust the simulation speed, controlled by a slider. | ||
|
||
#### Functions: | ||
- **float GetSimulationSpeed() const**: Returns the actual speed of the simulation, calculated as `Speed * ScaleFactor`. | ||
|
||
- **float& GetFieldToChangeBySlider(ESimulationParamToChange paramToChange)**: Returns a reference to the field of the struct that the slider should change. The parameter `paramToChange` determines whether the slider will adjust `Speed` or `ScaleFactor`. | ||
|
||
--- | ||
|
||
### FCameraSensitivitySettings | ||
Represents the sensitivity settings for the camera, including movement and zoom sensitivity. | ||
|
||
#### Members: | ||
- **float CameraMovementSensitivity**: Default value for camera movement sensitivity (default: 1000.0f). | ||
- **float CameraZoomSensitivity**: Default value for camera zoom sensitivity (default: 1600.0f). | ||
- **float SliderValueForCameraMovement**: Slider value for camera movement sensitivity (default: 1.0f). | ||
- **float SliderValueForCameraZoom**: Slider value for camera zoom sensitivity (default: 1.0f). | ||
|
||
#### Functions: | ||
- **float& GetSensitivityOf(ESensitivityOf sensitivityOf)**: Returns a reference to the specified sensitivity setting. The `sensitivityOf` parameter can be `CAMERA_MOVEMENT` or `CAMERA_ZOOM`. | ||
|
||
- **float& GetSliderValueFor(ESensitivityOf sensitivityOf)**: Returns a reference to the slider value for the specified sensitivity setting. The `sensitivityOf` parameter can be `CAMERA_MOVEMENT` or `CAMERA_ZOOM`. | ||
|
||
--- | ||
|
||
## Error Handling | ||
- In `GetFieldToChangeBySlider` and `GetSensitivityOf`, if an invalid parameter is passed (i.e., an unknown enum value), an error message is logged using `UE_LOG`. |
2 changes: 1 addition & 1 deletion
2
docs/VirtualAnatomy/ExplorerLevel/UI/UIClasses/ClickedOnInfo.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Clicked on info | ||
# `UCPP_ClickedOnInfo` | ||
|
||
## Class Description | ||
|
||
|
61 changes: 61 additions & 0 deletions
61
docs/VirtualAnatomy/ExplorerLevel/UI/UIClasses/SettingsSlider.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# `UCPP_SettingsSlider` | ||
|
||
## Class Description | ||
|
||
**UCPP_SettingsSlider**: | ||
|
||
This class represents a slider in the settings page of the application. Unlike traditional sliders that allow for a full range of values, this slider provides predefined steps for the user to choose from. This design is intended to prevent excessive steps that may confuse the user and streamline the process of adjusting settings. The slider is used to modify specific settings related to the user interface and controls, such as camera sensitivity. | ||
|
||
## Public Properties | ||
|
||
### `TObjectPtr<USlider> MainSlider` | ||
|
||
**Description**: | ||
|
||
The main slider widget that allows the user to adjust a setting. The user can select from predefined steps instead of freely adjusting the value within a continuous range. | ||
|
||
--- | ||
|
||
### `ESensitivityOf SensitivityOf` | ||
|
||
**Description**: | ||
|
||
This enum specifies which aspect of sensitivity the slider controls (e.g., camera movement sensitivity or zoom sensitivity). It helps define the specific setting that the slider will modify. | ||
|
||
--- | ||
|
||
## Public Methods | ||
|
||
### `void OnSliderMouseReleaseHandle()` | ||
|
||
**Description**: | ||
|
||
This function handles the event when the user releases the mouse after adjusting the slider. It is used to update the setting based on the selected value. | ||
|
||
--- | ||
|
||
## Protected Methods | ||
|
||
### `virtual void NativeConstruct() override` | ||
|
||
**Description**: | ||
|
||
Called after the widget is constructed. This function is used to perform any further setup after the widget is initialized and ready to be displayed. | ||
|
||
--- | ||
|
||
### `virtual void NativePreConstruct() override` | ||
|
||
**Description**: | ||
|
||
Called before the widget is constructed. This function can be used for any setup that needs to occur before the widget is fully created and displayed. | ||
|
||
--- | ||
|
||
## Private Members | ||
|
||
### `UCPP_GameInstance* GameInstanceRef` | ||
|
||
**Description**: | ||
|
||
A reference to the `UCPP_GameInstance` class, which manages global game settings. This is used to retrieve or modify the settings that the slider controls. |
2 changes: 1 addition & 1 deletion
2
docs/VirtualAnatomy/ExplorerLevel/UI/UIClasses/SimulationButton.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Simulation button | ||
# `UCPP_SimulationButton` | ||
|
||
|
||
## Public Methods | ||
|
2 changes: 1 addition & 1 deletion
2
docs/VirtualAnatomy/ExplorerLevel/UI/UIClasses/SimulationIsland.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
## Class Description | ||
# `UCPP_SimulationIsland` | ||
|
||
**UCPP_SimulationIsland**: | ||
|
||
|
123 changes: 123 additions & 0 deletions
123
docs/VirtualAnatomy/ExplorerLevel/UI/UIClasses/SimulationSlideBar.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# `UCPP_SimulationSlideBar` | ||
|
||
## Class Description | ||
|
||
**UCPP_SimulationSlideBar**: | ||
|
||
This widget is responsible for creating and managing sliders that allow the user to control simulation parameters, such as speed and other user-defined properties. The slider adjusts global simulation parameters and sends updates to the simulation flow. It provides a user-friendly interface to control the flow of the simulation in real-time. | ||
|
||
## Public Properties | ||
|
||
### `TObjectPtr<UTextBlock> SliderHeader` | ||
|
||
**Description**: | ||
|
||
A text block that displays the header for the slider, typically showing what parameter the slider controls. | ||
|
||
--- | ||
|
||
### `FString SliderHeaderValue` | ||
|
||
**Description**: | ||
|
||
The value of the header text. This is a bindable property to allow dynamic changes to the header text. | ||
|
||
--- | ||
|
||
### `TObjectPtr<UTextBlock> MaxValueTextBlock` | ||
|
||
**Description**: | ||
|
||
A text block that displays the maximum value for the slider. It is used to give the user context about the range of values the slider can take. | ||
|
||
--- | ||
|
||
### `FString MaxValue` | ||
|
||
**Description**: | ||
|
||
A string that represents the maximum value the slider can have. This value is used to display the maximum limit to the user. | ||
|
||
--- | ||
|
||
### `TObjectPtr<UTextBlock> MinValueTextBlock` | ||
|
||
**Description**: | ||
|
||
A text block that displays the minimum value for the slider. It is used to give the user context about the range of values the slider can take. | ||
|
||
--- | ||
|
||
### `FString MinValue` | ||
|
||
**Description**: | ||
|
||
A string that represents the minimum value the slider can have. This value is used to display the minimum limit to the user. | ||
|
||
--- | ||
|
||
### `TObjectPtr<USlider> MainSlider` | ||
|
||
**Description**: | ||
|
||
The main slider widget that allows the user to interact with the parameter values. It is used to adjust the value of the specified parameter. | ||
|
||
--- | ||
|
||
### `TObjectPtr<UImage> TooltipImage` | ||
|
||
**Description**: | ||
|
||
An image widget that provides a tooltip or visual indication for the slider. It helps the user understand what the slider controls. | ||
|
||
--- | ||
|
||
### `FString ToolTipValue` | ||
|
||
**Description**: | ||
|
||
A string that represents the tooltip text associated with the slider. This is displayed to help guide the user about the function of the slider. | ||
|
||
--- | ||
|
||
### `ESimulationParamToChange ParameterToChange` | ||
|
||
**Description**: | ||
|
||
This enum specifies what parameter inside the `FSimulationSlideBarsParameters` struct will be changed by this slider. It allows the slider to affect different properties, such as speed or scale factor, depending on the enum selection. | ||
|
||
--- | ||
|
||
## Protected Methods | ||
|
||
### `virtual void NativePreConstruct() override` | ||
|
||
**Description**: | ||
|
||
Called before the widget is constructed. This function can be used for any initial setup before the widget is displayed. | ||
|
||
--- | ||
|
||
### `virtual void NativeConstruct() override` | ||
|
||
**Description**: | ||
|
||
Called after the widget has been constructed. This function is typically used for further setup or initialization that requires the widget to be fully created. | ||
|
||
--- | ||
|
||
### `UFUNCTION() void HandleSliderRelease()` | ||
|
||
**Description**: | ||
|
||
Handles the slider's value release event. It is triggered when the user releases the slider after adjusting its value. | ||
|
||
--- | ||
|
||
## Private Members | ||
|
||
### `TObjectPtr<UCPP_SimulationManager> SimulationManager` | ||
|
||
**Description**: | ||
|
||
A pointer to the `UCPP_SimulationManager` that manages the simulation. It is used to update the simulation parameters based on the slider's value. |