Remove KeyboardInputComponent and add file upload and WebSocket support
Deleted unused `KeyboardInputComponent`. Added file upload functionality to `MainView` with WebSocket event handling. Introduced `WebsocketClient` class for managing server connection and file transmission. Enhanced `KeyboardComponent` with configurable key rounding. Updated `WebsocketHandler` for improved binary message handling and storage.
This commit is contained in:
@@ -38,6 +38,7 @@ class KeyboardComponent(
|
||||
initialOctave: Int = 4,
|
||||
val keyboardWidth: Int = 210,
|
||||
val keyboardHeight: Int = keyboardWidth / 2,
|
||||
val rounding: Int = 4,
|
||||
val onNoteDown: (Int) -> Unit = {},
|
||||
val onNoteUp: (Int) -> Unit = {}
|
||||
) : Komponent() {
|
||||
@@ -222,7 +223,7 @@ class KeyboardComponent(
|
||||
0,
|
||||
whiteKeyWidth,
|
||||
keyboardHeight,
|
||||
0,
|
||||
rounding,
|
||||
if (isPressed) WhiteKeyPressedCls.name else WhiteKeyCls.name
|
||||
)
|
||||
}
|
||||
@@ -238,7 +239,7 @@ class KeyboardComponent(
|
||||
0,
|
||||
blackKeyWidth,
|
||||
blackKeyHeight,
|
||||
0,
|
||||
rounding,
|
||||
if (isPressed) BlackKeyPressedCls.name else BlackKeyCls.name
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user