mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
use constants for defaults, use namespaces
This commit is contained in:
parent
ea30508f52
commit
a8b2fa0d23
15 changed files with 55 additions and 41 deletions
|
|
@ -8,19 +8,19 @@ abstract class Button
|
|||
{
|
||||
public \GtkButton $gtk;
|
||||
|
||||
protected bool $_sensitive = false;
|
||||
protected string $_label = 'Button';
|
||||
public const SENSITIVE = false;
|
||||
public const LABEL = 'Button';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->gtk = new \GtkButton;
|
||||
|
||||
$this->gtk->set_sensitive(
|
||||
$this->_sensitive
|
||||
$this::SENSITIVE
|
||||
);
|
||||
|
||||
$this->gtk->set_label(
|
||||
_($this->_label)
|
||||
_($this::LABEL)
|
||||
);
|
||||
|
||||
// Render
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue