Skip to content

Commit

Permalink
Merge pull request #1 from MikroElektronika/ivan.ruzavin/designer-demo
Browse files Browse the repository at this point in the history
Ivan.ruzavin/designer demo
  • Loading branch information
StrahinjaJacimovic authored Dec 18, 2024
2 parents 0384655 + 1382aeb commit a9cd347
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 58 deletions.
6 changes: 5 additions & 1 deletion demos/sdk/demodesigner/project/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ endif()
if(NOT DEFINED IS_PD_SETUP)
set(IS_PD_SETUP 0)
else()
set(IS_PD_SETUP ${IS_PD_SETUP})
if(${IS_PD_SETUP})
set(IS_PD_SETUP 1)
else()
set(IS_PD_SETUP 0)
endif()
endif()

target_compile_definitions(Designer_Tool_Demo PUBLIC
Expand Down
82 changes: 43 additions & 39 deletions demos/sdk/demodesigner/project/main_screen.mscr
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,6 @@
"Layers": [
{
"Components": [
{
"Events": {
"OnClick": null,
"OnDown": null,
"OnPress": null,
"OnUp": null
},
"Properties": {
"ClassType": "Image",
"Component": {
"Active": true,
"Image": "mikroe266x72",
"Name": "Image_0",
"StackOrder": 1,
"Static": true,
"Visible": true
},
"Geometry": {
"Height": 72,
"Left": 101,
"Top": 57,
"Width": 266
}
}
},
{
"Events": {
},
Expand All @@ -41,8 +16,8 @@
},
"Geometry": {
"Height": 27,
"Left": 92,
"Top": 10,
"Left": 93,
"Top": 11,
"Width": 183
},
"Text": {
Expand Down Expand Up @@ -83,26 +58,55 @@
},
{
"Events": {
"OnClick": null,
"OnDown": null,
"OnPress": null,
"OnUp": null
},
"Properties": {
"ClassType": "Image",
"ClassType": "Label",
"Component": {
"Active": true,
"Image": "necto_studio_logo282x58",
"Name": "Image_1",
"Name": "Label_2",
"StackOrder": 4,
"Static": true,
"Static": false,
"Visible": true
},
"Geometry": {
"Height": 27,
"Left": 183,
"Top": 48,
"Width": 56
},
"Text": {
"Caption": "MikroE",
"Color": "#ffcf3e",
"Font": "Segoe_UI_Bold_36_159_",
"MaxLength": 0,
"VerticalText": false
}
}
},
{
"Events": {
},
"Properties": {
"ClassType": "Label",
"Component": {
"Active": true,
"Name": "Label_3",
"StackOrder": 5,
"Static": false,
"Visible": true
},
"Geometry": {
"Height": 58,
"Left": 97,
"Top": 187,
"Width": 282
"Height": 27,
"Left": 109,
"Top": 178,
"Width": 136
},
"Text": {
"Caption": "NECTOStudio IDE",
"Color": "#ffcf3e",
"Font": "Segoe_UI_Bold_36_159_",
"MaxLength": 0,
"VerticalText": false
}
}
}
Expand Down
31 changes: 15 additions & 16 deletions demos/sdk/demodesigner/project/resource.mres
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,6 @@
"underline": false,
"weight": 50
},
{
"alias": "mikroe266x72",
"original_path": "C:/Users/ivan.ruzavin/Downloads/mikroe.logo.darkback.png",
"path": "C:/Users/ivan.ruzavin/Documents/MIKROE/Projects/Designer_Demo/resources/mikroe266x72.png",
"pointSize": -2147483648,
"quality": 50,
"type": "image"
},
{
"alias": "necto_studio_logo282x58",
"original_path": "C:/Users/ivan.ruzavin/Downloads/necto-studio-logo.png",
"path": "C:/Users/ivan.ruzavin/Documents/MIKROE/Projects/Designer_Demo/resources/necto_studio_logo282x58.png",
"pointSize": -2147483648,
"quality": 50,
"type": "image"
},
{
"alias": "Sans_Serif_16_159",
"dpi": 72,
Expand Down Expand Up @@ -74,5 +58,20 @@
"type": "font",
"underline": false,
"weight": 50
},
{
"alias": "Segoe_UI_Bold_36_159_",
"dpi": 72,
"endChar": 127,
"family": "Segoe UI",
"id": 1,
"italic": false,
"pointSize": 36,
"startChar": 32,
"strikeOut": false,
"styleName": "Bold",
"type": "font",
"underline": false,
"weight": 75
}
]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 6 additions & 2 deletions demos/sdk/demodesigner/project/second_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ void increase_trigger()
// Function call of DECREASE! button press event.
void decrease_trigger()
{
progress_bar_count -= 1;
vtft_set_progress_bar_position(_vtft, second_screen.ProgressBar_0, progress_bar_count);
if (progress_bar_count != 0) {
progress_bar_count -= 1;
vtft_set_progress_bar_position(_vtft, second_screen.ProgressBar_0, progress_bar_count);
}
if (progress_bar_count == 9)
vtft_refresh_current_screen(_vtft);
}

0 comments on commit a9cd347

Please sign in to comment.