add some contents to the main menu

This commit is contained in:
Lephenixnoir 2020-07-25 10:37:07 +02:00
parent fd94704d0c
commit f8a880bc8a
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
9 changed files with 47 additions and 9 deletions

View File

@ -2,7 +2,7 @@
# toolchain file and module path of the fxSDK
cmake_minimum_required(VERSION 3.18)
project(MyAddin)
project(MystNB)
include(GenerateG1A)
include(GenerateG3A)
@ -18,7 +18,9 @@ set(ASSETS
# ...
)
set(ASSETS_fx
assets-fx/example.png
assets-fx/levels.png
assets-fx/title.png
assets-fx/font_mystere.png
# ...
)
set(ASSETS_cg
@ -33,9 +35,9 @@ target_compile_options(myaddin PRIVATE -Wall -Wextra -Os)
target_link_libraries(myaddin Gint::Gint)
if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G)
generate_g1a(TARGET myaddin OUTPUT "MyAddin.g1a"
NAME "MyAddin" ICON assets-fx/icon.png)
generate_g1a(TARGET myaddin OUTPUT "MystNB.g1a"
NAME "MystNB" ICON assets-fx/icon.png)
elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
generate_g3a(TARGET myaddin OUTPUT "MyAddin.g3a"
NAME "MyAddin" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
generate_g3a(TARGET myaddin OUTPUT "MystNB.g3a"
NAME "MystNB" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
endif()

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

BIN
assets-fx/font_mystere.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -1,3 +1,16 @@
example.png:
levels.png:
type: bopti-image
name: img_example
name: img_levels
title.png:
type: bopti-image
name: img_title
font_mystere.png:
type: font
name: font_mystere
charset: print
grid.size: 5x7
grid.padding: 1
proportional: true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
assets-fx/levels.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

BIN
assets-fx/title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

View File

@ -3,8 +3,31 @@
int main(void)
{
extern bopti_image_t img_title;
extern bopti_image_t img_levels;
extern font_t font_mystere;
dfont(&font_mystere);
dclear(C_WHITE);
dtext(1, 1, C_BLACK, "Sample fxSDK add-in.");
dimage(0, 2, &img_title);
for(int i = 1; i <= 8; i++)
{
int x = 20 + 11*(i-1);
int y = 36;
if(i != 8)
{
dsubimage(x, y, &img_levels, 0,0,10,10, DIMAGE_NONE);
dprint(x+3, y+2, C_BLACK, "%d", i);
}
else
{
dsubimage(x, y, &img_levels, 11,0,10,10, DIMAGE_NONE);
}
}
dupdate();
getkey();