Revision dd1ab30b
Von Sven Schöling vor etwa 7 Jahren hinzugefügt
SL/Layout/ActionBar/Action.pm | ||
---|---|---|
24 | 24 |
sub from_descriptor { |
25 | 25 |
my ($class, $descriptor) = @_; |
26 | 26 |
require SL::Layout::ActionBar::Separator; |
27 |
require SL::Layout::ActionBar::ComboBox; |
|
27 | 28 |
|
28 |
{ |
|
29 |
return {
|
|
29 | 30 |
separator => SL::Layout::ActionBar::Separator->new, |
30 |
} or die 'unknown descriptor'; |
|
31 |
combobox => SL::Layout::ActionBar::ComboBox->new, |
|
32 |
}->{$descriptor} or die 'unknown descriptor'; |
|
31 | 33 |
} |
32 | 34 |
|
33 | 35 |
# TODO: this necessary? |
... | ... | |
46 | 48 |
return SL::Layout::ActionBar::ScriptButton->new(text => $text, params => \%params); |
47 | 49 |
} |
48 | 50 |
|
49 |
if ($params{combobox}) { |
|
50 |
|
|
51 |
if ($params{actions}) { |
|
52 |
require SL::Layout::ActionBar::ComboBox; |
|
53 |
return SL::Layout::ActionBar::ComboBox->new(text => $text, %params); |
|
51 | 54 |
} |
52 | 55 |
} |
53 | 56 |
|
Auch abrufbar als: Unified diff
ActionBar: by_description gefixt