mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
update assets
This commit is contained in:
parent
c7d063b0fb
commit
aed17d169c
@ -371,24 +371,24 @@
|
||||
#include "assets/inc/images/arrow_left_n.data"
|
||||
#include "assets/inc/images/edit_clear_p.data"
|
||||
#include "assets/inc/images/battery_2.data"
|
||||
#endif /*WITH_STB_IMAGE*/
|
||||
#endif/*WITH_STB_IMAGE*/
|
||||
#ifdef WITH_VGCANVAS
|
||||
#include "assets/inc/images/pointer_4.bsvg"
|
||||
#include "assets/inc/images/china.bsvg"
|
||||
#include "assets/inc/images/pointer_1.bsvg"
|
||||
#include "assets/inc/images/pointer.bsvg"
|
||||
#include "assets/inc/images/girl.bsvg"
|
||||
#endif /*WITH_VGCANVAS*/
|
||||
#endif/*WITH_VGCANVAS*/
|
||||
#if defined(WITH_STB_FONT) || defined(WITH_FT_FONT)
|
||||
#if defined(WITH_MINI_FONT)
|
||||
#include "assets/inc/fonts/default_mini.res"
|
||||
#else /*WITH_MINI_FONT*/
|
||||
#else/*WITH_MINI_FONT*/
|
||||
#include "assets/inc/fonts/default.res"
|
||||
#endif /*WITH_MINI_FONT*/
|
||||
#else /*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
#endif/*WITH_MINI_FONT*/
|
||||
#else/*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
#include "assets/inc/fonts/default.data"
|
||||
#endif /*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
#endif /*WITH_FS_RES*/
|
||||
#endif/*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
#endif/*WITH_FS_RES*/
|
||||
|
||||
ret_t assets_init(void) {
|
||||
assets_manager_t* rm = assets_manager();
|
||||
@ -396,9 +396,9 @@ ret_t assets_init(void) {
|
||||
#ifdef WITH_FS_RES
|
||||
#if defined(WITH_MINI_FONT)
|
||||
assets_manager_preload(rm, ASSET_TYPE_FONT, "default_mini");
|
||||
#else /*WITH_MINI_FONT*/
|
||||
#else/*WITH_MINI_FONT*/
|
||||
assets_manager_preload(rm, ASSET_TYPE_FONT, "default");
|
||||
#endif /*WITH_MINI_FONT*/
|
||||
#endif/*WITH_MINI_FONT*/
|
||||
assets_manager_preload(rm, ASSET_TYPE_STYLE, "default");
|
||||
#else
|
||||
assets_manager_add(rm, ui_kb_ascii);
|
||||
@ -646,9 +646,9 @@ ret_t assets_init(void) {
|
||||
assets_manager_add(rm, style_dialog_warn);
|
||||
#if defined(WITH_MINI_FONT) && (defined(WITH_STB_FONT) || defined(WITH_FT_FONT))
|
||||
assets_manager_add(rm, font_default_mini);
|
||||
#else /*WITH_MINI_FONT*/
|
||||
#else/*WITH_MINI_FONT*/
|
||||
assets_manager_add(rm, font_default);
|
||||
#endif /*WITH_MINI_FONT*/
|
||||
#endif/*WITH_MINI_FONT*/
|
||||
assets_manager_add(rm, data_com_zlg_app_json);
|
||||
assets_manager_add(rm, data_test_dat);
|
||||
assets_manager_add(rm, data_test_json);
|
||||
@ -659,7 +659,7 @@ ret_t assets_init(void) {
|
||||
assets_manager_add(rm, image_pointer_1);
|
||||
assets_manager_add(rm, image_pointer);
|
||||
assets_manager_add(rm, image_girl);
|
||||
#endif /*WITH_VGCANVAS*/
|
||||
#endif/*WITH_VGCANVAS*/
|
||||
#endif
|
||||
|
||||
tk_init_assets();
|
||||
|
@ -1,31 +1,36 @@
|
||||
TK_CONST_DATA_ALIGN(const unsigned char style_edit[]) = {
|
||||
0x03,0x00,0x00,0x01,0xf8,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x65,0x64,0x69,0x74,0x00,0x64,0x61,0x74,
|
||||
0x03,0x00,0x00,0x01,0xf4,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x65,0x64,0x69,0x74,0x00,0x64,0x61,0x74,
|
||||
0x61,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0xfd,0xfc,0xfb,0xfa,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x02,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0xfd,0xfc,0xfb,0xfa,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x64,0x02,0x00,0x00,
|
||||
0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x61,0x72,0x6b,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x65,0x64,0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x02,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x02,0x00,0x00,
|
||||
0x66,0x6f,0x63,0x75,0x73,0x65,0x64,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x61,0x72,0x6b,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x65,0x64,0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x03,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x94,0x03,0x00,0x00,
|
||||
0x64,0x69,0x73,0x61,0x62,0x6c,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x61,0x72,0x6b,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x65,0x64,0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x03,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0x04,0x00,0x00,
|
||||
0x65,0x72,0x72,0x6f,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x61,0x72,0x6b,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x65,0x64,0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x04,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0x04,0x00,0x00,
|
||||
0x65,0x6d,0x70,0x74,0x79,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x61,0x72,0x6b,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x65,0x64,0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5c,0x05,0x00,0x00,
|
||||
0x65,0x6d,0x70,0x74,0x79,0x5f,0x66,0x6f,0x63,0x75,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x61,0x72,0x6b,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x65,0x64,0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
|
||||
0x66,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xa5,0x00,0xff,0x74,0x65,0x78,0x74,
|
||||
@ -64,4 +69,12 @@ TK_CONST_DATA_ALIGN(const unsigned char style_edit[]) = {
|
||||
0x74,0x65,0x78,0x74,0x5f,0x61,0x6c,0x69,0x67,0x6e,0x5f,0x68,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x62,0x67,0x5f,0x63,
|
||||
0x6f,0x6c,0x6f,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*1320*/
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0xff,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
|
||||
0x66,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xa5,0x00,0xff,0x74,0x65,0x78,0x74,
|
||||
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x74,0x65,0x78,0x74,0x5f,0x61,0x6c,0x69,
|
||||
0x67,0x6e,0x5f,0x68,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x62,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x40,0x40,0x40,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*1572*/
|
||||
|
Binary file not shown.
@ -5,5 +5,6 @@
|
||||
<disable bg_color="gray" text_color="#d0d0d0" />
|
||||
<error bg_color="#404040" text_color="red" />
|
||||
<empty bg_color="#404040" text_color="#a0a0a0" />
|
||||
<empty_focus bg_color="#404040" text_color="#a0a0a0" />
|
||||
</style>
|
||||
</edit>
|
||||
|
@ -21,24 +21,11 @@
|
||||
|
||||
#include "awtk.h"
|
||||
#include "assets.h"
|
||||
#include "tkc/mem.h"
|
||||
#include "tkc/path.h"
|
||||
#include "widgets/window.h"
|
||||
#include "widgets/label.h"
|
||||
#include "widgets/edit.h"
|
||||
#include "base/system_info.h"
|
||||
#include "ext_widgets.h"
|
||||
|
||||
ret_t application_init(void) {
|
||||
widget_t* win = window_create(NULL, 0, 0, 0, 0);
|
||||
widget_t* label = label_create(win, 0, 0, 0, 0);
|
||||
widget_t* edit = edit_create(win, 0, 0, 0, 0);
|
||||
|
||||
widget_set_text(label, L"hello awtk!");
|
||||
widget_set_self_layout_params(label, "0", "middle", "30%", "30");
|
||||
|
||||
widget_set_self_layout_params(edit, "30%", "middle", "60%", "30");
|
||||
|
||||
widget_layout(win);
|
||||
tk_ext_widgets_init();
|
||||
window_open("edit");
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
@ -20,24 +20,6 @@
|
||||
*/
|
||||
|
||||
#include "awtk.h"
|
||||
#include "tkc/mem.h"
|
||||
#include "widgets/label.h"
|
||||
#include "base/idle.h"
|
||||
#include "base/timer.h"
|
||||
#include "widgets/button.h"
|
||||
#include "widgets/dialog.h"
|
||||
#include "widgets/image.h"
|
||||
#include "tkc/utils.h"
|
||||
#include "widgets/window.h"
|
||||
#include "tkc/time_now.h"
|
||||
#include "base/main_loop.h"
|
||||
#include "base/locale_info.h"
|
||||
#include "widgets/check_button.h"
|
||||
#include "widgets/progress_bar.h"
|
||||
#include "base/image_manager.h"
|
||||
#include "base/window_manager.h"
|
||||
#include "base/widget_factory.h"
|
||||
#include "ui_loader/ui_builder_default.h"
|
||||
#include "ext_widgets.h"
|
||||
|
||||
static void install_click_hander(widget_t* widget);
|
||||
|
@ -1,5 +1,8 @@
|
||||
# 最新动态
|
||||
|
||||
* 2019/05/10
|
||||
* 修改SDL输入法位置的BUG。
|
||||
|
||||
* 2019/05/08
|
||||
* 完善 idl gen 工具支持外部项目并编写文档。
|
||||
* 完善 doc gen 工具支持外部项目并编写文档。
|
||||
|
Loading…
Reference in New Issue
Block a user