News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Query: Menus

Started by Spartanis, July 08, 2012, 01:11:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Spartanis

Hi,, Is there a way to change the graphics of the SEPARATOR (-) of the menu?


I tried this way, by defining a new sep image in the pakfile (image[38]=> menu......)


toolbar[1][15]=-,38


Didnt work, than i tried:


toolbar[1][15]=general_tool[4],38


THAT worked.. but is works like a button function (clear slopes).. which is not what i wanted to do lol...


It seems the MENUSKIN pak image do not contain the relevant separator image... Im guessing its built into the simutrans code?


Above image contains both tries.... later is my new separator image (image[38])


prissi

This is just a default graphics for an empty button. However, adding a non-selectable dummy tool for such purposes should be fairly simple. In principle you might achieve the same calling a tool with an invalid (garbage) default string, like a builder tool with a non-existent way or house. (However, I did not played around with this much.)

Dwachs

It seems to be a very small change to enable what Spartanis is asking for. Just add

if(icon!=IMG_LEER) {
adtool->icon = icon;
}

after line 616 in simmenu.cc
Parsley, sage, rosemary, and maggikraut.

Dwachs

#3
@Spartanis: you might check back with nightly r5819.

then you can add an icon number to the separator:

toolbar[xx][yy]=-,22

where the number refers to the image number in menu.bartools (or refers to image[0] of a separate menu object)
Parsley, sage, rosemary, and maggikraut.

Spartanis

Dwachs

Thanks mate, will check it out.. But i hope this nightly also includes Double heights slopes feature as well?

kierongreen

No, however give me a couple of days and there'll be an updated double heights build with a few other bonus features...

Spartanis

Quote from: kierongreen on July 10, 2012, 09:49:26 AM
No, however give me a couple of days and there'll be an updated double heights build with a few other bonus features...

No rush mate, you guys are awesome.

Its a shame i dont know C++ or what ever the programming code is. I have done some extestive programming in my time, but thats the old qbasic. turbo pascal (not good at that one...) and mirc scripting

Im fluent with logic and thinking outside the box, just cannot "read" and "understand" the representation of C+ coding. Oh I tried,, but it fails me everytime.

I suspect if i ever get fluent in that.. i could write alot of brilliant new features in simutrans myself...