Giter Site home page Giter Site logo

dragonitespam / emu Goto Github PK

View Code? Open in Web Editor NEW
36.0 36.0 3.0 1.9 MB

UI for GameMaker. Looks like Windows Forms. Use this if you're not making a game, or otherwise if you want your game to look like tax software or something.

Home Page: https://dragonite.itch.io/emu

License: MIT License

Yacc 25.86% Game Maker Language 68.04% GLSL 6.10%
gamemaker gamemaker-language gamemaker-projects gamemaker-studio-2 gui

emu's People

Contributors

dragonitespam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

emu's Issues

Crash when closing a Dialog containing an EmuList

Code used from the Example Section on EmuList on the Wiki:

Variable EmuList.own_entries(102128, -2147483648) not set before reading it.
at gml_Script_anon_EmuList_gml_GlobalScript_EmuList_15380_EmuList_gml_GlobalScript_EmuList (line 370) - if (own_entries) ds_list_destroy(_entries);
############################################################################################
gml_Script_anon_EmuList_gml_GlobalScript_EmuList_15380_EmuList_gml_GlobalScript_EmuList (line 370)
gml_Script_anon_EmuCore_gml_GlobalScript_Emu_Core_3875_EmuCore_gml_GlobalScript_Emu_Core (line 134) - _contents[| i].Destroy();
gml_Script_anon_EmuCore_gml_GlobalScript_Emu_Core_3800_EmuCore_gml_GlobalScript_Emu_Core (line 128) - destroyContent();
gml_Script_anon_EmuDialog_gml_GlobalScript_EmuDialog_937_EmuDialog_gml_GlobalScript_EmuDialog (line 38) - top.Destroy();
gml_Script_anon_EmuDialog_gml_GlobalScript_EmuDialog_303_EmuDialog_gml_GlobalScript_EmuDialog (line 8) - SetCallback(function() { Close(); });
gml_Script_anon_EmuDialog_gml_GlobalScript_EmuDialog_1313_EmuDialog_gml_GlobalScript_EmuDialog (line 132) - callback();
gml_Script_anon_EmuCore_gml_GlobalScript_Emu_Core_3104_EmuCore_gml_GlobalScript_Emu_Core (line 107) - if (_contents[| i]) _contents[| i].Render(at_x, at_y);
gml_Script_anon_EmuCore_gml_GlobalScript_Emu_Core_2870_EmuCore_gml_GlobalScript_Emu_Core (line 102) - renderContents(x + base_x, y + base_y);
gml_Object_oCharSheet_Draw_64 (line 2) - EmuOverlay.Render();

Buttons inside Tabs inside Dialogs not working

When placing an EmuButton inside a EmuTab which is inside an EmuDialog, the Button does not respond to clicks anymore and appears visually as being hovered.

Here a screenshot and the code used:
grafik

dialog = new EmuDialog(400, 600, "Character");

var group = new EmuTabGroup(0, EMU_AUTO, 400, 320, 2, 32);
var tab_inv = new EmuTab("Inventory");
var tab_com = new EmuTab("Combat");
var tab_rs = new EmuTab("Relationships");
var tab_dg = new EmuTab("Dialogue");
var tab_ai = new EmuTab("AI");
group.AddTabs(0, [tab_inv, tab_com, tab_rs]);
group.AddTabs(1, [tab_dg, tab_ai]);

tab_inv.AddContent(new EmuText(32, 32, 256, 32, "Text label"));
btn = new EmuButton(32, 64, 256, 32, "Top Button", function(){log("hi")})
tab_inv.AddContent(btn);
tab_inv.AddContent(new EmuButton(32, 96, 256, 32, "Bottom Button", emu_null));

dialog.AddContent(group);

Error when Clicking on a Textbox

Hey Michael,

I finally got time to use this life-saving extension and I encountered an error I don't understand. ๐Ÿค”

When I click in one of my text boxes I get this error:

############################################################################################
ERROR in
action number 1
of Create Event
for object obj_global_3:

Unbalanced surface stack. You MUST use surface_reset_target() for each set.############################################################################################

I looked everywhere in the included obj_emu_demo for surface_reset_target() and it is never referenced so I don't know what's happening.

This is how I'm adding the textbox, if it helps:

tab_newtask.AddContent([
	new EmuText(32, EMU_AUTO, 512, 32, "New Task"),
	new EmuTextbox_H(32, EMU_AUTO, 512, 32, "Title:", task_new.title, "Empty", 32, E_InputTypes.STRING, function()
		{ task_new.title = value })
]);

