diff --git a/src/editor/EditorMain.c b/src/editor/EditorMain.c index ef668de..f5620eb 100644 --- a/src/editor/EditorMain.c +++ b/src/editor/EditorMain.c @@ -1,4 +1,5 @@ #include +#include #include #include @@ -10,10 +11,10 @@ /** * Contains startup and setup routines for the Chroma Editor. */ -static int KernelID; +static KeyboardCallback KernelHandler; void StartEditor(int callbackID) { - KernelID = callbackID; + KernelHandler = KeyboardCallbacks[callbackID]; struct EditorLayout layout = (struct EditorLayout) {0}; layout.ScreenHeight = PrintInfo.screenHeight; @@ -21,7 +22,7 @@ void StartEditor(int callbackID) { layout.HeaderHeight = layout.ScreenHeight / 100 * 3; layout.TextBoxHeight = (layout.ScreenHeight - layout.HeaderHeight) / 100 * 95; - layout.TextBoxY = ((layout.ScreenHeight + - layout.HeaderHeight) - layout.TextBoxHeight) / 2; + layout.TextBoxY = ((layout.ScreenHeight + layout.HeaderHeight) - layout.TextBoxHeight) / 2; layout.TextBoxWidth = layout.ScreenWidth / 100 * 95; layout.TextBoxX = (layout.ScreenWidth - layout.TextBoxWidth) / 2;