If we can't add new GUI directly to minecraft, then why don't we have block launcher to show it? Like it shows the menu button at the top of the screen. (The grey square with a wrench in it)
Like for example:
ModPe.addGuiMeter(x,y,size,outline color, bar color, background color, Max meter value,"name")
X and Y would be for telling it where on the screen to put the meter, the name would just be what the meter would be referred to by, it wouldn't actually show up.
getMeterValue("name");
This could be for when you wanna get the exact value of the meter, obviously.
ModPe.addGuiTextbox(x,y,size,Outline color,background color,"insert what would show up here","name")
I am working on a GUI for BlockLauncher. Anything what will come in my first commit (it is about a month from now):
a) Openable window
Opening a window:
var window = GUI.makeWindow(sizeX, sizeY, style);
-COMPONENT NAME-POSSIBLE FUNCTION NAME-
-Label (done, only font broken a little-invalid spacing for some letters) - GUI.addLabel(x, y, text, callback);
-Button (done, only font broken a little-invalid spacing for some letters) - GUI.addButton(window, x, y, sizeX, sizeY, text, callback);
-CheckBox (done!) - GUI.addCheckBox(window, x, y, callback); // it will be looking like the one in settings
-TextBox - GUI.addTextBox(window, x, y, sizeX, text);
HOPE FOR THESE TWO:
-ItemSlot/ItemGrid/any other name; Still I don't know.
-ScrollableView - GUI.addScrollableView(window, x, y, sizeX, sizeY); // will be passed as window
GUI API:
GUI.close(window);
b ) An in-game button
ModPE.addButton(id, img); // not done, I will check what to pass as the img param.
Which thread will the callbacks be called from? the UI thread on iOS/Android or the main game thread? Minecraft's supposed to be very picky about where its methods are called, and so does Android's UI. (Not sure about iOS.)
Like for example:
ModPe.addGuiMeter(x,y,size,outline color, bar color, background color, Max meter value,"name")
X and Y would be for telling it where on the screen to put the meter, the name would just be what the meter would be referred to by, it wouldn't actually show up.
getMeterValue("name");
This could be for when you wanna get the exact value of the meter, obviously.
ModPe.addGuiTextbox(x,y,size,Outline color,background color,"insert what would show up here","name")
ModPe.addGuiButton(x,y,size,outline color, background color, "text", "name")
Back to modding! Follow me on Twitter @byteandahalf
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumWhich thread will the callbacks be called from? the UI thread on iOS/Android or the main game thread? Minecraft's supposed to be very picky about where its methods are called, and so does Android's UI. (Not sure about iOS.)
-
View User Profile
-
View Posts
-
Send Message
Retired StaffThe golden age: it's not the game, it's you ⋆ Why Minecraft should not be harder ⋆ Spelling hints