/* * Kangaroo Punch MultiPlayer Game Server Mark II * Copyright (C) 2020-2021 Scott Duensing * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "welcome.h" #include "settings.h" #include "taglist.h" #include "task.h" #include "window.h" #include "picture.h" #include "button.h" static WindowT *winWelcome = NULL; static PictureT *picLogo = NULL; static ButtonT *btnQuit = NULL; static ButtonT *btnSettings = NULL; static ButtonT *btnConnect = NULL; static void btnConnectClick(WidgetT *widget); static void btnQuitClick(WidgetT *widget); static void btnSettingsClick(WidgetT *widget); static void btnConnectClick(WidgetT *widget) { (void)widget; } static void btnQuitClick(WidgetT *widget) { (void)widget; guiStop(); } static void btnSettingsClick(WidgetT *widget) { (void)widget; taskCreate(taskSettings, NULL); guiDelete(D(winWelcome)); } void taskWelcome(void *data) { (void)data; // 450x128 logo TagItemT uiWelcome[] = { T_START, T_WINDOW, O(winWelcome), T_TITLE, P("Welcome to KangaWorld!"), T_WIDTH, 500, T_HEIGHT, 225, T_PICTURE, O(picLogo), T_FILENAME, P("logo.png"), T_X, 18, T_Y, 18, T_PICTURE, T_DONE, T_BUTTON, O(btnQuit), T_TITLE, P("Quit"), T_X, 30, T_Y, 157, T_CLICK, P(btnQuitClick), T_BUTTON, T_DONE, T_BUTTON, O(btnSettings), T_TITLE, P("Settings"), T_X, 201, T_Y, 157, T_CLICK, P(btnSettingsClick), T_BUTTON, T_DONE, T_BUTTON, O(btnConnect), T_TITLE, P("Connect"), T_X, 379, T_Y, 157, T_CLICK, P(btnConnectClick), T_BUTTON, T_DONE, T_WINDOW, T_DONE, T_END }; tagListRun(uiWelcome); }