IRC logs for #openttd.dev on OFTC at 2014-09-06
⏴ go to previous day
04:14:19 *** evansbee has joined #openttd.dev
09:14:00 *** Alberth has joined #openttd.dev
09:14:00 *** ChanServ sets mode: +v Alberth
09:34:06 *** amk has joined #openttd.dev
11:32:01 *** Supercheese is now known as Guest1618
11:32:04 *** Supercheese has joined #openttd.dev
11:32:04 *** ChanServ sets mode: +v Supercheese
12:18:30 *** Alberth has left #openttd.dev
13:25:30 *** amk has joined #openttd.dev
13:47:19 *** amk has joined #openttd.dev
14:01:49 *** Alberth has joined #openttd.dev
14:01:49 *** ChanServ sets mode: +v Alberth
14:06:35 *** frosch123 has joined #openttd.dev
14:06:35 *** ChanServ sets mode: +v frosch123
14:27:20 <frosch123> 20 should rename the variables
14:27:38 <frosch123> i think exporting a global name _internal_sort_order is no good idea
14:28:53 <frosch123> no, i mean without _ in the front, and with some puchase-list context
14:29:09 <frosch123> any list could have a name _internal_sort_order including arbirtary system libraries
14:29:31 <frosch123> it needs some kind of "namespace"
14:29:45 <frosch123> while we do not use namespaces, we need to use proper prefixes
14:30:17 <Alberth> or did the coding style on globals change?
14:30:44 <frosch123> doesn't that only apply to static variables?
14:31:08 <frosch123> anyway, it needs puchase list context nevertheless
14:32:06 <Alberth> Global variables are preceded by an underscore. ("_") <-- wiki
14:33:14 <frosch123> hmm, so if you change the sorting in the purchase list, it affects the autoreplace gui as well, and vice versa?
14:33:46 <frosch123> then toggling needs to invalidate more windows
14:35:48 <Alberth> no, the windows copy the last setting to their own data, and update the global setting when you change it
14:38:24 <frosch123> +STR_REPLACE_VEHICLE_YOUR_VEHICLES :{YELLOW}Your vehicles <- adressing the player personally feels unusual to me. not sure though. maybe "Vehicles in use"?
14:39:39 <frosch123> 50 needs saveload and changeowner/bankrupt code
14:40:06 <Alberth> bool _engine_sort_direction
14:40:06 <Alberth> byte _engine_sort_last_criteria[]
14:40:06 <Alberth> bool _engine_sort_last_order[] this better?
14:41:33 <frosch123> CmdSetVehicleVisibility in 50 may need to invalidate some more windows
14:41:49 <frosch123> or does AddRemoveEngineFromAutoreplaceAndBuildWindows do everything?
14:42:17 <frosch123> hmm, i guess it does :)
14:43:43 <Alberth> invalidates both vehicle build and autoreplace
14:45:05 <frosch123> + TextColour tc = (engine == selected_id ? TC_WHITE : (hidden ? TC_GREY : TC_BLACK)) | TC_NO_SHADE; <- 70: you also apply the TC_NO_SHADE to white. is that intentional?
14:47:02 <Alberth> it was, but I have no strong feelings about it
14:50:08 <frosch123> order gui is also weird about that :p
14:50:19 <frosch123> implicit orders have no shadow when selected and not selected
14:50:39 <frosch123> non-implicit orders have shadow when selected (black text has no shadow in any case iirc)
14:50:54 <frosch123> i wonder whether we can get these things ever consistent :p
14:52:25 <Alberth> you'd need a code style for gui layout :)
14:53:31 <Alberth> I can add a patch for the order gui :)
14:55:30 <frosch123> huh, when i apply your diff, the black text actually has a shadow, which looks really weird
14:55:42 <frosch123> how do i hide a vehicle?
14:57:43 <frosch123> hmm it also has a shadow when hidden, something is weird here
14:58:37 <frosch123> i think the "show all" button should say "show hidden", and there could be a button at the bottom to show/hide vehicles
14:59:03 <frosch123> the "show all" is too visible compared to the magic ctrl+click, so everyone will ask what it does :p
15:00:24 <frosch123> when holding ctrl and clicking multiple times, it hides an engine on the first click, and then builds the engine that moved up
15:00:41 <frosch123> maybe the ctrl should take precendencs over the double-click
15:00:55 <frosch123> so it continues to hide vehicles instead of switching to buying them
15:01:35 <frosch123> if i empty the list by hiding all engines and then ctrl+click an empty row, it crashes
15:04:19 <frosch123> hidden features in the hiding patch :)
15:26:49 <Alberth> renaming variables over a patch queue is such a pita
15:27:47 <frosch123> doesn't sed just work on tha .patch?
15:28:25 <Alberth> yeah, should have done that :)
15:28:47 <Alberth> also renamed the cargo filter thingie, it looked so lost on its own :)
15:37:41 <Alberth> s/your vehicles/vehicles in use/ seems fine to me
15:51:10 <Alberth> the other things take more work, thanks for the review
18:47:21 *** Zuu has joined #openttd.dev
19:22:58 *** Alberth has left #openttd.dev
22:30:27 *** Supercheese has joined #openttd.dev
22:30:27 *** ChanServ sets mode: +v Supercheese
22:56:13 *** tycoondemon has joined #openttd.dev
22:59:28 *** JGR has joined #openttd.dev
continue to next day ⏵