mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-10-04 01:00:22 +00:00
NOISSUE WIP implementation of the ability to create instance shortcuts
Currently Linux-only and lacking some features
This commit is contained in:
40
launcher/ui/dialogs/CreateShortcutDialog.h
Normal file
40
launcher/ui/dialogs/CreateShortcutDialog.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright 2022 arthomnix
|
||||
*
|
||||
* This source is subject to the Microsoft Public License (MS-PL).
|
||||
* Please see the COPYING.md file for more information.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
#include "minecraft/auth/MinecraftAccount.h"
|
||||
#include "BaseInstance.h"
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class CreateShortcutDialog;
|
||||
}
|
||||
|
||||
class CreateShortcutDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CreateShortcutDialog(QWidget *parent = nullptr, InstancePtr instance = nullptr);
|
||||
~CreateShortcutDialog() override;
|
||||
|
||||
private
|
||||
slots:
|
||||
void on_shortcutPathBrowse_clicked();
|
||||
void updateDialogState();
|
||||
void accept() override;
|
||||
|
||||
private:
|
||||
Ui::CreateShortcutDialog *ui;
|
||||
InstancePtr m_instance;
|
||||
|
||||
QString getLaunchCommand();
|
||||
|
||||
void createShortcut();
|
||||
};
|
Reference in New Issue
Block a user