Skip to content
Snippets Groups Projects
Commit cbdfe79c authored by Matyáš Latner's avatar Matyáš Latner
Browse files

Merge branch 'feature-dialognew2' into 'V3.2.1'

#387 Fixed multiple click in yes/no dialog, which causes application fail.



See merge request !369
parents 6aca2679 6d1fc277
No related branches found
No related tags found
No related merge requests found
......@@ -107,7 +107,7 @@ public class TablexiaComponentDialogFactory implements Disposable {
adapters.add(new TextContentDialogComponent(text));
adapters.add(new ResizableSpaceContentDialogComponent());
adapters.add(new PositiveNegativeButtonContentDialogComponent(yesInputListener, noInputListener));
adapters.add(new PositiveNegativeButtonContentDialogComponent(yesInputListener,true, noInputListener, true));
adapters.add(new FixedSpaceContentDialogComponent(WARNING_DIALOG_BOT_PAD));
adapters.add(new AlertOnShowDialogComponent());
......
......@@ -49,6 +49,24 @@ public class PositiveNegativeButtonContentDialogComponent extends TwoButtonConte
this(yesInputListener, noInputListener, DEFAULT_POSITIVE_NEGATIVE_BUTTON_TYPE);
}
public PositiveNegativeButtonContentDialogComponent(InputListener yesInputListener, boolean yesButtonUseOnce, InputListener noInputListener, boolean noButtonUseOnce) {
this(yesInputListener, yesButtonUseOnce, noInputListener, noButtonUseOnce, DEFAULT_POSITIVE_NEGATIVE_BUTTON_TYPE);
}
public PositiveNegativeButtonContentDialogComponent(InputListener yesInputListener, boolean yesButtonUseOnce, InputListener noInputListener, boolean noButtonUseOnce, PositiveNegativeButtonType positiveNegativeButtonType) {
super( ApplicationTextManager.getInstance().getText(positiveNegativeButtonType.getNegativeText()),
ApplicationTextManager.getInstance().getText(positiveNegativeButtonType.getPositiveText()),
new Image(ApplicationInternalTextureManager.getInstance().getTexture(ApplicationInternalTextureManager.BUTTON_NO_ICON)),
new Image(ApplicationInternalTextureManager.getInstance().getTexture(ApplicationInternalTextureManager.BUTTON_YES_ICON)),
StandardTablexiaButton.TablexiaButtonType.RED,
yesButtonUseOnce,
StandardTablexiaButton.TablexiaButtonType.GREEN,
noButtonUseOnce,
noInputListener,
yesInputListener
);
}
public PositiveNegativeButtonContentDialogComponent(InputListener yesInputListener, InputListener noInputListener, PositiveNegativeButtonType positiveNegativeButtonType) {
super( ApplicationTextManager.getInstance().getText(positiveNegativeButtonType.getNegativeText()),
ApplicationTextManager.getInstance().getText(positiveNegativeButtonType.getPositiveText()),
......
......@@ -46,6 +46,21 @@ public class TwoButtonContentDialogComponent extends TwoColumnContentDialogCompo
protected boolean hasHideAnimation() {
return TablexiaComponentDialog.DEFAULT_HIDE_ANIMATION;
}
public TwoButtonContentDialogComponent(String firstButtonText,
String secondButtonText,
Image firstIcon,
Image secondIcon,
StandardTablexiaButton.TablexiaButtonType firstButtonType,
boolean firstUseOnce,
StandardTablexiaButton.TablexiaButtonType secondButtonType,
boolean secondUseOnce,
InputListener firstButtonInput,
InputListener secondButtonInput) {
this(firstButtonText,secondButtonText,firstIcon,secondIcon,firstButtonType,secondButtonType,firstButtonInput,secondButtonInput);
firstButton.useOnce(firstUseOnce);
secondButton.useOnce(secondUseOnce);
}
public TwoButtonContentDialogComponent(String firstButtonText,
String secondButtonText,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment