Skip to content
Snippets Groups Projects
Commit 7294c1c2 authored by Vitaliy Vashchenko's avatar Vitaliy Vashchenko
Browse files

#558 Added a dialog before displaying a QRScanner.

parent 28781fd9
Branches
No related merge requests found
......@@ -229,6 +229,6 @@ sync_request_button=Synchronizovat uživatele
sync_request_wrong_id=Špatně zadaný kód.
sync_request_error=Synchronizace se nezdařila, zkuste to prosím později.
sync_qr_request_button=Synchronizovat uživatele (QR)
sync_qr_request_info_dialog_text = Umístěte kameru tak, aby QR Code byl uvnitř lupy
sync_qr_request_info_dialog_text = Umístěte kameru tak, aby QR Code byl uprostřed obrazovky.
sync_qr_request_on_decoded_dialog_text = Dekódovaná zpráva\:
......@@ -229,7 +229,7 @@ sync_request_button=Account synchronisieren
sync_request_wrong_id=Falsch geschriebener Code.
sync_request_error=Die synchronisierung ist fehlgeschlagen, bitte versuche es später noch einmal.
sync_qr_request_button=Account synchronisieren (QR)
sync_qr_request_info_dialog_text=Positionieren Sie die Kamera so, dass der QR-Code innerhalb der Lupe ist.
sync_qr_request_info_dialog_text=Positionieren Sie die Kamera so, dass der QR-Code innerhalb der Mitte des Bildschirms.
sync_qr_request_on_decoded_dialog_text=Die decodierte Nachricht\:
......@@ -231,6 +231,6 @@ sync_request_button=Synchronizovať užívateľa
sync_request_wrong_id=Zle zadaný kód.
sync_request_error=Synchronizácia sa nepodarila, skúste to prosím neskôr.
sync_qr_request_button=Synchronizovať užívateľa (QR)
sync_qr_request_info_dialog_text=Umiestnite kameru tak, aby bol QR kód vo vnútri lupy.
sync_qr_request_info_dialog_text=Umiestnite kameru tak, aby bol QR kód uprostred obrazovky.
sync_qr_request_on_decoded_dialog_text=Dekódovaný obsah\:
......@@ -222,7 +222,30 @@ public class UserMenu extends AbstractMenu {
qrCodeSync.addListener(new ClickListenerWithSound() {
@Override
public void onClick(InputEvent event, float x, float y) {
qrCodeSync.performAction();
TablexiaComponentDialogFactory.getInstance().createDialog(
new CenterPositionDialogComponent(),
new DimmerDialogComponent(),
new ViewportMaximumSizeComponent(),
new AdaptiveSizeDialogComponent(),
new ResizableSpaceContentDialogComponent(),
new TextContentDialogComponent(ApplicationTextManager.getInstance().getText(ApplicationTextManager.ApplicationTextsAssets.SYNC_QR_REQUEST_INFO_DIALOG_TEXT)),
new ResizableSpaceContentDialogComponent(),
new TwoButtonContentDialogComponent(ApplicationTextManager.getInstance().getText(ApplicationTextManager.ApplicationTextsAssets.SYSTEM_BACK),
ApplicationTextManager.getInstance().getText(ApplicationTextManager.ApplicationTextsAssets.SYSTEM_PROCEED),
StandardTablexiaButton.TablexiaButtonType.RED, StandardTablexiaButton.TablexiaButtonType.GREEN, null,
new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
qrCodeSync.performAction();
}
}),
new AlertOnShowDialogComponent(),
new AdaptiveSizeDialogComponent(),
new CenterPositionDialogComponent(),
new BackButtonHideComponent()
).show(SYNC_REQUEST_DIALOG_WIDTH,SYNC_REQUEST_DIALOG_HEIGHT);
}
});
menuItemsLayout.addActor(qrCodeSync);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment