mirror of
https://gitee.com/idea4good/GuiLite.git
synced 2025-02-05 17:28:22 +08:00
sync up with GitHub
This commit is contained in:
parent
3b5c9b03d9
commit
8897058930
11
GuiLite.h
11
GuiLite.h
@ -186,13 +186,13 @@ protected:
|
|||||||
}
|
}
|
||||||
if (MSG_TYPE_USR == p_entry->msgType)
|
if (MSG_TYPE_USR == p_entry->msgType)
|
||||||
{
|
{
|
||||||
ms_usr_map_entries[ms_user_map_size] = *p_entry;
|
|
||||||
ms_usr_map_entries[ms_user_map_size].object = this;
|
|
||||||
ms_user_map_size++;
|
|
||||||
if (USR_MSG_MAX == ms_user_map_size)
|
if (USR_MSG_MAX == ms_user_map_size)
|
||||||
{
|
{
|
||||||
ASSERT(false);
|
ASSERT(false);
|
||||||
}
|
}
|
||||||
|
ms_usr_map_entries[ms_user_map_size] = *p_entry;
|
||||||
|
ms_usr_map_entries[ms_user_map_size].object = this;
|
||||||
|
ms_user_map_size++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2403,11 +2403,12 @@ public:
|
|||||||
virtual void on_paint()
|
virtual void on_paint()
|
||||||
{
|
{
|
||||||
c_rect rect;
|
c_rect rect;
|
||||||
|
unsigned int bg_color = m_bg_color ? m_bg_color : m_parent->get_bg_color();
|
||||||
get_screen_rect(rect);
|
get_screen_rect(rect);
|
||||||
if (m_str)
|
if (m_str)
|
||||||
{
|
{
|
||||||
m_surface->fill_rect(rect.m_left, rect.m_top, rect.m_right, rect.m_bottom, m_parent->get_bg_color(), m_z_order);
|
m_surface->fill_rect(rect.m_left, rect.m_top, rect.m_right, rect.m_bottom, bg_color, m_z_order);
|
||||||
c_word::draw_string_in_rect(m_surface, m_z_order, m_str, rect, m_font_type, m_font_color, m_parent->get_bg_color(), ALIGN_LEFT | ALIGN_VCENTER);
|
c_word::draw_string_in_rect(m_surface, m_z_order, m_str, rect, m_font_type, m_font_color, bg_color, ALIGN_LEFT | ALIGN_VCENTER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
|
@ -17,7 +17,7 @@ UIcode.cpp:
|
|||||||
Prerequisite: Windows & Visul Studio 2013/2015/2017/2019
|
Prerequisite: Windows & Visul Studio 2013/2015/2017/2019
|
||||||
- Open "GuiLite.sln" by Visual Studio
|
- Open "GuiLite.sln" by Visual Studio
|
||||||
- Click `Build Solution`
|
- Click `Build Solution`
|
||||||
- Output here: \GuiLite\workspace\Debug(Release)\GuiLite.lib
|
- Output here: GuiLite\workspace\Debug(Release)\GuiLite.lib
|
||||||
|
|
||||||
FAQ: Error when open GuiLite project with Visual Studio, reconfigure the project to match your computer like this:
|
FAQ: Error when open GuiLite project with Visual Studio, reconfigure the project to match your computer like this:
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ cd GuiLite/workspace
|
|||||||
cmake .
|
cmake .
|
||||||
make
|
make
|
||||||
|
|
||||||
# Output here: /GuiLite/workspace/libGuiLite.a
|
# Output here: GuiLite/workspace/libGuiLite.a
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build GuiLite libary for ARM Linux?
|
## Build GuiLite libary for ARM Linux?
|
||||||
@ -49,7 +49,7 @@ cmake -D CMAKE_C_COMPILER="/usr/bin/arm-linux-gnueabi-gcc" -D CMAKE_CXX_COMPILER
|
|||||||
cmake -D CMAKE_C_COMPILER="/usr/bin/aarch64-linux-gnu-gcc" -D CMAKE_CXX_COMPILER="/usr/bin/aarch64-linux-gnu-g++" .
|
cmake -D CMAKE_C_COMPILER="/usr/bin/aarch64-linux-gnu-gcc" -D CMAKE_CXX_COMPILER="/usr/bin/aarch64-linux-gnu-g++" .
|
||||||
make
|
make
|
||||||
```
|
```
|
||||||
Output here: /GuiLite/workspace/libGuiLite.a
|
Output here: GuiLite/workspace/libGuiLite.a
|
||||||
|
|
||||||
## How to build GuiLite libary for any MCU?
|
## How to build GuiLite libary for any MCU?
|
||||||
### Prerequisite: Install Keil uvsion 5.6 or above.
|
### Prerequisite: Install Keil uvsion 5.6 or above.
|
||||||
@ -58,7 +58,7 @@ Output here: /GuiLite/workspace/libGuiLite.a
|
|||||||
- Implement function(e.g, thread_sleep) in `core\src\adapter\api_unknow.cpp` to meet your need.
|
- Implement function(e.g, thread_sleep) in `core\src\adapter\api_unknow.cpp` to meet your need.
|
||||||
- Choose your Device type(Default: STM32F103ZE) from option for target.
|
- Choose your Device type(Default: STM32F103ZE) from option for target.
|
||||||
- Build GuiLite.
|
- Build GuiLite.
|
||||||
- Output here: /GuiLite/workspace/Objects/GuiLite.lib
|
- Output here: GuiLite/workspace/Objects/GuiLite.lib
|
||||||
|
|
||||||
## Build header-only GuiLite.h?
|
## Build header-only GuiLite.h?
|
||||||
```bash
|
```bash
|
||||||
|
@ -93,13 +93,13 @@ protected:
|
|||||||
|
|
||||||
if (MSG_TYPE_USR == p_entry->msgType)
|
if (MSG_TYPE_USR == p_entry->msgType)
|
||||||
{
|
{
|
||||||
ms_usr_map_entries[ms_user_map_size] = *p_entry;
|
|
||||||
ms_usr_map_entries[ms_user_map_size].object = this;
|
|
||||||
ms_user_map_size++;
|
|
||||||
if (USR_MSG_MAX == ms_user_map_size)
|
if (USR_MSG_MAX == ms_user_map_size)
|
||||||
{
|
{
|
||||||
ASSERT(false);
|
ASSERT(false);
|
||||||
}
|
}
|
||||||
|
ms_usr_map_entries[ms_user_map_size] = *p_entry;
|
||||||
|
ms_usr_map_entries[ms_user_map_size].object = this;
|
||||||
|
ms_user_map_size++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -16,12 +16,12 @@ public:
|
|||||||
virtual void on_paint()
|
virtual void on_paint()
|
||||||
{
|
{
|
||||||
c_rect rect;
|
c_rect rect;
|
||||||
|
unsigned int bg_color = m_bg_color ? m_bg_color : m_parent->get_bg_color();
|
||||||
get_screen_rect(rect);
|
get_screen_rect(rect);
|
||||||
|
|
||||||
if (m_str)
|
if (m_str)
|
||||||
{
|
{
|
||||||
m_surface->fill_rect(rect.m_left, rect.m_top, rect.m_right, rect.m_bottom, m_parent->get_bg_color(), m_z_order);
|
m_surface->fill_rect(rect.m_left, rect.m_top, rect.m_right, rect.m_bottom, bg_color, m_z_order);
|
||||||
c_word::draw_string_in_rect(m_surface, m_z_order, m_str, rect, m_font_type, m_font_color, m_parent->get_bg_color(), ALIGN_LEFT | ALIGN_VCENTER);
|
c_word::draw_string_in_rect(m_surface, m_z_order, m_str, rect, m_font_type, m_font_color, bg_color, ALIGN_LEFT | ALIGN_VCENTER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user