Hope you can help me with this. I'm enjoying this extension so far! ๐Ÿ˜„

Cheers,
Posho

Crashes when using the EmuColorPicker Class

Here are some crashes i encountered when experimenting with the EmuColorPicker Class:

When Clicking on a Color Picker, code used from the Wiki Example:

Variable <unknown_object>.controls(102449, -2147483648) not set before reading it.
at gml_Script_anon_EmuColorPicker_gml_GlobalScript_EmuInput_ColorPicker_1069_EmuColorPicker_gml_GlobalScript_EmuInput_ColorPicker (line 319) - dialog.el_picker = new controls(32, EMU_AUTO, ew, eh, value, _allow_alpha, function() {
############################################################################################
gml_Script_anon_EmuColorPicker_gml_GlobalScript_EmuInput_ColorPicker_1069_EmuColorPicker_gml_GlobalScript_EmuInput_ColorPicker (line 319)
gml_Script_anon_EmuCore_gml_GlobalScript_Emu_Core_3104_EmuCore_gml_GlobalScript_Emu_Core (line 107) - if (_contents[| i]) _contents[| i].Render(at_x, at_y);
gml_Script_anon_EmuCore_gml_GlobalScript_Emu_Core_2870_EmuCore_gml_GlobalScript_Emu_Core (line 102) - renderContents(x + base_x, y + base_y);
gml_Object_oCharSheet_Draw_64 (line 1) - container.Render();

When closing an Overlay containing a Color Picker:

Variable EmuColorPicker._surface(100615, -2147483648) not set before reading it.
at gml_Script_anon_EmuColorPicker_gml_GlobalScript_EmuInput_ColorPicker_19158_EmuColorPicker_gml_GlobalScript_EmuInput_ColorPicker (line 351) - if (surface_exists(_surface)) surface_free(_surface);
############################################################################################
gml_Script_anon_EmuColorPicker_gml_GlobalScript_EmuInput_ColorPicker_19158_EmuColorPicker_gml_GlobalScript_EmuInput_ColorPicker (line 351)
gml_Script_anon_EmuCore_gml_GlobalScript_Emu_Core_3875_EmuCore_gml_GlobalScript_Emu_Core (line 134) - _contents[| i].Destroy();
gml_Script_anon_EmuCore_gml_GlobalScript_Emu_Core_3800_EmuCore_gml_GlobalScript_Emu_Core (line 128) - destroyContent();
gml_Script_anon_EmuDialog_gml_GlobalScript_EmuDialog_937_EmuDialog_gml_GlobalScript_EmuDialog (line 38) - top.Destroy();
gml_Script_anon_EmuDialog_gml_GlobalScript_EmuDialog_303_EmuDialog_gml_GlobalScript_EmuDialog (line 8) - SetCallback(function() { Close(); });
gml_Script_anon_EmuDialog_gml_GlobalScript_EmuDialog_1313_EmuDialog_gml_GlobalScript_EmuDialog (line 132) - callback();
gml_Script_anon_EmuCore_gml_GlobalScript_Emu_Core_3104_EmuCore_gml_GlobalScript_Emu_Core (line 107) - if (_contents[| i]) _contents[| i].Render(at_x, at_y);
gml_Script_anon_EmuCore_gml_GlobalScript_Emu_Core_2870_EmuCore_gml_GlobalScript_Emu_Core (line 102) - renderContents(x + base_x, y + base_y);
gml_Object_obj_emu_demo_Draw_0 (line 2) - EmuOverlay.Render();

Also one little thing i noticed, at EmuInput Line 133&134 the Line is duplicated both are surface_set_target(_surface);

Inconsistencies with EmuList

The Wiki Entry shows these as the arguments for a EmuList constructor:
EmuList(x, y, w, h, text, text_vacant, element_height, content_slots, callback, [list])
in the Descriptions on the Wiki they are different ones and in engine they are different ones yet, in engine they are:
EmuList(x, y, w, h, text, element_height, content_slots, callback)

Also element_height does not do what expected, maybe i misunderstood the purpose without the wiki explaining.

I expected element_height to be the Height of each of the entries, from my testing thats what h does, i expected h to be the height of the whole list. But that can be achieved with a combination of h + content_slots, although only in increments of each entries height.

element_height does not do anything in my testing, even setting it to very high values, made no visual difference.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.