Format
This commit is contained in:
+18
-8
@@ -62,8 +62,12 @@ function ui_box_render() {
|
||||
let apph: i32 = sys_height();
|
||||
let mw: i32 = math_floor(ui_box_modalw * zui_SCALE(ui));
|
||||
let mh: i32 = math_floor(ui_box_modalh * zui_SCALE(ui));
|
||||
if (mw > appw) mw = appw;
|
||||
if (mh > apph) mh = apph;
|
||||
if (mw > appw) {
|
||||
mw = appw;
|
||||
}
|
||||
if (mh > apph) {
|
||||
mh = apph;
|
||||
}
|
||||
let left: i32 = math_floor(appw / 2 - mw / 2);
|
||||
let top: i32 = math_floor(apph / 2 - mh / 2);
|
||||
|
||||
@@ -81,8 +85,12 @@ function ui_box_render() {
|
||||
zui_end_element();
|
||||
|
||||
///if (krom_windows || krom_linux || krom_darwin)
|
||||
if (ui_box_copyable) zui_row([1 / 3, 1 / 3, 1 / 3]);
|
||||
else zui_row([2 / 3, 1 / 3]);
|
||||
if (ui_box_copyable) {
|
||||
zui_row([1 / 3, 1 / 3, 1 / 3]);
|
||||
}
|
||||
else {
|
||||
zui_row([2 / 3, 1 / 3]);
|
||||
}
|
||||
///else
|
||||
zui_row([2 / 3, 1 / 3]);
|
||||
///end
|
||||
@@ -131,11 +139,11 @@ function ui_box_show_message(title: string, text: string, copyable: bool = false
|
||||
///end
|
||||
}
|
||||
|
||||
function ui_box_show_custom(commands: (ui: zui_t)=>void = null, mw: i32 = 400, mh: i32 = 200, onHide: ()=>void = null, draggable: bool = true) {
|
||||
function ui_box_show_custom(commands: (ui: zui_t)=>void = null, mw: i32 = 400, mh: i32 = 200, on_hide: ()=>void = null, draggable: bool = true) {
|
||||
ui_box_init();
|
||||
ui_box_modalw = mw;
|
||||
ui_box_modalh = mh;
|
||||
ui_box_modal_on_hide = onHide;
|
||||
ui_box_modal_on_hide = on_hide;
|
||||
ui_box_commands = commands;
|
||||
ui_box_draggable = draggable;
|
||||
///if (krom_android || krom_ios)
|
||||
@@ -152,7 +160,9 @@ function ui_box_hide() {
|
||||
}
|
||||
|
||||
function ui_box_hide_internal() {
|
||||
if (ui_box_modal_on_hide != null) ui_box_modal_on_hide();
|
||||
if (ui_box_modal_on_hide != null) {
|
||||
ui_box_modal_on_hide();
|
||||
}
|
||||
ui_box_show = false;
|
||||
base_redraw_ui();
|
||||
}
|
||||
@@ -162,7 +172,7 @@ function ui_box_tween_in() {
|
||||
// tween_reset();
|
||||
// tween_to({target: UIBox, props: { ui_box_tween_alpha: 0.5 }, duration: 0.2, ease: ease_t.EXPO_OUT});
|
||||
// ui_box_hwnd.drag_y = math_floor(sys_height() / 2);
|
||||
// tween_to({target: ui_box_hwnd, props: { dragY: 0 }, duration: 0.2, ease: ease_t.EXPO_OUT, tick: () => { base_redraw_ui(); }});
|
||||
// tween_to({target: ui_box_hwnd, props: { dragY: 0 }, duration: 0.2, ease: ease_t.EXPO_OUT, tick: function () { base_redraw_ui(); }});
|
||||
}
|
||||
|
||||
function ui_box_tween_out() {
|
||||
|
||||
Reference in New Issue
Block a user