Author Topic: scroll area help  (Read 1106 times)

0 Members and 1 Guest are viewing this topic.

Offline hreintke

scroll area help
« on: May 16, 2012, 02:57:46 PM »
LS,

I am learning simutrans, both playing and the source code. Making something visible is not (at least until now) the easiest part to understand. Especially the information with a scrollbarfield.  Is the some additional documentation/example which shows the way a scrollable field is filled with data ?

Any help appreciated.

Herman

Online Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4251
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Re: scroll area help
« Reply #1 on: May 16, 2012, 04:16:13 PM »
Do you have in mind to work on the code of a certain window?

Windows that have scrollable lists:

gui/schedule_list.* (Line management)
gui/depot_frame.* (Depot)

The list of selectable lines is filled in depot_frame_t::update_data() around line 880 in depot_frame.cc
Parsley, sage, rosemary, and maggikraut.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8823
  • Total likes: 323
  • Helpful: 229
  • Languages: De,EN,JP
Re: scroll area help
« Reply #2 on: May 16, 2012, 08:58:41 PM »
Probalby most straig forward is the use of scrollpanes in the various list windows. There are list of objects, which are drawn which an internal offset and a clipping region. Most easiest is probably the message list.