123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|474|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> JSE -> JSE Gui

Mon, 03 Feb 2025, 08:07
Jayenkai

JSE Gui




Work has commenced on JSE Gui. I'm not really sure why I'm doing this, if I'm honest, but I found myself wondering why I hadn't yet, so .. Guess that's a good enough reason!

GuiButton works exactly like Text, except it draws it as a button, pushes in when held, and returns a value.
a=GuiButton(x,y,"Button Text",centered);
Where a== 0 = Nothing, 1 = Just Clicked, 2 = Held, 3 = Just Released

GuiSiders are roughly the same to begin with, but then go crazy!
a=GuiSlider(Center X, CenterY, VariableName, Min, Max, Steps, Width);
Where a is the same set of values. VariableName is overwritten with the new value whenever you move the slider.

There's also GuiVSlider for vertical sliders. Same values.

You can also SetGuiHSV or SetGuiRGB (SetGuiColour) to change the .. colour!!!

And that's all I've done, today. That took bloody hours, that did!!!

I've not uploaded anything yet. It's still very much a work in progress.. You can currently freak out the script if you set slider values so they end up dividing by zero, for example.
But.. hey, it's a start!!

Todo : Sanitise all the values, make a text input box (aargh!), check buttons, radio buttons.
I might add a Text output box, too, which word-wraps. We'll have to see if I can manage such a thing.

Is there anything else I should add to this?

-=-=-
''Load, Next List!''
Mon, 03 Feb 2025, 09:32
Dan
Built-in Gui buttons/elements are always useful ...

And some kind of Edit box/field in which you can read out the values/paste in the text from the clipboard / output text ...
Mon, 03 Feb 2025, 10:10
cyangames
\o/
Sat, 15 Feb 2025, 07:27
Jayenkai


I swear, this is on its way!!!! Been too busy game-dev'ing to get around to any of it.

Trying to get that Edit box to work properly, today, though.
I'm going to have to limit it to one single edit box, I think, as it's kinda messy trying to get it to function at all.

I'm having to create a html text-area within the boundary you set, which means I need to figure out where the graphics rectangle should be in the world of the actual window.
I need to scale it suitably, offsetting it depending on the scaling method.
I need to scale the font size depending on the current font settings and, again the scaling method.

And then there's the fact that JSE when in game mode practically disable any and all mouse/keyboard "normal" input, so I need to figure out when the player's clicked into the html box, and disable all the disabling so that it re-enabled the keyboard input and copy+paste and whatnot.
I ALSO have to send any input from the input box, back into the variable, when the user edits it.
... But ALSO allow "you" to change the content of the input box from your code, without overwriting what it may be that the user's put into the box.

OH MY GOD!!!

Good grief, this is WAY harder than I expected it to be!!!

-=-=-
''Load, Next List!''