ID:2019676
 
Ok so I wanted to start this so we can all share what cool tricks or nifty features we made with the interface element. I found a nifty way to make the bar element more unique in appear by using a transparent label over them using text to give a more retro look. What about you guys?
Using a pop-up window with a grid, to create custom switchs instead of the visually boring one built-in.

(Dont mind the size or the text of this one, its just to show-off)

I don't often see this, but I use map objects to create previews of saved characters on main menu screens. I add fancy backgrounds to them too to make it more visually appealing.
Ex:

    var/savefile/save_file = new("#SAVE/[target.ckey]/[slot].sav")
var/obj/character_handle/preview = target.saved_previews[slot]
preview.icon = preview.preview_stats["preview_icon"]
preview.overlays = preview.preview_stats["preview_overlays"]
preview.underlays += 'testing_background.dmi'
preview.screen_loc = "preview[slot]:1,1"
target.client.screen += preview
In response to Maximus_Alex2003
Maximus_Alex2003 wrote:
I don't often see this, but I use map objects to create previews of saved characters on main menu screens. I add fancy backgrounds to them too to make it more visually appealing.
Ex:

>   var/savefile/save_file = new("#SAVE/[target.ckey]/[slot].sav")
> var/obj/character_handle/preview = target.saved_previews[slot]
> preview.icon = preview.preview_stats["preview_icon"]
> preview.overlays = preview.preview_stats["preview_overlays"]
> preview.underlays += 'testing_background.dmi'
> preview.screen_loc = "preview[slot]:1,1"
> target.client.screen += preview
>


Thats awesome! That's also how my turn-based battle is done in Pokemon Atom.


In response to Maximus_Alex2003
Would you mind showing me how you accomplish this, exactly? I'm not too familiar with how the savefiles are set up to abuse them in such a manner.
Map objects are good if you're trying for the whole fancy background stuff. I'd personally use a browser and javascript to get the job done.

EDIT-
this UI is using 2 browsers and javascript to get the job done, it's mainly using client.Export() to pass information through
client.Export()

You can directly call javascript with output() no need to use topic foo.

You can also directly call verbs from javascript using the byond://winset?id=&command= format.
performance wize is browser javascrip better then just using Map objects or directly Skin interface grids and stuff like that?
In response to Ter13
Ter13 wrote:
client.Export()

You can directly call javascript with output() no need to use topic foo.

You can also directly call verbs from javascript using the byond://winset?id=&command= format.

Wow, did not know this gonna try this out. You dont need to put the ip and port?
In response to Ishuri
Ishuri wrote:
Ter13 wrote:
You can directly call javascript with output() no need to use topic foo.

You can also directly call verbs from javascript using the byond://winset?id=&command= format.

Wow, did not know this gonna try this out. You dont need to put the ip and port?

Nope. Basically what's happening here is that the client grabs the link when you click it (or when using window.location) and interprets it. Since you're already connected to a world, anything that's just byond://?something will go right to world.Topic(), and this special winset URL is recognized by the client just like a client-side .winset command or a winset() call.
I'd like an answer to my question above please :o! Thanks!
In response to Zasif
Zasif wrote:
performance wize is browser javascrip better then just using Map objects or directly Skin interface grids and stuff like that?

Well I'm not sure how much more efficient calling verbs with javascript is compared to actual skin objects rendering, because they'd have to go through the server first, but relatively, javascript is a lot faster especially when it's concentrated on the client only.

Lummox JR wrote:
Nope. Basically what's happening here is that the client grabs the link when you click it (or when using window.location) and interprets it. Since you're already connected to a world, anything that's just byond://?something will go right to world.Topic(), and this special winset URL is recognized by the client just like a client-side .winset command or a winset() call.

If you're not already connected, would this information still pass through if it included the ip and port?
Figured, since back in 2011, played http://www.byond.com/games/SuperAntx/PascalsChallenge#
an offline game and the score updated still. Now I know for sure what I want can be done.

#28 Dakumonki 00:46.4
I didn't tryhard enough back then.
In response to Ishuri
Ishuri wrote:
If you're not already connected, would this information still pass through if it included the ip and port?

It'll try to connect you to the server and what comes after the ? would be loaded into the first parameter of client.New().

Baird wrote:
Figured, since back in 2011, played http://www.byond.com/games/SuperAntx/PascalsChallenge#
an offline game and the score updated still. Now I know for sure what I want can be done.

#28 Dakumonki 00:46.4
I didn't tryhard enough back then.

Hub scores are an archaic concept by now and have nothing to do with an interface at all.
interface is probably the hardest thing i get across in developing a game idk why
interface is probably the hardest thing i get across in developing a game idk why

Agreed. It's just boring code to write and it takes forever, and every time you turn around there's a new interface to write.
In response to Shatan
Referring to how an offline game can send and receive stuff anyway. Which is great for me, and sad that people don't utilize it.
In response to Ter13
Ter13 wrote:
Agreed. It's just boring code to write and it takes forever, and every time you turn around there's a new interface to write.

Funny because I think exactly the opposite. Designing and programming UI elements is always the thing I'm most interested in doing, usually I save it for a rainy day.