refractor: DeltaruneQuickshell -> Shell
31
Shell/DialogBox/DialogBox.qml
Normal file
@@ -0,0 +1,31 @@
|
||||
import QtQuick
|
||||
|
||||
Item {
|
||||
id: dialogboxroot
|
||||
implicitHeight: 378
|
||||
implicitWidth: 1334
|
||||
readonly property int text_x: 350 - 275
|
||||
readonly property int text_y: 55
|
||||
readonly property int font_size: 48
|
||||
property string text: "(The power of Hyprland shines within you...)"
|
||||
|
||||
Image {
|
||||
source: "./frame.png"
|
||||
}
|
||||
Text {
|
||||
text: dialogboxroot.text
|
||||
font.family: "8-bit Operator+"
|
||||
font.pixelSize: dialogboxroot.font_size
|
||||
color: "#04047C"
|
||||
x: dialogboxroot.text_x + 2
|
||||
y: dialogboxroot.text_y + 2
|
||||
}
|
||||
Text {
|
||||
text: dialogboxroot.text
|
||||
font.family: "8-bit Operator+"
|
||||
font.pixelSize: dialogboxroot.font_size
|
||||
color: "#ffffff"
|
||||
x: dialogboxroot.text_x
|
||||
y: dialogboxroot.text_y
|
||||
}
|
||||
}
|
||||
BIN
Shell/DialogBox/frame.png
Normal file
|
After Width: | Height: | Size: 1.5 MiB |
11
Shell/Healthbar/Healthbar.qml
Normal file
@@ -0,0 +1,11 @@
|
||||
import QtQuick
|
||||
|
||||
Item {
|
||||
implicitWidth: 479
|
||||
implicitHeight: 137
|
||||
anchors.centerIn: parent
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
source: "kris.png"
|
||||
}
|
||||
}
|
||||
BIN
Shell/Healthbar/kris.png
Normal file
|
After Width: | Height: | Size: 257 KiB |
0
Shell/Settings/SettingsWindow.qml
Normal file
75
Shell/Topbar/Topbar.qml
Normal file
@@ -0,0 +1,75 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
|
||||
import "topbar"
|
||||
|
||||
Item {
|
||||
id: topbar
|
||||
implicitWidth: 1312
|
||||
implicitHeight: 182
|
||||
anchors.centerIn: parent
|
||||
|
||||
property var iconSources: ["item.png", "equip.png", "power.png", "config.png"]
|
||||
property int iconCount: iconSources.length
|
||||
property int selectedIndex: 0
|
||||
|
||||
function moveSelection(delta) {
|
||||
if (iconCount <= 0)
|
||||
return;
|
||||
selectedIndex = (selectedIndex + delta + iconCount) % iconCount;
|
||||
}
|
||||
|
||||
onIconCountChanged: {
|
||||
if (iconCount <= 0) {
|
||||
selectedIndex = 0;
|
||||
} else if (selectedIndex >= iconCount) {
|
||||
selectedIndex = iconCount - 1;
|
||||
}
|
||||
}
|
||||
|
||||
DarkDollarsDisplay {}
|
||||
|
||||
Image {
|
||||
source: "./topbar/setting_names/" + topbar.iconSources[topbar.selectedIndex]
|
||||
}
|
||||
|
||||
FocusScope {
|
||||
id: focusScope
|
||||
focus: true
|
||||
anchors.fill: parent
|
||||
Keys.onLeftPressed: topbar.moveSelection(-1)
|
||||
Keys.onRightPressed: topbar.moveSelection(1)
|
||||
Component.onCompleted: forceActiveFocus()
|
||||
|
||||
Row {
|
||||
id: iconRow
|
||||
spacing: 76
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 45
|
||||
|
||||
Repeater {
|
||||
model: topbar.iconSources
|
||||
|
||||
delegate: Item {
|
||||
id: repeatitem
|
||||
required property int index
|
||||
width: 149
|
||||
height: 108
|
||||
|
||||
TopbarSettingIcon {
|
||||
anchors.centerIn: parent
|
||||
selected: topbar.selectedIndex == repeatitem.index
|
||||
iconSource: topbar.iconSources[repeatitem.index]
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
topbar.selectedIndex = repeatitem.index;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
28
Shell/Topbar/topbar/DarkDollarsDisplay.qml
Normal file
@@ -0,0 +1,28 @@
|
||||
import QtQuick
|
||||
|
||||
// import Quickshell
|
||||
|
||||
Item {
|
||||
Text {
|
||||
x: 1064 + 117
|
||||
y: 37 + 9
|
||||
color: "#ffffff"
|
||||
text: "D$ 4294"
|
||||
font.pixelSize: 64
|
||||
font.family: "8bitoperator JVE"
|
||||
}
|
||||
|
||||
// SystemClock {
|
||||
// id: clock
|
||||
// precision: SystemClock.Minutes
|
||||
// }
|
||||
|
||||
// Text {
|
||||
// x: 1064 + 117
|
||||
// y: 37 + 9 + 64
|
||||
// color: "#777777"
|
||||
// text: Qt.formatDateTime(clock.date, "dd/MM - hh:mm")
|
||||
// font.pixelSize: 32
|
||||
// font.family: "8bitoperator JVE"
|
||||
// }
|
||||
}
|
||||
34
Shell/Topbar/topbar/TopbarSettingIcon.qml
Normal file
@@ -0,0 +1,34 @@
|
||||
import QtQuick
|
||||
import Qt5Compat.GraphicalEffects
|
||||
|
||||
Item {
|
||||
id: item
|
||||
implicitWidth: 149
|
||||
implicitHeight: 108
|
||||
property url iconSource: "settings.png"
|
||||
property bool selected: false
|
||||
property bool showSoul: true
|
||||
readonly property color selectedColor: "#ffc90e"
|
||||
readonly property color unselectedColor: "#614e6b"
|
||||
state: selected ? "selected" : ""
|
||||
|
||||
Image {
|
||||
id: originalImage
|
||||
source: "./setting_icons/" + item.iconSource
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
id: colorOverlay
|
||||
anchors.fill: originalImage
|
||||
source: originalImage
|
||||
color: item.selected ? item.selectedColor : item.unselectedColor
|
||||
}
|
||||
|
||||
Image {
|
||||
id: soul
|
||||
source: "./soul_small.png"
|
||||
x: 19
|
||||
y: 42
|
||||
visible: item.showSoul && item.selected
|
||||
}
|
||||
}
|
||||
BIN
Shell/Topbar/topbar/setting_icons/config.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
Shell/Topbar/topbar/setting_icons/equip.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
Shell/Topbar/topbar/setting_icons/item.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
Shell/Topbar/topbar/setting_icons/power.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
Shell/Topbar/topbar/setting_names/config.png
Normal file
|
After Width: | Height: | Size: 162 KiB |
BIN
Shell/Topbar/topbar/setting_names/equip.png
Normal file
|
After Width: | Height: | Size: 162 KiB |
BIN
Shell/Topbar/topbar/setting_names/item.png
Normal file
|
After Width: | Height: | Size: 162 KiB |
BIN
Shell/Topbar/topbar/setting_names/power.png
Normal file
|
After Width: | Height: | Size: 162 KiB |
BIN
Shell/Topbar/topbar/soul_small.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
47
Shell/WLRLayerDialogBox.qml
Normal file
@@ -0,0 +1,47 @@
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Io
|
||||
import "DialogBox"
|
||||
|
||||
PanelWindow {
|
||||
id: baseDialog
|
||||
anchors {
|
||||
bottom: true
|
||||
}
|
||||
property bool isOpen: false
|
||||
property string text: "(The power of Hyprland\nshines within you.)"
|
||||
|
||||
WlrLayershell.layer: WlrLayer.Overlay
|
||||
WlrLayershell.focusable: false
|
||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
|
||||
WlrLayershell.namespace: "deltarune-quickshell-dialogbox"
|
||||
|
||||
visible: isOpen
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
aboveWindows: true
|
||||
focusable: false
|
||||
|
||||
mask: Region {}
|
||||
|
||||
implicitHeight: 378
|
||||
implicitWidth: 1334 - 147
|
||||
color: '#000000ff'
|
||||
|
||||
DialogBox {
|
||||
text: baseDialog.text
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "deltarune.dialog"
|
||||
enabled: true
|
||||
function open(): void {
|
||||
baseDialog.isOpen = true;
|
||||
}
|
||||
function close(): void {
|
||||
baseDialog.isOpen = false;
|
||||
}
|
||||
function setText(text: string): void {
|
||||
baseDialog.text = text.replace("\\n", "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
26
Shell/WLRLayerHealthbar.qml
Normal file
@@ -0,0 +1,26 @@
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import "Healthbar"
|
||||
|
||||
PanelWindow {
|
||||
anchors {
|
||||
left: true
|
||||
right: true
|
||||
bottom: true
|
||||
}
|
||||
|
||||
WlrLayershell.layer: WlrLayer.Top
|
||||
WlrLayershell.namespace: "deltarune-quickshell-bottom"
|
||||
|
||||
visible: true
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
aboveWindows: true
|
||||
focusable: false
|
||||
|
||||
mask: Region {}
|
||||
|
||||
implicitHeight: 137
|
||||
color: "#000000"
|
||||
|
||||
Healthbar {}
|
||||
}
|
||||
29
Shell/WLRLayerTopbar.qml
Normal file
@@ -0,0 +1,29 @@
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
|
||||
import "Topbar"
|
||||
|
||||
PanelWindow {
|
||||
anchors {
|
||||
top: true
|
||||
left: true
|
||||
right: true
|
||||
}
|
||||
|
||||
WlrLayershell.layer: WlrLayer.Top
|
||||
WlrLayershell.focusable: true
|
||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
|
||||
WlrLayershell.namespace: "deltarune-quickshell"
|
||||
|
||||
mask: Region {}
|
||||
|
||||
visible: true
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
aboveWindows: true
|
||||
focusable: true
|
||||
|
||||
implicitHeight: 182
|
||||
color: "#000000"
|
||||
|
||||
Topbar {}
|
||||
}
|
||||
BIN
Shell/border.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |