this is done

This commit is contained in:
John Bintz 2022-10-07 07:35:49 -04:00
parent 161136cd57
commit 580bdaa245
2 changed files with 29 additions and 8 deletions

BIN
main

Binary file not shown.

37
main.c
View File

@ -63,8 +63,8 @@ struct Screen *screen;
struct Window *window;
struct Gadget *windowGadgets;
#define ABOUT_WINDOW_WIDTH (240)
#define ABOUT_WINDOW_HEIGHT (50)
#define ABOUT_WINDOW_WIDTH (350)
#define ABOUT_WINDOW_HEIGHT (75)
struct NewWindow aboutWindowLayout = {
40, 40,
@ -247,8 +247,8 @@ struct Gadget *buildUI(void) {
// http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_3._guide/node0274.html
currentGadget = CreateContext(&glist);
ng.ng_LeftEdge = WINDOW_CHROME_WIDTH;
ng.ng_TopEdge = 11;
ng.ng_LeftEdge = window->BorderLeft;
ng.ng_TopEdge = window->BorderTop;
ng.ng_Height = 12;
ng.ng_Width = 0;
ng.ng_GadgetText = NULL;
@ -259,7 +259,7 @@ struct Gadget *buildUI(void) {
ng.ng_Flags = PLACETEXT_IN;
// Timer display
ng.ng_Width = WINDOW_WIDTH - WINDOW_CHROME_WIDTH * 2;
ng.ng_Width = window->Width - window->BorderLeft - window->BorderRight;
ng.ng_TextAttr = &Topaz160;
ng.ng_Height = 20;
@ -276,7 +276,7 @@ struct Gadget *buildUI(void) {
ng.ng_Height = 12;
// start/stop button
ng.ng_Width = (WINDOW_WIDTH - WINDOW_CHROME_WIDTH * 2) / 2;
ng.ng_Width = (window->Width - window->BorderLeft - window->BorderRight) / 2;
ng.ng_TopEdge += 18;
if (timerIsRunning) {
ng.ng_GadgetText = "_Stop";
@ -295,7 +295,7 @@ struct Gadget *buildUI(void) {
);
// reset button
ng.ng_LeftEdge += (WINDOW_WIDTH - WINDOW_CHROME_WIDTH * 2) / 2;
ng.ng_LeftEdge += ng.ng_Width; // lol reuse it
ng.ng_GadgetText = "_Reset";
ng.ng_GadgetID = RESET_BUTTON_ID;
@ -310,7 +310,7 @@ struct Gadget *buildUI(void) {
// hours slider
ng.ng_LeftEdge = 85;
ng.ng_Width = (WINDOW_WIDTH - WINDOW_CHROME_WIDTH * 2) - 85 + 4;
ng.ng_Width = window->Width - window->BorderLeft - window->BorderRight - ng.ng_LeftEdge + 4;
ng.ng_TopEdge += 12;
// The level is also displayed to the left of the slider by default.
// We need to leave space for its rendering, which is done separately
@ -580,6 +580,26 @@ int openAboutWindow(void) {
TAG_DONE
);
ng.ng_TopEdge += 15;
currentGadget = CreateGadget(
TEXT_KIND,
currentGadget,
&ng,
GTTX_Text, "Sound: Reception bell by cdrk (CC-BY 4.0)",
GTTX_CopyText, TRUE,
TAG_DONE
);
ng.ng_TopEdge += 10;
currentGadget = CreateGadget(
TEXT_KIND,
currentGadget,
&ng,
GTTX_Text, "freesound.org/people/cdrk/sounds/264594/",
GTTX_CopyText, TRUE,
TAG_DONE
);
AddGList(aboutWindow, glist, -1, -1, NULL);
RefreshGList(glist, aboutWindow, NULL, -1);
GT_RefreshWindow(aboutWindow, NULL);
@ -855,6 +875,7 @@ int main() {
handleTimerMessage();
}
// open up the about menu outside of event handling
if (openAboutWindowNext) {
if (openAboutWindow()) terminated = TRUE;