mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-20 13:17:54 -06:00
GUI text boxes for start/end GCODE. #12
This commit is contained in:
parent
b2f0f85d96
commit
60f6ce363e
3 changed files with 23 additions and 2 deletions
|
@ -23,8 +23,17 @@ sub new {
|
|||
my $label = Wx::StaticText->new($parent, -1, "$opt->{label}:", Wx::wxDefaultPosition, [180,-1]);
|
||||
$label->Wrap(180); # needed to avoid Linux/GTK bug
|
||||
my $field;
|
||||
if ($opt->{type} =~ /^(i|f)$/) {
|
||||
$field = Wx::TextCtrl->new($parent, -1, Slic3r::Config->get($opt_key));
|
||||
if ($opt->{type} =~ /^(i|f|s)$/) {
|
||||
my $style = 0;
|
||||
my $size = Wx::wxDefaultSize;
|
||||
|
||||
if ($opt->{multiline}) {
|
||||
$style = &Wx::wxTE_MULTILINE;
|
||||
$size = Wx::Size->new($opt->{width} || -1, $opt->{height} || -1);
|
||||
}
|
||||
|
||||
$field = Wx::TextCtrl->new($parent, -1, Slic3r::Config->get($opt_key),
|
||||
Wx::wxDefaultPosition, $size, $style);
|
||||
EVT_TEXT($parent, $field, sub { Slic3r::Config->set($opt_key, $field->GetValue) });
|
||||
push @reload_callbacks, sub { $field->SetValue(Slic3r::Config->get($opt_key)) };
|
||||
} elsif ($opt->{type} eq 'bool') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue