mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Rename from "Emigui" to "Egui"
Shorter to type (especially in code).
This commit is contained in:
@@ -195,13 +195,13 @@ function _assertClass(instance, klass) {
|
||||
}
|
||||
/**
|
||||
* @param {State} state
|
||||
* @param {string} raw_input_json
|
||||
* @param {string} web_input_json
|
||||
* @returns {string}
|
||||
*/
|
||||
__exports.run_gui = function(state, raw_input_json) {
|
||||
__exports.run_gui = function(state, web_input_json) {
|
||||
try {
|
||||
_assertClass(state, State);
|
||||
var ptr0 = passStringToWasm0(raw_input_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
var ptr0 = passStringToWasm0(web_input_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
||||
var len0 = WASM_VECTOR_LEN;
|
||||
wasm.run_gui(8, state.ptr, ptr0, len0);
|
||||
var r0 = getInt32Memory0()[8 / 4 + 0];
|
||||
@@ -479,14 +479,18 @@ async function init(input) {
|
||||
imports.wbg.__wbg_setItem_535f63295c5e7cec = handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
||||
getObject(arg0).setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
||||
});
|
||||
imports.wbg.__wbg_newnoargs_8aad4a6554f38345 = function(arg0, arg1) {
|
||||
var ret = new Function(getStringFromWasm0(arg0, arg1));
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbg_call_1f85aaa5836dfb23 = handleError(function(arg0, arg1) {
|
||||
var ret = getObject(arg0).call(getObject(arg1));
|
||||
return addHeapObject(ret);
|
||||
});
|
||||
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
||||
var ret = getObject(arg0);
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbg_newnoargs_8aad4a6554f38345 = function(arg0, arg1) {
|
||||
var ret = new Function(getStringFromWasm0(arg0, arg1));
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbg_self_c0d3a5923e013647 = handleError(function() {
|
||||
var ret = self.self;
|
||||
return addHeapObject(ret);
|
||||
@@ -543,10 +547,6 @@ async function init(input) {
|
||||
var ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
||||
var ret = getObject(arg0);
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbg_instanceof_Memory_ce2336191e545514 = function(arg0) {
|
||||
var ret = getObject(arg0) instanceof WebAssembly.Memory;
|
||||
return ret;
|
||||
|
||||
Binary file not shown.
@@ -8,7 +8,7 @@
|
||||
<!-- TODO: read https://www.html5rocks.com/en/mobile/mobifying/#toc-meta-viewport -->
|
||||
|
||||
<head>
|
||||
<title>Emigui – An experimental immediate mode GUI written in Rust</title>
|
||||
<title>Egui – An experimental immediate mode GUI written in Rust</title>
|
||||
<style>
|
||||
html {
|
||||
/* Remove touch delay: */
|
||||
@@ -61,7 +61,7 @@
|
||||
}
|
||||
|
||||
let input = {
|
||||
emigui: get_emigui_input(canvas),
|
||||
egui: get_egui_input(canvas),
|
||||
web: {
|
||||
location: window.location.toString(),
|
||||
location_hash: window.location.hash.toString(), // i.e. #fragment
|
||||
@@ -70,14 +70,14 @@
|
||||
|
||||
let output = JSON.parse(wasm_bindgen.run_gui(g_wasm_app, JSON.stringify(input)));
|
||||
// console.log(`output: ${JSON.stringify(output)}`);
|
||||
document.body.style.cursor = from_emigui_cursor(output.cursor_icon);
|
||||
document.body.style.cursor = from_egui_cursor(output.cursor_icon);
|
||||
// console.log(`Translated ${output.cursor_icon} to ${document.body.style.cursor}`);
|
||||
if (output.open_url) {
|
||||
window.open(output.open_url, "_self");
|
||||
}
|
||||
}
|
||||
|
||||
function from_emigui_cursor(cursor) {
|
||||
function from_egui_cursor(cursor) {
|
||||
if (cursor == "no_drop") { return "no-drop"; }
|
||||
else if (cursor == "not_allowed") { return "not-allowed"; }
|
||||
else if (cursor == "resize_horizontal") { return "ew-resize"; }
|
||||
@@ -111,7 +111,7 @@
|
||||
canvas.height = window.innerHeight * pixels_per_point();
|
||||
}
|
||||
|
||||
function get_emigui_input(canvas) {
|
||||
function get_egui_input(canvas) {
|
||||
var input = {
|
||||
mouse_down: g_mouse_down,
|
||||
mouse_pos: g_mouse_pos,
|
||||
|
||||
Reference in New Issue
Block a user