![]() |
Bearsampp 2026.5.5
|
Public Member Functions | |
| __construct ($args) | |
| incrProgressBar ($nb=1) | |
| processLoading ($window, $id, $ctrl, $param1, $param2) | |
Data Fields | |
| const | GAUGE = 20 |
| const | WINDOW_HEIGHT = 90 |
| const | WINDOW_WIDTH = 360 |
Private Member Functions | |
| checkAllServicesStarted () | |
| updateLabelFromStatusFile () | |
| updateLoadingText ($text) | |
Private Attributes | |
| $wbLabel | |
| $wbProgressBar | |
| $wbWindow | |
Class ActionLoading
This class handles the loading action, including the creation and management of a progress bar window.
Definition at line 16 of file class.action.loading.php.
| __construct | ( | $args | ) |
ActionLoading constructor.
Initializes the loading action, creates the progress bar window, and starts the main loop.
| array | $args | The arguments passed to the constructor. |
Definition at line 43 of file class.action.loading.php.
References $bearsamppCore, $bearsamppLang, Log\error(), Win32Ps\getCurrentPid(), WinBinder\SYSINFO_WORKAREA, and Log\trace().
|
private |
Checks if all services have started successfully. Uses Win32Native\getServiceState() (WMI) directly instead of spawning a background PHP process and polling a temp file.
Definition at line 241 of file class.action.loading.php.
References $bearsamppBins, Win32Native\getServiceState(), Log\trace(), and updateLoadingText().
Referenced by processLoading().
| incrProgressBar | ( | $nb = 1 | ) |
Increments the progress bar by a specified number of steps.
| int | $nb | The number of steps to increment the progress bar by. Default is 1. |
Definition at line 110 of file class.action.loading.php.
References $bearsamppCore.
Referenced by processLoading().
| processLoading | ( | $window, | |
| $id, | |||
| $ctrl, | |||
| $param1, | |||
| $param2 ) |
Processes the loading action, including handling window events and updating the progress bar.
| mixed | $window | The window object. |
| int | $id | The ID of the event. |
| mixed | $ctrl | The control object. |
| mixed | $param1 | The first parameter of the event. |
| mixed | $param2 | The second parameter of the event. |
Definition at line 132 of file class.action.loading.php.
References $bearsamppRoot, checkAllServicesStarted(), Win32Ps\getCurrentPid(), incrProgressBar(), Win32Ps\kill(), Log\trace(), and updateLabelFromStatusFile().
|
private |
Updates the label text from status file if it exists This allows external processes to update the loading screen text dynamically
Definition at line 208 of file class.action.loading.php.
References $bearsamppCore, and $wbLabel.
Referenced by processLoading().
|
private |
Updates the loading text on the window
| string | $text | The text to display |
Definition at line 194 of file class.action.loading.php.
Referenced by checkAllServicesStarted().
|
private |
Definition at line 31 of file class.action.loading.php.
Referenced by updateLabelFromStatusFile().
|
private |
Definition at line 34 of file class.action.loading.php.
|
private |
Definition at line 28 of file class.action.loading.php.
| const GAUGE = 20 |
Definition at line 25 of file class.action.loading.php.
| const WINDOW_HEIGHT = 90 |
Definition at line 22 of file class.action.loading.php.
| const WINDOW_WIDTH = 360 |
Definition at line 19 of file class.action.loading.php.