luboslenco vor 1 Monat
Ursprung
Commit
251da00f11

+ 0 - 0
base/sources/backends/AndroidHttpRequest.java → base/sources/backends/data/android_java/org/armory3d/AndroidHttpRequest.java


+ 2 - 2
base/sources/iron_ui.h

@@ -140,7 +140,7 @@ typedef struct ui {
 	int window_border_bottom;
 	int window_border_left;
 	int window_border_right;
-	char hovered_tab_name[64];
+	char hovered_tab_name[256];
 	float hovered_tab_x;
 	float hovered_tab_y;
 	float hovered_tab_w;
@@ -251,7 +251,7 @@ typedef struct ui {
 	bool tooltip_shown;
 	bool tooltip_wait;
 	double tooltip_time;
-	char tab_names[16][64];
+	char tab_names[16][256];
 	uint32_t tab_colors[16];
 	bool tab_enabled[16];
 	int tab_count; // Number of tab calls since window begin

+ 29 - 6
base/sources/ts/ui_menubar.ts

@@ -18,17 +18,38 @@ function ui_menubar_init() {
 	ui_menubar_menu_handle.layout = ui_layout_t.HORIZONTAL;
 }
 
-function ui_menubar_render_ui() {
-	let item_w: i32 = ui_toolbar_w();
+function ui_menu_panel_x(): i32 {
 	let panel_x: i32 = sys_x();
-
 	///if is_paint
 	if (config_raw.layout[layout_size_t.HEADER] == 1) {
+		let item_w: i32 = ui_toolbar_w();
 		panel_x = sys_x() - item_w;
 	}
+	else {
+		panel_x += 5 * UI_SCALE();
+	}
 	///end
+	return panel_x;
+}
+
+function ui_menu_panel_y(): i32 {
+	let panel_y: i32 = 0;
+	///if is_paint
+	if (config_raw.layout[layout_size_t.HEADER] == 1) {
+	}
+	else {
+		panel_y += 5 * UI_SCALE();
+	}
+	///end
+	return panel_y;
+}
+
+function ui_menubar_render_ui() {
+	let item_w: i32 = ui_toolbar_w();
+	let panel_x: i32 = ui_menu_panel_x();
+	let panel_y: i32 = ui_menu_panel_y();
 
-	if (ui_window(ui_menubar_menu_handle, panel_x, 0, ui_menubar_w, ui_header_h)) {
+	if (ui_window(ui_menubar_menu_handle, panel_x, panel_y, ui_menubar_w, ui_header_h)) {
 		ui._x += 1; // Prevent "File" button highlight on startup
 
 		ui_begin_menu();
@@ -732,8 +753,10 @@ function ui_menubar_show_menu(category: i32) {
 	ui_menu_commands = ui_menubar_draw_category_items;
 	ui_menubar_category = category;
 
-	ui_menu_x = math_floor(ui._x - ui._w);
-	ui_menu_y = math_floor(ui_MENUBAR_H());
+	let panel_x: i32 = ui_menu_panel_x();
+	let panel_y: i32 = ui_menu_panel_y();
+	ui_menu_x = math_floor(ui._x - ui._w) + panel_x;
+	ui_menu_y = math_floor(ui_MENUBAR_H()) + panel_y;
 	if (config_raw.touch_ui) {
 		let menu_w: i32 = math_floor(base_default_element_w * UI_SCALE() * 2.0);
 		ui_menu_x -= math_floor((menu_w - ui._w) / 2) + math_floor(ui_header_h / 2);

+ 2 - 2
base/sources/ts/ui_toolbar.ts

@@ -95,7 +95,7 @@ function ui_toolbar_render_ui() {
 
 	if (context_is_floating_toolbar()) {
 		x += ui_toolbar_x();
-		y += ui_toolbar_x();
+		y += ui_toolbar_x() + 3 * UI_SCALE();
 		h = (ui_toolbar_tool_names.length + 1) * (ui_toolbar_w() + 2);
 		ui.ops.theme.WINDOW_BG_COL = ui.ops.theme.SEPARATOR_COL;
 	}
@@ -234,7 +234,7 @@ function ui_toolbar_tool_properties_menu() {
 		if (ui_button(tr("Pin to Header"), ui_align_t.LEFT)) {
 			config_raw.layout[layout_size_t.HEADER] = 1;
 		}
-	}, math_floor(ui._x + ui._w + 2), math_floor(ui._y - 6 * UI_SCALE()));
+	}, math_floor(ui._x + ui._w + 6 * UI_SCALE()), math_floor(ui._y - 2 * UI_SCALE()));
 }
 
 function ui_toolbar_draw_highlight() {