mirror of
https://github.com/zlgopen/awtk.git
synced 2025-05-08 19:44:45 +08:00
improve oveylay
This commit is contained in:
parent
2a93df7452
commit
0fbb890bdc
@ -352,7 +352,7 @@ static ret_t on_open_window(void* ctx, event_t* e) {
|
||||
dialog_confirm(NULL, "Hello AWTK!\nAre you sure to close?");
|
||||
} else {
|
||||
widget_t* target = widget_lookup(window_manager(), name, TRUE);
|
||||
if (target != NULL) {
|
||||
if (target != NULL && !(widget_is_overlay(target) && !widget_is_always_on_top(target))) {
|
||||
widget_t* win = widget_get_window(WIDGET(e->target));
|
||||
window_manager_switch_to(window_manager(), win, target, FALSE);
|
||||
} else {
|
||||
|
27
design/default/styles/modeless.xml
Normal file
27
design/default/styles/modeless.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<overlay>
|
||||
<style name="default" border_color="#000000">
|
||||
<normal bg_color="#f0f0f0" />
|
||||
<focused bg_color="#e0e0e0"/>
|
||||
</style>
|
||||
</overlay>
|
||||
|
||||
<view>
|
||||
<style name="title">
|
||||
<normal bg_color="#404040" />
|
||||
</style>
|
||||
</view>
|
||||
|
||||
<digit_clock>
|
||||
<style name="time">
|
||||
<normal text_color="white" />
|
||||
</style>
|
||||
</digit_clock>
|
||||
|
||||
<button>
|
||||
<style name="close">
|
||||
<normal icon="close_n"/>
|
||||
<pressed icon="close_p"/>
|
||||
<over icon="close_n"/>
|
||||
<disable icon="close_d"/>
|
||||
</style>
|
||||
</button>
|
@ -56,6 +56,7 @@
|
||||
<button focusable="true" name="open:dialog_highlight" text="Dialog Highlight"/>
|
||||
<button focusable="true" name="open:svg_test" text="SVG Test"/>
|
||||
<button focusable="true" name="open:spin_box" text="Spin box"/>
|
||||
<button focusable="true" name="open:modeless" text="Modeless"/>
|
||||
</view>
|
||||
<view x="0" y="0" w="100%" h="100%" children_layout="default(c=1,r=8,m=5,s=5)">
|
||||
<button focusable="true" name="open:memtest" text="MemTest"/>
|
||||
|
20
design/default/ui/modeless.xml
Normal file
20
design/default/ui/modeless.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<overlay x="c" y="m" w="240" h="240" modeless="true" style:bg_color="#f0f0f0" style:border_color="#000000">
|
||||
<view x="0" y="0" w="100%" h="30" style="title">
|
||||
<draggable out_of_scope="true" top="0" drag_window="true"/>
|
||||
<column x="0" y="0" w="-40" h="100%">
|
||||
<label x="10" y="m" w="55%" h="100%" text="title"/>
|
||||
<digit_clock style="time" x="r" y="m" w="40%" h="100%" format="hh:mm:ss"/>
|
||||
</column>
|
||||
<button style="close" x="r:5" y="m" w="26" h="26" name="close"/>
|
||||
</view>
|
||||
<view x="0" y="b" w="100%" h="-30">
|
||||
<view x="c" y="m:-30" w="80%" h="30" children_layout="default(r=1,c=0,ym=1)">
|
||||
<label w="30%" text="Max Uint"/>
|
||||
<edit w="70%" right_margin="16" min="0" max="4294967295" step="1" name="edit" auto_fix="true" input_type="uint" />
|
||||
</view>
|
||||
<view x="c" y="m:30" w="80%" h="30" children_layout="default(r=1,c=0,ym=1)">
|
||||
<label w="30%" text="test"/>
|
||||
<combo_box_ex w="70%" item_height="30" auto_fix="true" readonly="true" options="aaa;bbb;ccc;ddd" selected_index="0" />
|
||||
</view>
|
||||
</view>
|
||||
</overlay>
|
@ -3,6 +3,7 @@
|
||||
2023/06/06
|
||||
* object\_array\_clean\_invalid\_props在没有清理非法属性时,不分发ITEMS\_CHANGED事件(感谢兆坤提供补丁)。
|
||||
* 增加获取非widget状态的风格(感谢智明提供补丁)
|
||||
* overlay模拟非模态窗口的效果(感谢智明提供补丁)
|
||||
|
||||
2023/06/02
|
||||
* combo\_box控件弹出popup菜单时,使用小程序applet\_name中的资源(感谢雨欣提供补丁)
|
||||
|
@ -14,6 +14,7 @@ extern TK_CONST_DATA_ALIGN(const unsigned char style_color_tile[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char style_digit_clock[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char style_dialog_toast[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char style_edit[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char style_modeless[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char style_number[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char style_keyboard[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char style_color[]);
|
||||
@ -69,6 +70,7 @@ extern TK_CONST_DATA_ALIGN(const unsigned char ui_images[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_soft_keyboard[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_animate_widget[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_edit[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_modeless[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_close_window[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_menu_up_left[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_locale[]);
|
||||
@ -932,6 +934,7 @@ ret_t assets_init_dark(void) {
|
||||
assets_manager_add(am, style_digit_clock);
|
||||
assets_manager_add(am, style_dialog_toast);
|
||||
assets_manager_add(am, style_edit);
|
||||
assets_manager_add(am, style_modeless);
|
||||
assets_manager_add(am, style_number);
|
||||
assets_manager_add(am, style_keyboard);
|
||||
assets_manager_add(am, style_color);
|
||||
@ -987,6 +990,7 @@ ret_t assets_init_dark(void) {
|
||||
assets_manager_add(am, ui_soft_keyboard);
|
||||
assets_manager_add(am, ui_animate_widget);
|
||||
assets_manager_add(am, ui_edit);
|
||||
assets_manager_add(am, ui_modeless);
|
||||
assets_manager_add(am, ui_close_window);
|
||||
assets_manager_add(am, ui_menu_up_left);
|
||||
assets_manager_add(am, ui_locale);
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "default/inc/styles/digit_clock.data"
|
||||
#include "default/inc/styles/dialog_toast.data"
|
||||
#include "default/inc/styles/edit.data"
|
||||
#include "default/inc/styles/modeless.data"
|
||||
#include "default/inc/styles/number.data"
|
||||
#include "default/inc/styles/keyboard.data"
|
||||
#include "default/inc/styles/uiex_keyboard.data"
|
||||
@ -69,6 +70,7 @@
|
||||
#include "default/inc/ui/soft_keyboard.data"
|
||||
#include "default/inc/ui/animate_widget.data"
|
||||
#include "default/inc/ui/edit.data"
|
||||
#include "default/inc/ui/modeless.data"
|
||||
#include "default/inc/ui/close_window.data"
|
||||
#include "default/inc/ui/menu_up_left.data"
|
||||
#include "default/inc/ui/locale.data"
|
||||
@ -927,6 +929,7 @@ ret_t assets_init_default(void) {
|
||||
assets_manager_add(am, style_digit_clock);
|
||||
assets_manager_add(am, style_dialog_toast);
|
||||
assets_manager_add(am, style_edit);
|
||||
assets_manager_add(am, style_modeless);
|
||||
assets_manager_add(am, style_number);
|
||||
assets_manager_add(am, style_keyboard);
|
||||
assets_manager_add(am, style_uiex_keyboard);
|
||||
@ -987,6 +990,7 @@ ret_t assets_init_default(void) {
|
||||
assets_manager_add(am, ui_soft_keyboard);
|
||||
assets_manager_add(am, ui_animate_widget);
|
||||
assets_manager_add(am, ui_edit);
|
||||
assets_manager_add(am, ui_modeless);
|
||||
assets_manager_add(am, ui_close_window);
|
||||
assets_manager_add(am, ui_menu_up_left);
|
||||
assets_manager_add(am, ui_locale);
|
||||
|
@ -9,6 +9,7 @@ extern TK_CONST_DATA_ALIGN(const unsigned char style_color_tile[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char style_digit_clock[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char style_dialog_toast[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char style_edit[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char style_modeless[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char style_number[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char style_keyboard[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char style_color[]);
|
||||
@ -64,6 +65,7 @@ extern TK_CONST_DATA_ALIGN(const unsigned char ui_images[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_soft_keyboard[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_animate_widget[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_edit[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_modeless[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_close_window[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_menu_up_left[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_locale[]);
|
||||
@ -548,6 +550,7 @@ ret_t assets_init_dark(void) {
|
||||
assets_manager_add(am, style_digit_clock);
|
||||
assets_manager_add(am, style_dialog_toast);
|
||||
assets_manager_add(am, style_edit);
|
||||
assets_manager_add(am, style_modeless);
|
||||
assets_manager_add(am, style_number);
|
||||
assets_manager_add(am, style_keyboard);
|
||||
assets_manager_add(am, style_color);
|
||||
@ -603,6 +606,7 @@ ret_t assets_init_dark(void) {
|
||||
assets_manager_add(am, ui_soft_keyboard);
|
||||
assets_manager_add(am, ui_animate_widget);
|
||||
assets_manager_add(am, ui_edit);
|
||||
assets_manager_add(am, ui_modeless);
|
||||
assets_manager_add(am, ui_close_window);
|
||||
assets_manager_add(am, ui_menu_up_left);
|
||||
assets_manager_add(am, ui_locale);
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "default/inc/styles/digit_clock.data"
|
||||
#include "default/inc/styles/dialog_toast.data"
|
||||
#include "default/inc/styles/edit.data"
|
||||
#include "default/inc/styles/modeless.data"
|
||||
#include "default/inc/styles/number.data"
|
||||
#include "default/inc/styles/keyboard.data"
|
||||
#include "default/inc/styles/color.data"
|
||||
@ -64,6 +65,7 @@
|
||||
#include "default/inc/ui/soft_keyboard.data"
|
||||
#include "default/inc/ui/animate_widget.data"
|
||||
#include "default/inc/ui/edit.data"
|
||||
#include "default/inc/ui/modeless.data"
|
||||
#include "default/inc/ui/close_window.data"
|
||||
#include "default/inc/ui/menu_up_left.data"
|
||||
#include "default/inc/ui/locale.data"
|
||||
@ -547,6 +549,7 @@ ret_t assets_init_default(void) {
|
||||
assets_manager_add(am, style_digit_clock);
|
||||
assets_manager_add(am, style_dialog_toast);
|
||||
assets_manager_add(am, style_edit);
|
||||
assets_manager_add(am, style_modeless);
|
||||
assets_manager_add(am, style_number);
|
||||
assets_manager_add(am, style_keyboard);
|
||||
assets_manager_add(am, style_color);
|
||||
@ -603,6 +606,7 @@ ret_t assets_init_default(void) {
|
||||
assets_manager_add(am, ui_soft_keyboard);
|
||||
assets_manager_add(am, ui_animate_widget);
|
||||
assets_manager_add(am, ui_edit);
|
||||
assets_manager_add(am, ui_modeless);
|
||||
assets_manager_add(am, ui_close_window);
|
||||
assets_manager_add(am, ui_menu_up_left);
|
||||
assets_manager_add(am, ui_locale);
|
||||
|
55
res/assets/default/inc/styles/modeless.data
Normal file
55
res/assets/default/inc/styles/modeless.data
Normal file
@ -0,0 +1,55 @@
|
||||
TK_CONST_DATA_ALIGN(const unsigned char style_modeless[]) = {
|
||||
0x03,0x00,0x00,0x01,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x6d,0x6f,0x64,0x65,0x6c,0x65,0x73,0x73,
|
||||
0x00,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,0x08,0x00,0x00,0x00,0x2c,0x03,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,0x65,0x66,0x61,0x75,0x6c,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,0x6f,0x76,0x65,0x72,0x6c,0x61,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,0x56,0x03,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,0x65,0x66,0x61,0x75,0x6c,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,0x6f,0x76,0x65,0x72,0x6c,0x61,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,0x80,0x03,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,0x74,0x69,0x74,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,0x00,0x00,0x76,0x69,0x65,0x77,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,0x95,0x03,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,0x74,0x69,0x6d,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,0x00,0x00,0x00,0x64,0x69,0x67,0x69,0x74,0x5f,0x63,0x6c,0x6f,0x63,0x6b,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xac,0x03,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,0x63,0x6c,0x6f,0x73,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,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,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,0xc1,0x03,0x00,0x00,
|
||||
0x70,0x72,0x65,0x73,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,0x63,0x6c,0x6f,0x73,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,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,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,0xd6,0x03,0x00,0x00,
|
||||
0x6f,0x76,0x65,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,0x00,0x63,0x6c,0x6f,0x73,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,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,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,0xeb,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,0x63,0x6c,0x6f,0x73,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,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,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,0x02,0x00,0x00,0x00,
|
||||
0x07,0x09,0x04,0x00,0x62,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0xf0,0xf0,0xf0,0xff,0x07,0x0d,0x04,
|
||||
0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x00,0x00,0x00,0xff,0x02,0x00,
|
||||
0x00,0x00,0x07,0x09,0x04,0x00,0x62,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0xe0,0xe0,0xe0,0xff,0x07,
|
||||
0x0d,0x04,0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x00,0x00,0x00,0xff,
|
||||
0x01,0x00,0x00,0x00,0x07,0x09,0x04,0x00,0x62,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x40,0x40,0x40,
|
||||
0xff,0x01,0x00,0x00,0x00,0x07,0x0b,0x04,0x00,0x74,0x65,0x78,0x74,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,
|
||||
0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x0e,0x05,0x08,0x00,0x69,0x63,0x6f,0x6e,0x00,0x63,0x6c,0x6f,
|
||||
0x73,0x65,0x5f,0x6e,0x00,0x01,0x00,0x00,0x00,0x0e,0x05,0x08,0x00,0x69,0x63,0x6f,0x6e,0x00,0x63,0x6c,
|
||||
0x6f,0x73,0x65,0x5f,0x70,0x00,0x01,0x00,0x00,0x00,0x0e,0x05,0x08,0x00,0x69,0x63,0x6f,0x6e,0x00,0x63,
|
||||
0x6c,0x6f,0x73,0x65,0x5f,0x6e,0x00,0x01,0x00,0x00,0x00,0x0e,0x05,0x08,0x00,0x69,0x63,0x6f,0x6e,0x00,
|
||||
0x63,0x6c,0x6f,0x73,0x65,0x5f,0x64,0x00,0x00,0x00,0x00,0x00,};/*1072*/
|
@ -1,5 +1,5 @@
|
||||
TK_CONST_DATA_ALIGN(const unsigned char ui_main[]) = {
|
||||
0x04,0x00,0x01,0x01,0xf0,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x6d,0x61,0x69,0x6e,0x00,0x00,0x00,0x00,
|
||||
0x04,0x00,0x01,0x01,0x52,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x6d,0x61,0x69,0x6e,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,0x12,0x12,0x22,0x11,0x77,0x69,0x6e,0x64,0x6f,0x77,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,
|
||||
@ -278,46 +278,51 @@ TK_CONST_DATA_ALIGN(const unsigned char ui_main[]) = {
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x6f,0x63,
|
||||
0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,
|
||||
0x6e,0x3a,0x73,0x70,0x69,0x6e,0x5f,0x62,0x6f,0x78,0x00,0x74,0x65,0x78,0x74,0x00,0x53,0x70,0x69,0x6e,
|
||||
0x20,0x62,0x6f,0x78,0x00,0x00,0x00,0x00,0x76,0x69,0x65,0x77,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x20,0x62,0x6f,0x78,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,
|
||||
0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,
|
||||
0x79,0x3d,0x30,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x63,
|
||||
0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,
|
||||
0x6c,0x74,0x28,0x63,0x3d,0x31,0x2c,0x72,0x3d,0x38,0x2c,0x6d,0x3d,0x35,0x2c,0x73,0x3d,0x35,0x29,0x00,
|
||||
0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,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,0x66,0x6f,0x63,0x75,0x73,
|
||||
0x61,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,
|
||||
0x6d,0x6f,0x64,0x65,0x6c,0x65,0x73,0x73,0x00,0x74,0x65,0x78,0x74,0x00,0x4d,0x6f,0x64,0x65,0x6c,0x65,
|
||||
0x73,0x73,0x00,0x00,0x00,0x00,0x76,0x69,0x65,0x77,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,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x6f,0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,
|
||||
0x72,0x75,0x65,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6d,0x65,0x6d,0x74,0x65,0x73,
|
||||
0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x4d,0x65,0x6d,0x54,0x65,0x73,0x74,0x00,0x00,0x00,0x62,0x75,0x74,
|
||||
0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,
|
||||
0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,
|
||||
0x30,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x63,0x68,0x69,
|
||||
0x6c,0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,
|
||||
0x28,0x63,0x3d,0x31,0x2c,0x72,0x3d,0x38,0x2c,0x6d,0x3d,0x35,0x2c,0x73,0x3d,0x35,0x29,0x00,0x00,0x62,
|
||||
0x75,0x74,0x74,0x6f,0x6e,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x66,0x6f,0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,
|
||||
0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x63,0x61,0x6c,0x69,0x62,0x72,0x61,0x74,0x69,0x6f,
|
||||
0x6e,0x5f,0x77,0x69,0x6e,0x00,0x74,0x65,0x78,0x74,0x00,0x43,0x61,0x6c,0x69,0x62,0x72,0x61,0x74,0x69,
|
||||
0x6f,0x6e,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x6f,0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,
|
||||
0x65,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6d,0x65,0x6d,0x74,0x65,0x73,0x74,0x00,
|
||||
0x74,0x65,0x78,0x74,0x00,0x4d,0x65,0x6d,0x54,0x65,0x73,0x74,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,
|
||||
0x6e,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x6f,0x63,0x75,0x73,0x61,0x62,
|
||||
0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x6e,0x61,0x6d,0x65,0x00,0x73,0x68,0x6f,0x77,0x5f,0x66,0x70,
|
||||
0x73,0x00,0x74,0x65,0x78,0x74,0x00,0x53,0x68,0x6f,0x77,0x20,0x46,0x50,0x53,0x00,0x00,0x00,0x62,0x75,
|
||||
0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x66,0x6f,0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x6e,0x61,
|
||||
0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x63,0x61,0x6c,0x69,0x62,0x72,0x61,0x74,0x69,0x6f,0x6e,0x5f,
|
||||
0x77,0x69,0x6e,0x00,0x74,0x65,0x78,0x74,0x00,0x43,0x61,0x6c,0x69,0x62,0x72,0x61,0x74,0x69,0x6f,0x6e,
|
||||
0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,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,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x6f,0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,
|
||||
0x00,0x6e,0x61,0x6d,0x65,0x00,0x73,0x6e,0x61,0x70,0x73,0x68,0x6f,0x74,0x00,0x74,0x65,0x78,0x74,0x00,
|
||||
0x54,0x61,0x6b,0x65,0x20,0x53,0x6e,0x61,0x70,0x73,0x68,0x6f,0x74,0x00,0x00,0x00,0x62,0x75,0x74,0x74,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x6f,0x63,0x75,0x73,0x61,0x62,0x6c,0x65,
|
||||
0x00,0x74,0x72,0x75,0x65,0x00,0x6e,0x61,0x6d,0x65,0x00,0x73,0x68,0x6f,0x77,0x5f,0x66,0x70,0x73,0x00,
|
||||
0x74,0x65,0x78,0x74,0x00,0x53,0x68,0x6f,0x77,0x20,0x46,0x50,0x53,0x00,0x00,0x00,0x62,0x75,0x74,0x74,
|
||||
0x6f,0x6e,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x66,0x6f,0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x6e,
|
||||
0x61,0x6d,0x65,0x00,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5f,0x74,0x68,0x65,0x6d,0x65,0x00,0x74,0x65,0x78,
|
||||
0x74,0x00,0x54,0x65,0x73,0x74,0x20,0x43,0x68,0x61,0x6e,0x67,0x65,0x20,0x54,0x68,0x65,0x6d,0x65,0x00,
|
||||
0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x61,0x6d,0x65,0x00,0x73,0x6e,0x61,0x70,0x73,0x68,0x6f,0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x54,0x61,
|
||||
0x6b,0x65,0x20,0x53,0x6e,0x61,0x70,0x73,0x68,0x6f,0x74,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,
|
||||
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,0x00,0x00,0x66,0x6f,0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,
|
||||
0x74,0x72,0x75,0x65,0x00,0x6e,0x61,0x6d,0x65,0x00,0x65,0x78,0x69,0x74,0x00,0x74,0x65,0x78,0x74,0x00,
|
||||
0x45,0x78,0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x5f,0x69,0x6e,0x64,0x69,0x63,
|
||||
0x61,0x74,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,0x64,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x73,0x65,0x6c,
|
||||
0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,
|
||||
0x2c,0x79,0x3d,0x62,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,0x68,0x3d,0x32,0x30,0x29,0x00,0x74,0x72,
|
||||
0x61,0x6e,0x73,0x69,0x74,0x69,0x6f,0x6e,0x00,0x74,0x72,0x75,0x65,0x00,0x73,0x74,0x79,0x6c,0x65,0x00,
|
||||
0x62,0x6c,0x75,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*6432*/
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x66,0x6f,0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x6e,0x61,0x6d,
|
||||
0x65,0x00,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5f,0x74,0x68,0x65,0x6d,0x65,0x00,0x74,0x65,0x78,0x74,0x00,
|
||||
0x54,0x65,0x73,0x74,0x20,0x43,0x68,0x61,0x6e,0x67,0x65,0x20,0x54,0x68,0x65,0x6d,0x65,0x00,0x00,0x00,
|
||||
0x62,0x75,0x74,0x74,0x6f,0x6e,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,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x6f,0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,
|
||||
0x75,0x65,0x00,0x6e,0x61,0x6d,0x65,0x00,0x65,0x78,0x69,0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x45,0x78,
|
||||
0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x5f,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,
|
||||
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,0x64,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,
|
||||
0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,
|
||||
0x3d,0x62,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,0x68,0x3d,0x32,0x30,0x29,0x00,0x74,0x72,0x61,0x6e,
|
||||
0x73,0x69,0x74,0x69,0x6f,0x6e,0x00,0x74,0x72,0x75,0x65,0x00,0x73,0x74,0x79,0x6c,0x65,0x00,0x62,0x6c,
|
||||
0x75,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*6530*/
|
||||
|
86
res/assets/default/inc/ui/modeless.data
Normal file
86
res/assets/default/inc/ui/modeless.data
Normal file
@ -0,0 +1,86 @@
|
||||
TK_CONST_DATA_ALIGN(const unsigned char ui_modeless[]) = {
|
||||
0x04,0x00,0x01,0x01,0x65,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x6d,0x6f,0x64,0x65,0x6c,0x65,0x73,0x73,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x6f,0x76,0x65,0x72,0x6c,0x61,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,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,
|
||||
0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x2c,
|
||||
0x79,0x3d,0x6d,0x2c,0x77,0x3d,0x32,0x34,0x30,0x2c,0x68,0x3d,0x32,0x34,0x30,0x29,0x00,0x6d,0x6f,0x64,
|
||||
0x65,0x6c,0x65,0x73,0x73,0x00,0x74,0x72,0x75,0x65,0x00,0x73,0x74,0x79,0x6c,0x65,0x3a,0x62,0x67,0x5f,
|
||||
0x63,0x6f,0x6c,0x6f,0x72,0x00,0x23,0x66,0x30,0x66,0x30,0x66,0x30,0x00,0x73,0x74,0x79,0x6c,0x65,0x3a,
|
||||
0x62,0x6f,0x72,0x64,0x65,0x72,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x23,0x30,0x30,0x30,0x30,0x30,0x30,
|
||||
0x00,0x00,0x76,0x69,0x65,0x77,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,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x64,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,
|
||||
0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,
|
||||
0x31,0x30,0x30,0x25,0x2c,0x68,0x3d,0x33,0x30,0x29,0x00,0x73,0x74,0x79,0x6c,0x65,0x00,0x74,0x69,0x74,
|
||||
0x6c,0x65,0x00,0x00,0x64,0x72,0x61,0x67,0x67,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,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6f,0x75,0x74,0x5f,0x6f,0x66,0x5f,0x73,
|
||||
0x63,0x6f,0x70,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x74,0x6f,0x70,0x00,0x30,0x00,0x64,0x72,0x61,0x67,
|
||||
0x5f,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x74,0x72,0x75,0x65,0x00,0x00,0x00,0x63,0x6f,0x6c,0x75,0x6d,
|
||||
0x6e,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,0x00,0x00,0x00,0x00,0x00,0x00,0xd8,0xff,0xff,0xff,0x64,
|
||||
0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,
|
||||
0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x2d,0x34,0x30,0x2c,0x68,0x3d,0x31,
|
||||
0x30,0x30,0x25,0x29,0x00,0x00,0x6c,0x61,0x62,0x65,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,0x00,0x0a,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,
|
||||
0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x31,0x30,0x2c,0x79,
|
||||
0x3d,0x6d,0x2c,0x77,0x3d,0x35,0x35,0x25,0x2c,0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x74,0x65,0x78,
|
||||
0x74,0x00,0x74,0x69,0x74,0x6c,0x65,0x00,0x00,0x00,0x64,0x69,0x67,0x69,0x74,0x5f,0x63,0x6c,0x6f,0x63,
|
||||
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,0x00,0x28,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x73,0x65,
|
||||
0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,
|
||||
0x72,0x2c,0x79,0x3d,0x6d,0x2c,0x77,0x3d,0x34,0x30,0x25,0x2c,0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,
|
||||
0x73,0x74,0x79,0x6c,0x65,0x00,0x74,0x69,0x6d,0x65,0x00,0x66,0x6f,0x72,0x6d,0x61,0x74,0x00,0x68,0x68,
|
||||
0x3a,0x6d,0x6d,0x3a,0x73,0x73,0x00,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,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,0x00,0x00,0x00,0x00,0x00,0x00,0x1a,0x00,0x00,0x00,0x1a,0x00,0x00,0x00,0x73,0x65,
|
||||
0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,
|
||||
0x72,0x3a,0x35,0x2c,0x79,0x3d,0x6d,0x2c,0x77,0x3d,0x32,0x36,0x2c,0x68,0x3d,0x32,0x36,0x29,0x00,0x73,
|
||||
0x74,0x79,0x6c,0x65,0x00,0x63,0x6c,0x6f,0x73,0x65,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x6c,0x6f,0x73,
|
||||
0x65,0x00,0x00,0x00,0x00,0x76,0x69,0x65,0x77,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,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xe2,0xff,0xff,0xff,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,
|
||||
0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x62,
|
||||
0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,0x68,0x3d,0x2d,0x33,0x30,0x29,0x00,0x00,0x76,0x69,0x65,0x77,
|
||||
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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
|
||||
0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,
|
||||
0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x2c,0x79,0x3d,0x6d,0x3a,0x2d,0x33,0x30,0x2c,0x77,0x3d,0x38,0x30,
|
||||
0x25,0x2c,0x68,0x3d,0x33,0x30,0x29,0x00,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,
|
||||
0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x72,0x3d,0x31,0x2c,0x63,0x3d,0x30,0x2c,
|
||||
0x79,0x6d,0x3d,0x31,0x29,0x00,0x00,0x6c,0x61,0x62,0x65,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,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,
|
||||
0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x77,0x3d,0x33,0x30,0x25,
|
||||
0x29,0x00,0x74,0x65,0x78,0x74,0x00,0x4d,0x61,0x78,0x20,0x55,0x69,0x6e,0x74,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x46,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,
|
||||
0x66,0x61,0x75,0x6c,0x74,0x28,0x77,0x3d,0x37,0x30,0x25,0x29,0x00,0x69,0x6e,0x70,0x75,0x74,0x5f,0x74,
|
||||
0x79,0x70,0x65,0x00,0x75,0x69,0x6e,0x74,0x00,0x72,0x69,0x67,0x68,0x74,0x5f,0x6d,0x61,0x72,0x67,0x69,
|
||||
0x6e,0x00,0x31,0x36,0x00,0x6d,0x69,0x6e,0x00,0x30,0x00,0x6d,0x61,0x78,0x00,0x34,0x32,0x39,0x34,0x39,
|
||||
0x36,0x37,0x32,0x39,0x35,0x00,0x73,0x74,0x65,0x70,0x00,0x31,0x00,0x6e,0x61,0x6d,0x65,0x00,0x65,0x64,
|
||||
0x69,0x74,0x00,0x61,0x75,0x74,0x6f,0x5f,0x66,0x69,0x78,0x00,0x74,0x72,0x75,0x65,0x00,0x00,0x00,0x00,
|
||||
0x76,0x69,0x65,0x77,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,
|
||||
0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x2c,0x79,0x3d,0x6d,0x3a,0x33,0x30,0x2c,0x77,
|
||||
0x3d,0x38,0x30,0x25,0x2c,0x68,0x3d,0x33,0x30,0x29,0x00,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x5f,
|
||||
0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x72,0x3d,0x31,0x2c,0x63,
|
||||
0x3d,0x30,0x2c,0x79,0x6d,0x3d,0x31,0x29,0x00,0x00,0x6c,0x61,0x62,0x65,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x65,
|
||||
0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x77,0x3d,
|
||||
0x33,0x30,0x25,0x29,0x00,0x74,0x65,0x78,0x74,0x00,0x74,0x65,0x73,0x74,0x00,0x00,0x00,0x63,0x6f,0x6d,
|
||||
0x62,0x6f,0x5f,0x62,0x6f,0x78,0x5f,0x65,0x78,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,0x46,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,
|
||||
0x61,0x75,0x6c,0x74,0x28,0x77,0x3d,0x37,0x30,0x25,0x29,0x00,0x6f,0x70,0x74,0x69,0x6f,0x6e,0x73,0x00,
|
||||
0x61,0x61,0x61,0x3b,0x62,0x62,0x62,0x3b,0x63,0x63,0x63,0x3b,0x64,0x64,0x64,0x00,0x69,0x74,0x65,0x6d,
|
||||
0x5f,0x68,0x65,0x69,0x67,0x68,0x74,0x00,0x33,0x30,0x00,0x61,0x75,0x74,0x6f,0x5f,0x66,0x69,0x78,0x00,
|
||||
0x74,0x72,0x75,0x65,0x00,0x72,0x65,0x61,0x64,0x6f,0x6e,0x6c,0x79,0x00,0x74,0x72,0x75,0x65,0x00,0x73,
|
||||
0x65,0x6c,0x65,0x63,0x74,0x65,0x64,0x5f,0x69,0x6e,0x64,0x65,0x78,0x00,0x30,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,};/*1685*/
|
BIN
res/assets/default/raw/styles/modeless.bin
Normal file
BIN
res/assets/default/raw/styles/modeless.bin
Normal file
Binary file not shown.
Binary file not shown.
BIN
res/assets/default/raw/ui/modeless.bin
Normal file
BIN
res/assets/default/raw/ui/modeless.bin
Normal file
Binary file not shown.
@ -14,6 +14,7 @@
|
||||
#include "assets/default/inc/styles/digit_clock.data"
|
||||
#include "assets/default/inc/styles/dialog_toast.data"
|
||||
#include "assets/default/inc/styles/edit.data"
|
||||
#include "assets/default/inc/styles/modeless.data"
|
||||
#include "assets/default/inc/styles/number.data"
|
||||
#include "assets/default/inc/styles/keyboard.data"
|
||||
#include "assets/default/inc/styles/color.data"
|
||||
@ -69,6 +70,7 @@
|
||||
#include "assets/default/inc/ui/soft_keyboard.data"
|
||||
#include "assets/default/inc/ui/animate_widget.data"
|
||||
#include "assets/default/inc/ui/edit.data"
|
||||
#include "assets/default/inc/ui/modeless.data"
|
||||
#include "assets/default/inc/ui/close_window.data"
|
||||
#include "assets/default/inc/ui/menu_up_left.data"
|
||||
#include "assets/default/inc/ui/locale.data"
|
||||
@ -932,6 +934,7 @@ ret_t assets_init(void) {
|
||||
assets_manager_add(am, style_digit_clock);
|
||||
assets_manager_add(am, style_dialog_toast);
|
||||
assets_manager_add(am, style_edit);
|
||||
assets_manager_add(am, style_modeless);
|
||||
assets_manager_add(am, style_number);
|
||||
assets_manager_add(am, style_keyboard);
|
||||
assets_manager_add(am, style_color);
|
||||
@ -987,6 +990,7 @@ ret_t assets_init(void) {
|
||||
assets_manager_add(am, ui_soft_keyboard);
|
||||
assets_manager_add(am, ui_animate_widget);
|
||||
assets_manager_add(am, ui_edit);
|
||||
assets_manager_add(am, ui_modeless);
|
||||
assets_manager_add(am, ui_close_window);
|
||||
assets_manager_add(am, ui_menu_up_left);
|
||||
assets_manager_add(am, ui_locale);
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "assets/default/inc/styles/digit_clock.data"
|
||||
#include "assets/default/inc/styles/dialog_toast.data"
|
||||
#include "assets/default/inc/styles/edit.data"
|
||||
#include "assets/default/inc/styles/modeless.data"
|
||||
#include "assets/default/inc/styles/number.data"
|
||||
#include "assets/default/inc/styles/keyboard.data"
|
||||
#include "assets/default/inc/styles/uiex_keyboard.data"
|
||||
@ -69,6 +70,7 @@
|
||||
#include "assets/default/inc/ui/soft_keyboard.data"
|
||||
#include "assets/default/inc/ui/animate_widget.data"
|
||||
#include "assets/default/inc/ui/edit.data"
|
||||
#include "assets/default/inc/ui/modeless.data"
|
||||
#include "assets/default/inc/ui/close_window.data"
|
||||
#include "assets/default/inc/ui/menu_up_left.data"
|
||||
#include "assets/default/inc/ui/locale.data"
|
||||
@ -927,6 +929,7 @@ ret_t assets_init(void) {
|
||||
assets_manager_add(am, style_digit_clock);
|
||||
assets_manager_add(am, style_dialog_toast);
|
||||
assets_manager_add(am, style_edit);
|
||||
assets_manager_add(am, style_modeless);
|
||||
assets_manager_add(am, style_number);
|
||||
assets_manager_add(am, style_keyboard);
|
||||
assets_manager_add(am, style_uiex_keyboard);
|
||||
@ -987,6 +990,7 @@ ret_t assets_init(void) {
|
||||
assets_manager_add(am, ui_soft_keyboard);
|
||||
assets_manager_add(am, ui_animate_widget);
|
||||
assets_manager_add(am, ui_edit);
|
||||
assets_manager_add(am, ui_modeless);
|
||||
assets_manager_add(am, ui_close_window);
|
||||
assets_manager_add(am, ui_menu_up_left);
|
||||
assets_manager_add(am, ui_locale);
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "assets/default/inc/styles/digit_clock.data"
|
||||
#include "assets/default/inc/styles/dialog_toast.data"
|
||||
#include "assets/default/inc/styles/edit.data"
|
||||
#include "assets/default/inc/styles/modeless.data"
|
||||
#include "assets/default/inc/styles/number.data"
|
||||
#include "assets/default/inc/styles/keyboard.data"
|
||||
#include "assets/default/inc/styles/color.data"
|
||||
@ -64,6 +65,7 @@
|
||||
#include "assets/default/inc/ui/soft_keyboard.data"
|
||||
#include "assets/default/inc/ui/animate_widget.data"
|
||||
#include "assets/default/inc/ui/edit.data"
|
||||
#include "assets/default/inc/ui/modeless.data"
|
||||
#include "assets/default/inc/ui/close_window.data"
|
||||
#include "assets/default/inc/ui/menu_up_left.data"
|
||||
#include "assets/default/inc/ui/locale.data"
|
||||
@ -548,6 +550,7 @@ ret_t assets_init(void) {
|
||||
assets_manager_add(am, style_digit_clock);
|
||||
assets_manager_add(am, style_dialog_toast);
|
||||
assets_manager_add(am, style_edit);
|
||||
assets_manager_add(am, style_modeless);
|
||||
assets_manager_add(am, style_number);
|
||||
assets_manager_add(am, style_keyboard);
|
||||
assets_manager_add(am, style_color);
|
||||
@ -603,6 +606,7 @@ ret_t assets_init(void) {
|
||||
assets_manager_add(am, ui_soft_keyboard);
|
||||
assets_manager_add(am, ui_animate_widget);
|
||||
assets_manager_add(am, ui_edit);
|
||||
assets_manager_add(am, ui_modeless);
|
||||
assets_manager_add(am, ui_close_window);
|
||||
assets_manager_add(am, ui_menu_up_left);
|
||||
assets_manager_add(am, ui_locale);
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "assets/default/inc/styles/digit_clock.data"
|
||||
#include "assets/default/inc/styles/dialog_toast.data"
|
||||
#include "assets/default/inc/styles/edit.data"
|
||||
#include "assets/default/inc/styles/modeless.data"
|
||||
#include "assets/default/inc/styles/number.data"
|
||||
#include "assets/default/inc/styles/keyboard.data"
|
||||
#include "assets/default/inc/styles/color.data"
|
||||
@ -64,6 +65,7 @@
|
||||
#include "assets/default/inc/ui/soft_keyboard.data"
|
||||
#include "assets/default/inc/ui/animate_widget.data"
|
||||
#include "assets/default/inc/ui/edit.data"
|
||||
#include "assets/default/inc/ui/modeless.data"
|
||||
#include "assets/default/inc/ui/close_window.data"
|
||||
#include "assets/default/inc/ui/menu_up_left.data"
|
||||
#include "assets/default/inc/ui/locale.data"
|
||||
@ -547,6 +549,7 @@ ret_t assets_init(void) {
|
||||
assets_manager_add(am, style_digit_clock);
|
||||
assets_manager_add(am, style_dialog_toast);
|
||||
assets_manager_add(am, style_edit);
|
||||
assets_manager_add(am, style_modeless);
|
||||
assets_manager_add(am, style_number);
|
||||
assets_manager_add(am, style_keyboard);
|
||||
assets_manager_add(am, style_color);
|
||||
@ -603,6 +606,7 @@ ret_t assets_init(void) {
|
||||
assets_manager_add(am, ui_soft_keyboard);
|
||||
assets_manager_add(am, ui_animate_widget);
|
||||
assets_manager_add(am, ui_edit);
|
||||
assets_manager_add(am, ui_modeless);
|
||||
assets_manager_add(am, ui_close_window);
|
||||
assets_manager_add(am, ui_menu_up_left);
|
||||
assets_manager_add(am, ui_locale);
|
||||
|
@ -4763,6 +4763,12 @@ bool_t widget_is_overlay(widget_t* widget) {
|
||||
return widget->vt->is_window && tk_str_eq(widget->vt->type, WIDGET_TYPE_OVERLAY);
|
||||
}
|
||||
|
||||
bool_t widget_is_always_on_top(widget_t* widget) {
|
||||
return_value_if_fail(widget != NULL && widget->vt != NULL, FALSE);
|
||||
|
||||
return widget->vt->is_window && widget_get_prop_bool(widget, WIDGET_PROP_ALWAYS_ON_TOP, FALSE);
|
||||
}
|
||||
|
||||
bool_t widget_is_opened_dialog(widget_t* widget) {
|
||||
int32_t stage = widget_get_prop_int(widget, WIDGET_PROP_STAGE, WINDOW_STAGE_NONE);
|
||||
return tk_str_eq(widget->vt->type, WIDGET_TYPE_DIALOG) && stage == WINDOW_STAGE_OPENED;
|
||||
|
@ -2191,6 +2191,16 @@ bool_t widget_is_popup(widget_t* widget);
|
||||
*/
|
||||
bool_t widget_is_overlay(widget_t* widget);
|
||||
|
||||
/**
|
||||
* @method widget_is_always_on_top
|
||||
* 检查控件是否总在最上层。
|
||||
*
|
||||
* @annotation ["scriptable"]
|
||||
* @param {widget_t*} widget widget对象。
|
||||
* @return {bool_t} 返回FALSE表示不是,否则表示是。
|
||||
*/
|
||||
bool_t widget_is_always_on_top(widget_t* widget);
|
||||
|
||||
/**
|
||||
* @method widget_is_opened_dialog
|
||||
* 检查控件弹出对话框控件是否已经打开了(而非挂起状态)。
|
||||
|
@ -77,6 +77,15 @@ ret_t draggable_set_horizontal_only(widget_t* widget, bool_t horizontal_only) {
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
ret_t draggable_set_allow_out_of_screen(widget_t* widget, bool_t allow_out_of_screen) {
|
||||
draggable_t* draggable = DRAGGABLE(widget);
|
||||
return_value_if_fail(draggable != NULL, RET_BAD_PARAMS);
|
||||
|
||||
draggable->allow_out_of_screen = allow_out_of_screen;
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
ret_t draggable_set_drag_window(widget_t* widget, bool_t drag_window) {
|
||||
draggable_t* draggable = DRAGGABLE(widget);
|
||||
return_value_if_fail(draggable != NULL, RET_BAD_PARAMS);
|
||||
@ -135,6 +144,9 @@ static ret_t draggable_get_prop(widget_t* widget, const char* name, value_t* v)
|
||||
} else if (tk_str_eq(DRAGGABLE_PROP_DRAG_PARENT, name)) {
|
||||
value_set_uint32(v, draggable->drag_parent);
|
||||
return RET_OK;
|
||||
} else if (tk_str_eq(DRAGGABLE_PROP_ALLOW_OUT_OF_SCREEN, name)) {
|
||||
value_set_bool(v, draggable->allow_out_of_screen);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
return RET_NOT_FOUND;
|
||||
@ -170,6 +182,9 @@ static ret_t draggable_set_prop(widget_t* widget, const char* name, const value_
|
||||
} else if (tk_str_eq(DRAGGABLE_PROP_DRAG_PARENT, name)) {
|
||||
draggable_set_drag_parent(widget, value_uint32(v));
|
||||
return RET_OK;
|
||||
} else if (tk_str_eq(DRAGGABLE_PROP_ALLOW_OUT_OF_SCREEN, name)) {
|
||||
draggable_set_allow_out_of_screen(widget, value_bool(v));
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
return RET_NOT_FOUND;
|
||||
@ -244,19 +259,18 @@ static ret_t draggable_on_parent_pointer_down(void* ctx, event_t* e) {
|
||||
static ret_t draggable_move_target(widget_t* widget, xy_t x, xy_t y) {
|
||||
widget_t* target = NULL;
|
||||
draggable_t* draggable = DRAGGABLE(widget);
|
||||
native_window_t* nw = widget_get_native_window(widget);
|
||||
return_value_if_fail(draggable != NULL, RET_BAD_PARAMS);
|
||||
|
||||
target = draggable_get_target(widget);
|
||||
return_value_if_fail(target != NULL, RET_BAD_PARAMS);
|
||||
|
||||
xy_t min_x = draggable->left != DRAGGABLE_UNSPECIFIED_NUM ? draggable->left : 0;
|
||||
xy_t min_y = draggable->top != DRAGGABLE_UNSPECIFIED_NUM ? draggable->top : 0;
|
||||
xy_t min_x = draggable->left != DRAGGABLE_UNSPECIFIED_NUM ? draggable->left : (draggable->allow_out_of_screen ? 1 - target->w : 0);
|
||||
xy_t min_y = draggable->top != DRAGGABLE_UNSPECIFIED_NUM ? draggable->top : (draggable->allow_out_of_screen ? 1 - target->h : 0);
|
||||
xy_t max_x =
|
||||
(draggable->right != DRAGGABLE_UNSPECIFIED_NUM ? draggable->right : target->parent->w) -
|
||||
target->w;
|
||||
draggable->right != DRAGGABLE_UNSPECIFIED_NUM ? draggable->right - target->w : (draggable->allow_out_of_screen ? nw->rect.w - 1 : target->parent->w - target->w);
|
||||
xy_t max_y =
|
||||
(draggable->bottom != DRAGGABLE_UNSPECIFIED_NUM ? draggable->bottom : target->parent->h) -
|
||||
target->h;
|
||||
draggable->bottom != DRAGGABLE_UNSPECIFIED_NUM ? draggable->bottom - target->h : (draggable->allow_out_of_screen ? nw->rect.h - 1 : target->parent->h - target->h);
|
||||
|
||||
if (min_x < max_x) {
|
||||
x = tk_clampi(x, min_x, max_x);
|
||||
@ -382,6 +396,7 @@ widget_t* draggable_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) {
|
||||
draggable->horizontal_only = FALSE;
|
||||
draggable->drag_window = FALSE;
|
||||
draggable->pressed = FALSE;
|
||||
draggable->allow_out_of_screen = FALSE;
|
||||
widget_set_sensitive(widget, FALSE);
|
||||
|
||||
return widget;
|
||||
|
@ -93,6 +93,13 @@ typedef struct _draggable_t {
|
||||
*/
|
||||
int32_t right;
|
||||
|
||||
/**
|
||||
* @property {bool_t} allow_out_of_screen
|
||||
* @annotation ["set_prop","get_prop","readable","persitent","design","scriptable"]
|
||||
* 支持超出原生窗口边界拖动。(无法完全移出原生窗口,同时优先受到拖动范围限制的影响)
|
||||
*/
|
||||
bool_t allow_out_of_screen;
|
||||
|
||||
/**
|
||||
* @property {bool_t} vertical_only
|
||||
* @annotation ["set_prop","get_prop","readable","persitent","design","scriptable"]
|
||||
@ -224,6 +231,18 @@ ret_t draggable_set_vertical_only(widget_t* widget, bool_t vertical_only);
|
||||
*/
|
||||
ret_t draggable_set_horizontal_only(widget_t* widget, bool_t horizontal_only);
|
||||
|
||||
/**
|
||||
* @method draggable_set_allow_out_of_screen
|
||||
* 设置是否无范围限制拖动。
|
||||
* 备注:可以让窗口拖动到外面去。
|
||||
* @annotation ["scriptable"]
|
||||
* @param {widget_t*} widget widget对象。
|
||||
* @param {bool_t} allow_out_of_screen 是否无范围限制拖动。
|
||||
*
|
||||
* @return {ret_t} 返回RET_OK表示成功,否则表示失败。
|
||||
*/
|
||||
ret_t draggable_set_allow_out_of_screen(widget_t* widget, bool_t allow_out_of_screen);
|
||||
|
||||
/**
|
||||
* @method draggable_set_drag_window
|
||||
* 设置drag_window。
|
||||
@ -265,6 +284,7 @@ ret_t draggable_set_drag_parent(widget_t* widget, uint32_t drag_parent);
|
||||
#define DRAGGABLE_PROP_RIGHT "right"
|
||||
#define DRAGGABLE_PROP_DRAG_WINDOW "drag_window"
|
||||
#define DRAGGABLE_PROP_DRAG_PARENT "drag_parent"
|
||||
#define DRAGGABLE_PROP_ALLOW_OUT_OF_SCREEN "allow_out_of_screen"
|
||||
#define DRAGGABLE_PROP_VERTICAL_ONLY "vertical_only"
|
||||
#define DRAGGABLE_PROP_HORIZONTAL_ONLY "horizontal_only"
|
||||
#define DRAGGABLE_PROP_DRAG_NATIVE_WINDOW "drag_native_window"
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "tkc/utils.h"
|
||||
#include "base/enums.h"
|
||||
#include "widgets/overlay.h"
|
||||
#include "base/window_manager.h"
|
||||
|
||||
static ret_t overlay_set_prop(widget_t* widget, const char* name, const value_t* v) {
|
||||
return_value_if_fail(widget != NULL && name != NULL && v != NULL, RET_BAD_PARAMS);
|
||||
@ -31,6 +32,8 @@ static ret_t overlay_set_prop(widget_t* widget, const char* name, const value_t*
|
||||
return overlay_set_click_through(widget, value_bool(v));
|
||||
} else if (tk_str_eq(name, WIDGET_PROP_ALWAYS_ON_TOP)) {
|
||||
return overlay_set_always_on_top(widget, value_bool(v));
|
||||
} else if (tk_str_eq(name, OVERLAY_PROP_MODELESS)) {
|
||||
return overlay_set_modeless(widget, value_bool(v));
|
||||
}
|
||||
|
||||
return window_base_set_prop(widget, name, v);
|
||||
@ -46,11 +49,35 @@ static ret_t overlay_get_prop(widget_t* widget, const char* name, value_t* v) {
|
||||
} else if (tk_str_eq(name, WIDGET_PROP_ALWAYS_ON_TOP)) {
|
||||
value_set_bool(v, overlay->always_on_top);
|
||||
return RET_OK;
|
||||
} else if (tk_str_eq(name, OVERLAY_PROP_MODELESS)) {
|
||||
value_set_bool(v, overlay->modeless);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
return window_base_get_prop(widget, name, v);
|
||||
}
|
||||
|
||||
static ret_t overlay_on_event(widget_t* widget, event_t* e) {
|
||||
overlay_t* overlay = OVERLAY(widget);
|
||||
return_value_if_fail(overlay != NULL && e != NULL, RET_BAD_PARAMS);
|
||||
if (overlay->modeless) {
|
||||
switch (e->type) {
|
||||
case EVT_FOCUS: {
|
||||
uint32_t index = window_manager()->children->size;
|
||||
widget_set_state(widget, WIDGET_STATE_FOCUSED);
|
||||
widget_restack(widget, index - 1);
|
||||
break;
|
||||
}
|
||||
case EVT_BLUR:
|
||||
widget_set_state(widget, WIDGET_STATE_NORMAL);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return window_base_on_event(widget, e);
|
||||
}
|
||||
|
||||
static bool_t overlay_is_point_in(widget_t* widget, xy_t x, xy_t y) {
|
||||
xy_t xx = 0;
|
||||
xy_t yy = 0;
|
||||
@ -88,7 +115,7 @@ TK_DECL_VTABLE(overlay) = {.type = WIDGET_TYPE_OVERLAY,
|
||||
.clone_properties = s_overlay_properties,
|
||||
.on_copy = overlay_on_copy,
|
||||
.persistent_properties = s_overlay_properties,
|
||||
.on_event = window_base_on_event,
|
||||
.on_event = overlay_on_event,
|
||||
.on_paint_self = window_base_on_paint_self,
|
||||
.on_paint_begin = window_base_on_paint_begin,
|
||||
.on_paint_end = window_base_on_paint_end,
|
||||
@ -124,3 +151,12 @@ ret_t overlay_set_always_on_top(widget_t* widget, bool_t always_on_top) {
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
ret_t overlay_set_modeless(widget_t* widget, bool_t modeless) {
|
||||
overlay_t* overlay = OVERLAY(widget);
|
||||
return_value_if_fail(overlay != NULL, RET_BAD_PARAMS);
|
||||
|
||||
overlay->modeless = modeless;
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
@ -91,6 +91,16 @@ typedef struct _overlay_t {
|
||||
*
|
||||
*/
|
||||
bool_t always_on_top;
|
||||
|
||||
/**
|
||||
* @property {bool_t} modeless
|
||||
* @annotation ["set_prop","get_prop","readable","persitent","design","scriptable"]
|
||||
* 非模态窗口。
|
||||
*
|
||||
* 缺省不启用。
|
||||
*
|
||||
*/
|
||||
bool_t modeless;
|
||||
} overlay_t;
|
||||
|
||||
/**
|
||||
@ -129,6 +139,17 @@ ret_t overlay_set_click_through(widget_t* widget, bool_t click_through);
|
||||
*/
|
||||
ret_t overlay_set_always_on_top(widget_t* widget, bool_t always_on_top);
|
||||
|
||||
/**
|
||||
* @method overlay_set_modeless
|
||||
* 设置是否非模态窗口模式。
|
||||
* @annotation ["scriptable"]
|
||||
* @param {widget_t*} widget 控件对象。
|
||||
* @param {bool_t} modeless 是否非模态窗口模式。
|
||||
*
|
||||
* @return {ret_t} 返回RET_OK表示成功,否则表示失败。
|
||||
*/
|
||||
ret_t overlay_set_modeless(widget_t* widget, bool_t modeless);
|
||||
|
||||
/**
|
||||
* @method overlay_cast
|
||||
* 转换为overlay对象(供脚本语言使用)。
|
||||
@ -139,6 +160,8 @@ ret_t overlay_set_always_on_top(widget_t* widget, bool_t always_on_top);
|
||||
*/
|
||||
widget_t* overlay_cast(widget_t* widget);
|
||||
|
||||
#define OVERLAY_PROP_MODELESS "modeless"
|
||||
|
||||
#define OVERLAY(widget) ((overlay_t*)(overlay_cast(WIDGET(widget))))
|
||||
|
||||
/*public for subclass and runtime type check*/
|
||||
|
@ -95,7 +95,7 @@ static widget_t* window_manager_find_prev_window(widget_t* widget) {
|
||||
nr = widget->children->size;
|
||||
for (i = nr - 2; i >= 0; i--) {
|
||||
widget_t* iter = (widget_t*)(widget->children->elms[i]);
|
||||
if (widget_is_normal_window(iter) || widget_is_dialog(iter) || widget_is_popup(iter)) {
|
||||
if (widget_is_normal_window(iter) || widget_is_dialog(iter) || widget_is_popup(iter) || (widget_is_overlay(iter) && !widget_is_always_on_top(iter))) {
|
||||
return iter;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user