Author Topic: Query: Menus  (Read 2795 times)

0 Members and 1 Guest are viewing this topic.

Offline Spartanis

Query: Menus
« on: July 08, 2012, 01:11:11 AM »
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])


Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8830
  • Total likes: 324
  • Helpful: 229
  • Languages: De,EN,JP
Re: Query: Menus
« Reply #1 on: July 09, 2012, 07:55:49 AM »
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.)

Online Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4280
  • Total likes: 196
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Query: Menus
« Reply #2 on: July 09, 2012, 08:18:51 AM »
It seems to be a very small change to enable what Spartanis is asking for. Just add
Code: [Select]
if(icon!=IMG_LEER) {
adtool->icon = icon;
}
after line 616 in simmenu.cc
Parsley, sage, rosemary, and maggikraut.

Online Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4280
  • Total likes: 196
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Query: Menus
« Reply #3 on: July 09, 2012, 06:38:19 PM »
@Spartanis: you might check back with nightly r5819.

then you can add an icon number to the separator:
Code: [Select]
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)
« Last Edit: July 09, 2012, 07:48:25 PM by Dwachs »
Parsley, sage, rosemary, and maggikraut.

Offline Spartanis

Re: Query: Menus
« Reply #4 on: July 10, 2012, 09:16:48 AM »
Dwachs

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

Offline kierongreen

Re: Query: Menus
« Reply #5 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...

Offline Spartanis

Re: Query: Menus
« Reply #6 on: July 10, 2012, 10:15:01 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...