Dustin Carlino
9d828abbd0
move bus explorer to sandbox mode. make it start at the current stop
2019-10-30 12:20:04 -07:00
Dustin Carlino
7faeafd998
nice hatching for construction lanes, hackily encoded
2019-10-29 17:19:36 -07:00
Dustin Carlino
d757b45bff
manually workaround y inversion with stretched textures by modifying the
...
images
2019-10-29 16:36:19 -07:00
Dustin Carlino
0575e57584
tweaks to buttons
2019-10-29 15:45:26 -07:00
Dustin Carlino
aae6d6d998
cleanup: collapse the old separated modal menu groups
2019-10-29 15:37:19 -07:00
Dustin Carlino
7574869798
tie together a popup menu and a button in a really simple way. move some
...
info and location things there
2019-10-29 15:14:17 -07:00
Dustin Carlino
00253d2783
using textures for the hide/show buttons. making it easier to sometimes
...
upload expensive textures. draw show/hide buttons on top of modal menus,
even when they sometimes overlap.
2019-10-29 13:47:04 -07:00
Dustin Carlino
573fc4dc35
redo zooming towards mouse. support zooming really far out, useful for
...
huge_seattle
2019-10-29 11:50:29 -07:00
Dustin Carlino
0d948cef91
share camera state between game and map_editor
2019-10-26 16:16:32 -07:00
Dustin Carlino
7d7bfef5ea
filter out parking garages with 0 spots. render water on top of parks,
...
to workaround issue of the green lake park polygon covering everything
up
2019-10-26 11:37:10 -07:00
Dustin Carlino
cb4720946c
experiment with texturing cars, with some fun UV coordinates. looks half
...
reasonable when it works. breaks on duplicate points, not sure what's
wrong yet
2019-10-24 14:07:03 -07:00
Dustin Carlino
17e02ebdf0
adding in support for rotating textures, except missing y-inversion
2019-10-23 16:30:23 -07:00
Dustin Carlino
d133dfd152
experimentally use textures for pedestrians. add support for stretching
...
texture coordinates
2019-10-23 15:46:00 -07:00
Dustin Carlino
63127960c9
skip info phase of menus if there is no info
2019-10-21 15:28:31 -07:00
Dustin Carlino
56a277a284
show live parking counts in that analytics legend
2019-10-18 12:35:49 -07:00
Dustin Carlino
c70a57e7ae
click to cancel info panel
2019-10-17 11:29:02 -07:00
Dustin Carlino
b479c8afed
hotkeys and tooltips for buttons
2019-10-16 15:42:58 -07:00
Dustin Carlino
83d10c714b
toggle between 3 states for hiding modal menus
2019-10-16 15:21:13 -07:00
Dustin Carlino
10f2f6008f
improve map_editor's intersection preview
...
- timer for setting up world
- preview all intersections
- move world to map_editor; it's too oddly specialized
- dont show circle while previewing intersection geom
- show overlapping intersection polygons
2019-10-16 15:08:22 -07:00
Dustin Carlino
a1cc53d68a
redo mouseover when zooming, so that we never have current_selection when unzoomed.
2019-10-14 15:15:56 -07:00
Dustin Carlino
430b1245c4
working on a new traffic signal scroller. disabled. decent start.
2019-10-13 18:44:19 -07:00
Dustin Carlino
f82000cff4
just select entire road in map_editor. individual lanes were only for labeling one side of the road, which is only a theoretical feature for test maps. also dont allow swapping lanes uselessly.
2019-10-13 16:42:03 -07:00
Dustin Carlino
f772f12a7d
combining info/controls for map_editor sidebar
2019-10-13 16:14:47 -07:00
Dustin Carlino
5358931a5e
fixing up a few lingering places in the game that were constructing text prompts
2019-10-13 15:43:11 -07:00
Dustin Carlino
5304aa6ecf
trying out permanent sidebar in map_editor. no more tooltips
2019-10-13 15:31:17 -07:00
Dustin Carlino
df4d37f996
migrate some map_editor stuff to a proper modal menu. display constant
...
OSD for info and for controls.
2019-10-12 19:02:58 -07:00
Dustin Carlino
d82263978b
simpler context menu impl. finally delete the old one
2019-10-12 14:53:27 -07:00
Dustin Carlino
a077276275
rewriting the wizard menu from scratch too. also making sure to update
...
master GUI state (where's the cursor?) up-front. that's independent from
letting the canvas pan, a client decision
2019-10-12 10:24:07 -07:00
Dustin Carlino
f548ded8cc
most modalmenus will maintain layout themselves. also stop doing
...
layouting in constructors; the first event will work fine.
2019-10-11 20:45:27 -07:00
Dustin Carlino
f1cae9bd37
dont show info when modalmenu hidden, just title. simplify setting info
...
from outside.
2019-10-11 20:10:12 -07:00
Dustin Carlino
0ea138aa02
adding show/hide functionality back to modalmenu, but WAY more cleanly
2019-10-11 15:00:08 -07:00
Dustin Carlino
05b953d639
split sim summary onto two nice lines
2019-10-11 13:25:41 -07:00
Dustin Carlino
81addd9c8c
making menu label swaps more ergonomic
2019-10-11 13:15:14 -07:00
Dustin Carlino
f71d229594
ability to change menu labels. use for speed controls and debug mode.
2019-10-11 13:09:32 -07:00
Dustin Carlino
88be94e789
simple stacked layouting for text box, slider, and modal menu (rewritten
...
from scratch). not fully done, but perfectly usable and clean!
2019-10-11 12:37:48 -07:00
Dustin Carlino
21aa42891d
parameterizing slider dims, making them match menus
2019-10-09 15:03:23 -07:00
Dustin Carlino
da0b880484
place mouse tooltips away from screen edge, just like context menus
2019-10-09 11:21:04 -07:00
Dustin Carlino
ec7d0b463d
force modal menus beneath sliders to have top-left corner at a point; stop doing the jump left/right behavior based on running off the screen. need a proper vertical stacking layout thing for that.
2019-10-09 10:44:11 -07:00
Dustin Carlino
e0ae1d5195
tooltip with key bindings for hide/expand icons. doesn't look great
...
though.
2019-10-09 10:29:11 -07:00
Dustin Carlino
7c3a26fed8
making ItemSlider and all trip viz also combine menu and slider better
2019-10-07 14:54:42 -07:00
Dustin Carlino
3459d9c8fd
change default font size by flag
2019-10-07 10:39:09 -07:00
Dustin Carlino
e7507bad85
plumbing initial settings to ezgui better
2019-10-07 09:45:53 -07:00
Dustin Carlino
1df7c580f3
hack in a way for ModalMenu to work alongside a slider. use in
...
SpeedControls.
2019-10-05 17:01:33 -07:00
Dustin Carlino
47ccf2c70b
making normal ModalMenu be able to add/remove items. killing off DynamicMenu.
2019-10-05 14:59:59 -07:00
Dustin Carlino
bbbfc4a064
fold trip stats into new exclusive analytics thing, so it also auto-updates
2019-10-05 13:56:43 -07:00
Dustin Carlino
5f9cf2accd
display basic labels on trip stats
2019-10-01 19:28:03 -07:00
Dustin Carlino
b11f33f7f6
trying out a different type of menu for agent controls. explicitly
...
add/remove actions, and grow/shrink the menu based on temporarily
activated things
2019-09-24 13:02:23 -07:00
Dustin Carlino
ae31d2d983
disable cpuprofiler dep in ezgui by default, since it requires manually installing some other stuff
2019-09-23 13:37:47 -07:00
Dustin Carlino
f18fc72265
finish structopt removal
2019-09-18 17:29:34 -07:00
Dustin Carlino
4a12cdd36a
easy way to select and delete big chunk of stuff in synthetic
2019-09-16 10:16:56 -07:00
Dustin Carlino
1248dac270
nicer API for appending bits of text
2019-09-13 15:23:25 -07:00
Dustin Carlino
180fdd1412
builder API for World. restoring synthetic labels
2019-09-12 11:11:31 -07:00
Dustin Carlino
672899c20f
better synthetic drawing: lanes offset properly (still buggy...), draw center line
2019-09-12 10:25:34 -07:00
Dustin Carlino
353d89cd25
more synthetic fixes: redo mouseover when model changes, avoid panic
...
with 0-len new road line, fix reused IDs, fix contains_pt for
some precomputed polygons
2019-09-12 09:54:12 -07:00
Dustin Carlino
92a4f304f7
restoring functionality to synthetic: changing stuff updates the world
2019-09-11 17:08:11 -07:00
Dustin Carlino
cb7121162b
folding viewer into ezgui crate
2019-09-11 15:27:12 -07:00
Dustin Carlino
43de343372
stop serializing synthetic's model format, just save raw_data maps
2019-09-11 13:52:49 -07:00
Dustin Carlino
97361317ed
greying out choices in scoreboard that have no trips
2019-09-11 12:51:07 -07:00
Dustin Carlino
c8e3e9ce4b
rearrange colorscheme changing, so it doesnt happen in irrelevant modes
2019-09-11 12:43:06 -07:00
Dustin Carlino
612b02d526
migrating all callers off old methods. decided to keep choose_string
2019-09-11 12:32:17 -07:00
Dustin Carlino
aa3fed3395
builder-based API for wizard choosing stuff. need to convert other
...
callers now.
2019-09-11 11:52:34 -07:00
Dustin Carlino
224461fcdc
plumb hatching bit in the style vertex attrib, not this awkward stateful uniform value
2019-09-11 11:06:57 -07:00
Dustin Carlino
7eae18b71a
tiling all the textures seamlessly, instead of stretching
2019-09-11 10:46:03 -07:00
Dustin Carlino
ac131ebedf
moving some things around ezgui; i can never remember where to find some structs
2019-09-11 09:03:59 -07:00
Dustin Carlino
9ed38c849c
be able to flag off using textures, and sub a fallback color. also move texture loading into the loading screen. and fix the release script
2019-09-10 17:04:33 -07:00
Dustin Carlino
9867619c9c
generalize ezgui Color to also cleanly represent textured things
2019-09-10 16:41:35 -07:00
Dustin Carlino
5ef4ed16b8
packing texture info into the color Vertex channel
2019-09-10 16:08:01 -07:00
Dustin Carlino
9a624397e0
supporting up to 10 textures
2019-09-10 15:44:07 -07:00
Dustin Carlino
fdd770088d
very hacky, minimal impl of texturing water
2019-09-10 15:21:58 -07:00
Dustin Carlino
5637a1cf34
remove support for glsl 110; i think it was just wine having problems with 140. can restore later easily, is annoying to maintain in the meantime
2019-09-10 14:13:23 -07:00
Dustin Carlino
e6bf997bee
simplify glium uniforms storage
2019-09-10 14:08:05 -07:00
Dustin Carlino
105f526e9e
contextual_action takes &str or String
2019-09-07 13:56:00 -07:00
Dustin Carlino
08b18b682d
overhaul Text API to builder pattern
2019-09-06 13:58:04 -07:00
Dustin Carlino
60a48be5bc
make it a little easier to snag default text size's line height
2019-09-06 12:44:37 -07:00
Dustin Carlino
ea9d01bcc1
set a modal menu's prompt just once in a few places, where that's more
...
convenient
2019-08-27 14:56:43 -07:00
Dustin Carlino
7fffb8d6e5
use modalmenu, not logscroller, for scenario and a/b test info. remove
...
logscroller from public ezgui api
2019-08-24 14:53:26 -07:00
Dustin Carlino
f8aaf4d7bf
using dyn explicitly, per rust 1.37 deprecation warning
2019-08-22 15:05:17 -07:00
Dustin Carlino
9f897ef094
removing ezgui inline color parsing. pretty much unused, isn't helping
...
compile time. also fixing clippy issues
2019-08-22 13:38:16 -07:00
Dustin Carlino
a5b73c060a
make savestate_every a flag again
2019-08-16 13:34:38 -07:00
Dustin Carlino
4e83f492d8
upgrade rand, get rid of now unneeded serde1 feature, in hopes of fixing feature mismatch between deps
2019-08-15 12:14:35 -07:00
Dustin Carlino
56ea90c787
draw map-space text with proper z-ordering
2019-08-15 10:30:17 -07:00
Dustin Carlino
caddf69dcc
cache unzoomed agent geometry when possible
2019-08-14 14:44:43 -07:00
Dustin Carlino
e145ae2e5d
label buildings with street numbers. disable because it's noisy, but
...
great start!
2019-08-13 11:45:11 -07:00
Dustin Carlino
c50830c4c0
add an extra scaling factor to map-space text, so we can draw in a reasonable font size, then squish down without losing quality
2019-08-13 11:24:04 -07:00
Dustin Carlino
5dc92e6eb8
strong steps towards real map-space text. not quite working yet, but
...
this shouldn't break anything in the meantime.
2019-08-12 15:38:57 -07:00
Dustin Carlino
e5486e587b
renaming wizard things
2019-08-07 15:48:46 -07:00
Dustin Carlino
8c7116af97
heavily revamping wizard callers... wow, what a huge difference!
2019-08-07 15:27:25 -07:00
Dustin Carlino
3b1671fdcb
proof-of-concept that wizard closures can have reasonable lifetimes!
2019-08-07 14:53:20 -07:00
Dustin Carlino
adde2669c1
convert some old-school plugins to Wizard (in fact WizardState), and start to hide some stuff inside ezgui crate a bit more
2019-08-07 13:49:27 -07:00
Dustin Carlino
950fb65bea
visually expose time since last completed turn
2019-08-07 10:37:25 -07:00
Dustin Carlino
b1c92fa867
dont allow zooming when mouse is on a covered GUI area
2019-08-06 12:05:09 -07:00
Dustin Carlino
77c01580f1
refactoring path references...
2019-08-04 17:11:33 -07:00
Dustin Carlino
f8cee896bf
fixed text box size for loading screens
2019-08-02 16:53:48 +02:00
Dustin Carlino
1412a888d6
move Scroller to ezgui lib
2019-08-02 16:49:31 +02:00
Dustin Carlino
721037e2fb
actual scrolling logic!
2019-07-31 16:08:53 +02:00
Dustin Carlino
5b65cb139a
switching to a generic scroller widget thing, which doesnt actually
...
scroll yet ;)
2019-07-28 17:06:00 +02:00
Dustin Carlino
c3c467343a
add dummy buttons to scroll traffic signal diagram
2019-07-28 15:35:56 +02:00
Dustin Carlino
6192a1357d
at last, add controls to hover on and select a cycle
2019-07-28 12:26:53 +02:00
Dustin Carlino
557db1d3fe
wrapping up something to interact with a diagram, using in signal editor
...
and standalone diagram explorer
2019-07-28 12:12:46 +02:00
Dustin Carlino
16926d57a1
upgrade glium, glutin, etc. fix the HIDPI issues properly!
2019-07-26 17:25:19 +02:00
Dustin Carlino
84ac102d05
fix major perf regression from modal menus getting sections. need to
...
call draw_queued for text once per frame, otherwise cache gets ruined
2019-07-26 16:26:41 +02:00
Dustin Carlino
3c2d794c62
sliders coupled with text boxes in wizards for picking times
2019-07-21 11:26:11 +02:00
Dustin Carlino
de929a5fb9
user-defined shortcuts
2019-07-14 11:22:37 +01:00
Dustin Carlino
d08c794cfe
woops, didnt use GeomBatch for all the new ModalMenu stuff
2019-06-26 15:20:25 -07:00
Dustin Carlino
5e97c9f548
add a minimize/expand icon to modal menus
2019-06-26 12:14:43 -07:00
Dustin Carlino
8d1581241f
render separators between groups of menu items. very messy
...
implementation, but many other ideas fell through, and this works.
2019-06-25 10:58:40 -07:00
Dustin Carlino
f7b5cf9a9f
organize all modal menus into groups. dont render them yet.
2019-06-24 15:43:22 -07:00
Dustin Carlino
3958ec556e
state transitions for nicely handling a few things... in particular,
...
clearing splash screen wizard state so we dont get stuck on a choice ;)
2019-06-22 20:05:12 -07:00
Dustin Carlino
6738de2488
draw text beneath Sliders, not in the ModalMenu
2019-06-20 14:48:32 -07:00
Dustin Carlino
cdacaef1a6
refactor menu text for all ItemSliders
2019-06-17 17:22:20 -07:00
Dustin Carlino
efb6954a97
refactor the combination of ItemSlider and Warper
2019-06-14 14:17:08 -07:00
Dustin Carlino
8c055312b4
refactor Warper to an ezgui widget, to use it in fix_map_geom
2019-06-14 12:45:46 -07:00
Dustin Carlino
1f34e591e0
debug_initialmap: use loading screens, stop depicting half-roads, draw
...
OSM tags non-invasively on the side, rename it, highlight degenerate
intersections
2019-06-13 13:20:24 -07:00
Dustin Carlino
0adeac1d53
remove the single point associated with intersections, now that we're
...
actually going to be mucking with geometry. it wasnt doing anything
useful anyway. also a round of clippy.
2019-06-12 10:10:04 -07:00
Dustin Carlino
47654b61cf
make wizard acknowledge a bit easier to use. name psrc scenarios by time
...
range and fix some filename parsing
2019-06-10 13:29:23 -07:00
Dustin Carlino
53d87afa6e
move hex parsing
2019-06-08 13:15:31 -07:00
Dustin Carlino
6221fd858b
make edit mode's cross hatches less intrusive
2019-06-06 13:29:45 -07:00
Dustin Carlino
36cddbf5df
recalculate current selection in all the places that used to before a big UI refactor. if not, hovering on agent + jumping savestates can crash badly. also refactor how mouseover is detected
2019-06-06 12:51:49 -07:00
Dustin Carlino
34e637773d
simplify wizard.wrap API slightly
2019-06-05 13:13:33 -07:00
Dustin Carlino
b2ad0b5ae7
converting PSRC trips to a repeatable scenario. along the way,
...
parallelizing and refactoring a bit of psrc stuff
2019-06-05 12:58:06 -07:00
Dustin Carlino
0c6a93d38f
introducing a basic slider to adjust speed of all route viz player and
...
sim. code duplication.
2019-06-04 14:22:11 -07:00
Dustin Carlino
0c4399e683
use mem::replace, not clone, for swapping TimeTravel states
2019-05-30 15:34:33 -07:00
Dustin Carlino
53addc79b9
use ItemSlider for time travel
2019-05-30 15:20:43 -07:00
Dustin Carlino
602a936440
using nom to create Text with inline colors. just using in a few places;
...
still buggy and kind of inconvenient actually.
2019-05-30 14:14:38 -07:00
Dustin Carlino
9faa2bf143
using MultiKey a bit more consistently
2019-05-29 14:13:46 -07:00
Dustin Carlino
53e2c3e905
hack in a way to easily check for ctrl+key. use to jump between
...
sandbox, debug, and edit modes
2019-05-29 14:08:59 -07:00
Dustin Carlino
35b3e4b7be
round of clippy / unbreaking the build
2019-05-29 13:01:33 -07:00
Dustin Carlino
17b31582cb
delete ModalMenu::hacky_new
2019-05-29 11:34:53 -07:00
Dustin Carlino
cce1b6ff88
making an ItemSlider to handle the common case of scrolling through items
2019-05-29 11:31:01 -07:00
Dustin Carlino
110140f391
union make_arrow polygon
2019-05-28 18:05:10 -07:00
Dustin Carlino
f2f16ad992
make slider just operate on percentages. use for scrolling time in all trip viz
2019-05-28 14:56:09 -07:00
Dustin Carlino
28b2734d59
starting a slider widget, using in easy places where the range is usize
2019-05-28 12:13:22 -07:00
Dustin Carlino
1cdbe0ea81
refactor parallelized pathfinding and use it in trip viz too
2019-05-24 12:50:01 -07:00
Dustin Carlino
788cd237a8
upload traffic signal Drawable once per state change
2019-05-23 11:31:28 -07:00
Dustin Carlino
d2dc7e52eb
draw the traffic signal diagram on the left. stop caring where the
...
bottom left of a modalmenu is
2019-05-21 14:13:48 -07:00
Dustin Carlino
3a625f9a32
print percentages and number of samples in bar chart
2019-05-20 14:57:17 -07:00
Dustin Carlino
09493f9b7b
remove old color shifting
2019-05-20 11:58:35 -07:00
Dustin Carlino
381883b357
display the stats with simple bar charts
2019-05-20 11:56:00 -07:00
Dustin Carlino
de51b1c154
simplify some render/ code by using GeomBatch
2019-05-17 13:14:58 -07:00
Dustin Carlino
222ddf6a96
use Distance, not f64, for some params in geom/ layer, simplifying other code
2019-05-17 12:42:36 -07:00
Dustin Carlino
db04553626
batch traffic signal drawing
2019-05-16 17:55:26 -07:00
Dustin Carlino
d5aebd4d4a
prevent double-use of Escape key between context and modal menus
2019-05-15 11:02:02 -07:00
Dustin Carlino
5b6e541f9c
fix mac scrolling and the directory name in the release script
2019-05-15 10:06:42 -07:00
Dustin Carlino
639ce25d09
hatching shader's stripes are now in map-space, are crosses, and have
...
color/size tuned
2019-05-12 18:35:12 -07:00
Dustin Carlino
f4620c1951
add basic hatching support to fragment shader. use it to visualize map
...
edits when zoomed in
2019-05-12 17:59:12 -07:00
Dustin Carlino
240efa5ad7
make warping be slightly snappier with impatient keypressing and a
...
minimum speed
2019-05-08 12:07:32 -07:00
Dustin Carlino
939f2fefdd
adding hands to the bikes
2019-05-06 18:33:01 -07:00
Dustin Carlino
b0ca4429ad
make turn blinkers work even when sim is paused
2019-05-06 12:56:19 -07:00
Dustin Carlino
26ee29ff62
actually do need to throttle redraws on loading screen
2019-05-05 19:07:54 -07:00
Dustin Carlino
272503873c
avoid menu flickering and incorrect entries by sending a NoOp after used events
2019-05-05 18:23:36 -07:00
Dustin Carlino
08282186a7
only keep so many lines in the loading screen logger
2019-05-05 09:47:57 -07:00
Dustin Carlino
af30d93ba8
also reprint Timer lines -- has a bug, but this is a start
2019-05-04 17:47:02 -07:00
Dustin Carlino
73f32854be
fix up other ezgui apps, run clippy
2019-05-04 17:25:05 -07:00
Dustin Carlino
a921469da9
dont special-case having a loading screen during make_gui. pass in EventCtx to make_gui to undo some hacks
2019-05-04 17:19:45 -07:00
Dustin Carlino
798a7b5354
be able to trigger a loading screen anywhere
2019-05-04 17:07:07 -07:00
Dustin Carlino
eed33931de
proof-of-concept for gluing Timer to loading screen. hacky and not
...
featurefull yet.
2019-05-04 16:41:01 -07:00
Dustin Carlino
951e2f37ce
flush text to display immediately, not at the end. prerequisite to drawing scaled text better
2019-05-04 15:36:40 -07:00
Dustin Carlino
2f66c8ca5c
remember if modal menus are hidden or not
2019-05-04 09:30:44 -07:00
Dustin Carlino
625d9890d7
dont allow dupe keys in menus
2019-05-03 14:55:40 -07:00
Dustin Carlino
3db78d1ddd
hacky way of showing context menu hotkeys in OSD
2019-05-03 14:21:43 -07:00
Dustin Carlino
4b4e6f17a0
start a really basic OSD
2019-05-02 12:38:12 -05:00
Dustin Carlino
08e1d3f353
place the context menu onscreen, be smart about going OOB
2019-05-02 12:02:15 -05:00
Dustin Carlino
96c3907655
combo calls to update prompt for ModalMenu
2019-05-01 21:45:34 -05:00
Dustin Carlino
a0b69db71e
recalculate modal menu when resizing, hiding, updating prompt...
2019-05-01 17:00:23 -07:00
Dustin Carlino
bc3b883e2f
optional modal menu keys
2019-05-01 16:22:14 -07:00
Dustin Carlino
3b6ecbf4af
draw everything from ezgui in screencap mode
2019-05-01 16:14:15 -07:00
Dustin Carlino
913ec8d4c7
remove top menu from ezgui. unused right now, can restore it later if needed
2019-05-01 16:06:40 -07:00
Dustin Carlino
e767a704d3
remove old modal menu stuff from ezgui
2019-05-01 16:02:50 -07:00
Dustin Carlino
36df2e7908
convert more to NewModalMenu
2019-05-01 14:55:47 -07:00
Dustin Carlino
d10cbd9b7c
manage the ModalMenu directly in each state, not in ezgui. convert 2
...
uses of it to start.
2019-05-01 14:00:46 -07:00
Dustin Carlino
1eb1b0ea40
slightly refactoring Text creation
2019-05-01 11:46:22 -07:00
Dustin Carlino
c904e9cdcf
get rid of set_mode_with_extra; legend plugin is gone
2019-05-01 11:27:28 -07:00
Dustin Carlino
b42bba799d
ModalMenus can be mostly hidden
2019-05-01 11:17:30 -07:00
Dustin Carlino
3b2c1a1d73
new warp function that autocompletes street names
2019-04-30 12:48:00 -07:00
Dustin Carlino
8b2d74cad8
simplify instructions after all the GUI refactor
2019-04-28 20:24:37 -07:00
Dustin Carlino
aa6f8f61fd
make escape key work in modal menus
2019-04-28 20:16:27 -07:00
Dustin Carlino
2f6cc5fe4d
remove vestiges of top menu being in the way
2019-04-28 20:10:00 -07:00
Dustin Carlino
8f69d5bbac
woops, ModalMenus and context menus broke if the top menu didnt exist. :P decouple them
2019-04-28 18:06:17 -07:00
Dustin Carlino
a72e779a89
remove legacy mode, UI's new_event, the top_menu... impl GUI on Game, no
...
more forwarding to UI ever
2019-04-28 18:00:44 -07:00
Dustin Carlino
01628624c0
hotkeys on the wizard splash screen
2019-04-27 13:48:22 -07:00
Dustin Carlino
ce25f8bbf6
making menus support multi-line prompts
2019-04-24 16:51:35 -07:00
Dustin Carlino
2384157108
simplify ezgui API -- event takes &mut EventCtx
2019-04-23 21:28:03 -07:00
Dustin Carlino
6c247d376c
clean up ezgui draw() API by putting screencap and naming_hint inside GfxCtx
2019-04-23 15:42:15 -07:00
Dustin Carlino
51db6887fa
combine SplashScreen and About modes by adding LogScroller functionality to Wizard natively
2019-04-23 15:30:53 -07:00
Dustin Carlino
e627930757
draw text in map-space, except drawing zoomed-in text is extremely slow!
2019-04-23 14:12:30 -07:00
Dustin Carlino
320c91faf7
bam, variable font size
2019-04-22 20:17:18 -07:00
Dustin Carlino
008b2f9de5
preps for variable font size
2019-04-22 20:02:18 -07:00
Dustin Carlino
4eece7bae7
borrow text to draw, stop cloning everywhere
2019-04-22 13:29:24 -07:00
Dustin Carlino
26fd30191d
removing controls from LogScroller, which doesn't do the right thing and
...
also crashes if you try to scroll
2019-04-22 11:06:07 -07:00
Dustin Carlino
45083198ea
load different maps from splash menu
2019-04-21 15:59:04 -07:00
Dustin Carlino
17870baf9d
actually start with a menu. just play and quit right now.
2019-04-21 13:32:28 -07:00
Dustin Carlino
8ff293bdc4
dont plumb last_data through ezgui layer. apps can just... store that themselves. removes unnecessary plumbing.
2019-04-21 13:20:40 -07:00
Dustin Carlino
0b4694dcba
start splash screen wrapping everything. doesn't do anything yet
2019-04-21 13:05:03 -07:00
Dustin Carlino
4b1107bf57
clean up ezgui runner API
2019-04-20 15:10:03 -07:00
Dustin Carlino
a1176e053b
use hotkey color in OSD, to make OSD slightly more readable
2019-04-19 16:05:06 -07:00
Dustin Carlino
46d24a7c58
compile on mac
2019-04-19 09:23:36 -07:00
Dustin Carlino
b610139f89
woops, screencap everything cut off the bottom and right
2019-04-15 11:42:38 -07:00
Dustin Carlino
9a2699aab9
take a single screenshot (hiding menus and stuff)
2019-04-15 10:07:50 -07:00
Dustin Carlino
0772e6e3c8
make_arrow only for PolyLine, simplify and improve the result in most
...
cases
2019-04-12 15:06:44 -07:00
Dustin Carlino
a9afc3efdd
improve arrow API, at least -- creating them from a polyline is fine
2019-04-11 17:39:07 -07:00
Dustin Carlino
94d08efd61
clicking outside of a menu shouldnt do anything
2019-04-03 15:16:54 +09:00
Dustin Carlino
35d6995a7b
starting a plugin to visualize a scenario, by just displaying
...
neighborhood polygons
2019-04-03 15:03:07 +09:00
Dustin Carlino
0cf9e1a1cd
draw a simple loading screen
2019-04-03 08:24:06 +09:00
Dustin Carlino
7100900714
load different glsl versions
2019-03-18 14:58:41 -07:00
Dustin Carlino
8bf8b958d7
supporting glsl 110 as well as 140
2019-03-18 12:26:40 -07:00
Dustin Carlino
3eb5270d51
trying to cross-compile to windows. making some unix-only dependencies
...
optional.
2019-03-11 17:09:47 -07:00
Dustin Carlino
5ca359998c
upgrade some dependencies and list data source licenses in README
2019-03-11 16:04:47 -07:00
Dustin Carlino
cab95e91e2
dont redraw on ignored Update events either
2019-03-11 13:15:16 -07:00
Dustin Carlino
0c26e3e127
dont redraw if key release event was unused
2019-03-11 13:08:57 -07:00
Dustin Carlino
40206eccc3
removing most log usage from editor
2019-02-20 11:29:36 -08:00
Dustin Carlino
1848387ef0
starting to organize warnings in a much more reasonable way.
2019-02-20 10:08:02 -08:00
Dustin Carlino
e4e07e7ba6
make it easier to debug areas
2019-02-18 15:56:15 -08:00
Dustin Carlino
5830908604
version control checksums of screencaps for all maps... well,
...
still not small_seattle. :P
2019-02-17 14:27:48 -08:00
Dustin Carlino
e445f972dd
move ToggleableLayers out of ezgui, stop associating a zoom with them
2019-02-14 16:51:27 -08:00
Dustin Carlino
c3cbd47645
organize DES model code a bit
2019-02-14 14:00:44 -08:00
Dustin Carlino
06c8ed72a9
flag-based profiling of GUI
2019-02-14 13:16:43 -08:00
Dustin Carlino
a2e2c3311e
drawing border arrows way better
2019-02-12 14:42:03 -08:00
Dustin Carlino
6a573dfbd0
use better glium buffer types
2019-02-11 14:08:43 -08:00
Dustin Carlino
d655bdc588
pass color to GPU as u8, not f32
2019-02-11 13:52:17 -08:00
Dustin Carlino
72e823c2c6
only have one Prerender object constructed, simplifying the plumbing of the Cell counters
2019-02-11 12:14:43 -08:00
Dustin Carlino
1d3e4284a7
do some tracking of video memory used by RenderMap
2019-02-11 12:02:29 -08:00
Dustin Carlino
8693bbc1e3
import residential building dataset
2019-02-10 19:24:34 -08:00
Dustin Carlino
ec01207369
try upgrading rand and serde again
2019-02-10 15:57:28 -08:00
Dustin Carlino
72b044c64f
plugin to show roads connected to intersection. surprisingly useful for debugging merged intersections sometimes
2019-02-09 11:46:31 -08:00
Dustin Carlino
579097dbb1
fiddling with the event loop. simplified code, but didn't fix issues.
2019-02-06 12:58:26 -08:00
Dustin Carlino
e1155a1d9c
WIP stabilize screenshotting
2019-02-05 15:18:02 -08:00
Dustin Carlino
72b39b0401
aha, a slight optimization to not call draw() when events happen that aren't even sent to the application
2019-02-05 15:10:15 -08:00
Dustin Carlino
40d3c6b0ca
count all Prerender uploads, not just the ones that happen in draw()
2019-02-05 15:02:10 -08:00
Dustin Carlino
e0fd39bb7c
stop requiring hotkeys for TopMenu folders
2019-02-02 16:09:30 -08:00
Dustin Carlino
d08751fb64
preupload pedestrian geometry
2019-02-02 13:44:27 -08:00
Dustin Carlino
61d1d2fe83
revamp handling of onscreen stuff. no more callback plumbing, and can
...
plumb prerender successfully into dynamic stuff. just can't do as much
work directly in DrawMap.
2019-02-02 12:32:07 -08:00
Dustin Carlino
e4b95c936b
organizing ezgui into subdirectories
2019-02-01 09:55:25 -08:00
Dustin Carlino
06b8c26716
split ezgui runner into setup and loop functions
2019-02-01 09:30:01 -08:00
Dustin Carlino
bd7d18592b
simplify screenshot internals
2019-02-01 09:23:16 -08:00
Dustin Carlino
8c80755bbd
moving screenshot code into a module
2019-02-01 09:09:27 -08:00
Dustin Carlino
5181a3db34
starting to move some text drawing code out of canvas
2019-01-31 23:40:15 -08:00
Dustin Carlino
64573ea0ea
own canvas inside of ezgui, not in applications. lots of refactoring
...
unlocked now...
2019-01-31 22:33:36 -08:00
Dustin Carlino
7519fdf584
using strong Distance types in many more places
2019-01-30 15:54:54 -08:00
Dustin Carlino
4d5bafd551
slightly simplify interaction between Canvas and text module
2019-01-26 10:25:08 -08:00
Dustin Carlino
067ee108c7
make screencap work (and more simply) with custom event loop
2019-01-26 10:04:20 -08:00
Dustin Carlino
8afe83162b
collapsing all lane markings into a single Drawable
2019-01-25 11:21:46 -08:00
Dustin Carlino
25bc02fb32
using prerender for lanes... a good start.
2019-01-25 10:38:40 -08:00
Dustin Carlino
623e578665
inverting the ezgui/GUI control to plumb Prerender
2019-01-25 10:19:58 -08:00
Dustin Carlino
6af551bc95
plumbing colorscheme early to support prerendering in DrawMap construction...
2019-01-25 09:46:19 -08:00
Dustin Carlino
4882e98933
start a way to upload once, draw many times
2019-01-25 09:09:55 -08:00
Dustin Carlino
b21852875e
batch lots more easy things... down from 760 calls for a scene to 158
2019-01-25 08:39:45 -08:00
Dustin Carlino
a065c63ad7
batching sidewalk lines. fix the very silly batching bug
2019-01-25 08:10:09 -08:00
Dustin Carlino
8cc652514d
making a simple way to batch drawn stuff. not using it yet, it's buggy!
2019-01-24 18:04:54 -08:00
Dustin Carlino
c7eaa2cf55
exposing some basic drawing performance stats...
2019-01-24 16:21:56 -08:00
Dustin Carlino
237a19b6ec
appease the clippy
2019-01-24 16:17:22 -08:00
Dustin Carlino
590ab4bccb
just moving GfxCtx to its own module
2019-01-24 16:10:18 -08:00
Dustin Carlino
49f0c64ef4
use the pts/indices for rendering
2019-01-24 15:32:46 -08:00
Dustin Carlino
559d568acd
make Polygon store points and indices. don't use this fact for rendering
...
just yet.
2019-01-24 15:13:27 -08:00
Dustin Carlino
c8385b52d6
explicitly pass index buffer, even though points are repeated
2019-01-24 12:18:51 -08:00
Dustin Carlino
d2f0cd91ee
send Update events, fixing animation
2019-01-24 12:07:46 -08:00
Dustin Carlino
46c07dc57a
make text entry work when empty
2019-01-24 11:12:13 -08:00
Dustin Carlino
9182a57af5
enabling draw_arrow again... math is not quite great
2019-01-24 10:01:30 -08:00
Dustin Carlino
5a8e2349e0
draw top menu items individually, so we don't have to mess with measuring whitespace from the font
2019-01-24 09:41:11 -08:00
Dustin Carlino
2cbb28a1a4
fixing srgb issue... geez
2019-01-23 23:13:30 -08:00
Dustin Carlino
8d270574ec
revamping fork math
2019-01-23 17:27:34 -08:00
Dustin Carlino
a25f358295
hacking around top menu issue mostly
2019-01-23 16:19:32 -08:00
Dustin Carlino
f1b81456a6
calculating line height from the font
2019-01-23 14:02:43 -08:00
Dustin Carlino
9c94e2f374
simplify text API and storage to have one bg color per line
2019-01-23 13:38:24 -08:00
Dustin Carlino
2ab4502268
use glyph brush's built-in support for lines with different colors. sacrifice different background colors mid-line, which was unused anyway
2019-01-23 13:15:51 -08:00
Dustin Carlino
c9587ebd01
more text positioning fixes... now that we can see the actual height of some rendered text
2019-01-23 12:51:08 -08:00
Dustin Carlino
c4b7196570
fixing some text positioning bugs
2019-01-23 12:30:48 -08:00
Dustin Carlino
9b14206be0
implementing GfxCtx forking... aka, reset uniforms
2019-01-23 12:22:26 -08:00
Dustin Carlino
d9d89e93dd
using glium_glyph... things initially kind of work
2019-01-23 12:10:17 -08:00
Dustin Carlino
ca00dda8be
drawing circles in glium
2019-01-23 10:00:36 -08:00
Dustin Carlino
5dc8542856
upload data once per polygon, not once per triangle. derp.
2019-01-22 23:19:48 -08:00
Dustin Carlino
03215a5836
disable unneeded depth testing. enable antialiasing and alpha blending
2019-01-22 23:10:14 -08:00
Dustin Carlino
099846437c
dont redraw unnecessarily
2019-01-22 22:30:36 -08:00
Dustin Carlino
fa075766cc
fix y inversion. camera now feels totally correct
2019-01-22 18:20:20 -08:00
Dustin Carlino
f896e92d25
simplifying camera math drastically... passing in stuff to the vertex
...
shader, which does transformations not using matrices! \o/
2019-01-22 17:43:25 -08:00
Dustin Carlino
fb7a809892
tweaked camera based on canvas. workable, not great.
2019-01-22 17:12:48 -08:00
Dustin Carlino
af7596f9a5
remove piston stuff, cut over to glutin in some basic way. nothing
...
displays now. :D
2019-01-22 16:51:02 -08:00
Dustin Carlino
974b04e74d
start to move ezgui to glium. just copying extra code in, not deleting
...
existing stuff yet
2019-01-22 16:11:49 -08:00
Dustin Carlino
f018158aa3
remove copyright comment from remaining files
2019-01-20 13:57:55 -08:00
Dustin Carlino
3422877d3d
adding a stable ID for raw roads and intersections. way easier to refer to things in the midst of deletions.
2019-01-17 11:10:05 -08:00
Dustin Carlino
ac9b9fa302
dont asap combine tiles
2019-01-15 17:21:20 -08:00
Dustin Carlino
e8e119dbbf
remove all the polyline shifting/polygon variants that might fail
2019-01-15 15:25:00 -08:00
Dustin Carlino
aae021f478
oops, gigantic change trying to handle bad lane geometry
...
- debug points and triangles of lanes
- disabled fixes for polylines with points that change angles by 180 and can be fixed by swapping them
- organize intersection polygon code in different methods for the degenerate cases
- try something new for degenerate-two's... fix road centers, then calculate intersection corners. it fixed a few spots!
2019-01-15 13:48:15 -08:00
Dustin Carlino
3cc1ccfd26
annotate screencaps with an intersection in the shot
2019-01-15 11:00:13 -08:00
Dustin Carlino
09a3aed407
import raw map to synthetic
2019-01-15 09:37:23 -08:00
Dustin Carlino
6d4e958ea5
retain directory of screencap tiles, for faster diffing
2019-01-14 13:02:03 -08:00
Dustin Carlino
3f88eb2142
reorganizing ezgui runner to have proper state struct...
2019-01-14 12:54:25 -08:00
Dustin Carlino
bae23f79da
even better progress, and make it easier to deal with failed montage
2019-01-14 12:01:56 -08:00
Dustin Carlino
299f05e0a2
force showing full detail when screencapping at low zoom
2019-01-14 11:24:07 -08:00
Dustin Carlino
dbfc1ec0d2
combine the tiled images
2019-01-14 11:13:48 -08:00
Dustin Carlino
2f35ca5dc1
much faster screencapturing with scrot instead
2019-01-14 10:14:14 -08:00
Dustin Carlino
164cd7d757
print screengrab progress better
2019-01-14 10:11:11 -08:00
Dustin Carlino
e47ddfb1c4
call gnome-screenshot directly, removing the border
2019-01-14 09:52:46 -08:00
Dustin Carlino
afa159abb4
ezgui-driven magic for screencapping EVERYTHING
2019-01-14 08:46:40 -08:00
Dustin Carlino
e607c6574a
actually, use screengrab
2019-01-13 17:54:58 -08:00
Dustin Carlino
a94fddb209
try screenshot capture again. it's very slow and broken.
2019-01-13 15:40:58 -08:00
Dustin Carlino
bc6a61fc74
WIP: better sidewalk corner geometry. it's a start.
2019-01-12 13:40:06 -08:00
Dustin Carlino
b76eaa8021
dont flicker with turn cycler OSD action; put important actions in the OSD even if that key was chosen
2019-01-12 11:14:44 -08:00
Dustin Carlino
c09fa98f57
upgrade a few dependencies
2019-01-11 10:55:58 -08:00
Dustin Carlino
af7e12e52b
bundle ttf
2019-01-11 10:13:29 -08:00
Dustin Carlino
d95099efbe
basic installation instructions, and tweaks to scripts so that things
...
work better out-of-box
2019-01-11 10:04:56 -08:00
Dustin Carlino
0522829d9a
draw my own arrows, which don't exceed distance too much... except they
...
dont work in all cases, so disable
2019-01-09 14:59:46 -08:00
Dustin Carlino
f8c7ed5ea8
woops, turn cycler assumed everything's a traffic signal
2019-01-09 12:46:44 -08:00
Dustin Carlino
37c9d01a6f
declare extra space needed by modal menus. dont stretch menus to cover
...
that amount... yet.
2019-01-09 12:26:16 -08:00
Dustin Carlino
71cf5116d6
new modal plugin to show a legend for explaining colors of stuff.
...
partially done.
2018-12-26 20:06:51 -06:00
Dustin Carlino
a232d023ff
draw signal diagram exactly below modal menu
2018-12-26 19:11:03 -06:00
Dustin Carlino
ed318f0c9e
compute full width needed for signal diagram, including labels
2018-12-26 15:08:51 -06:00
Dustin Carlino
976f210b9a
stack modal states... also fix the show score plugin drawing a bit
2018-12-25 10:27:38 -08:00
Dustin Carlino
972a0d2fa2
hide debug top menu when appropriate
2018-12-24 19:32:56 -08:00
Dustin Carlino
8202698daa
start text box with cursor at the end of prefilled
2018-12-23 09:05:39 -08:00
Dustin Carlino
551a8ef63a
aw yeah, unicode arrow key descriptions. and tweaking some wording from filip's feedback
2018-12-22 23:20:21 -08:00
Dustin Carlino
92ce83dfdd
cant start dragging on top of covered area
2018-12-22 22:21:05 -08:00
Dustin Carlino
5d28acd1af
traffic signal editor left bar should be drawn below top menu
2018-12-22 22:18:03 -08:00
Dustin Carlino
0edded5725
trying out a quick way to mark parts of the screen unavailable for map-space mouseover. oh hey, it works great.
2018-12-22 20:03:12 -08:00
Dustin Carlino
2d7034e9cb
canvas wont serve up map-space cursor when it's out of the window
2018-12-22 17:12:30 -08:00
Dustin Carlino
0aece4944d
prep for disabling mouseover by changing canvas API. fix neighborhood
...
plugin to handle out-of-bounds points while we're there.
2018-12-22 16:49:47 -08:00
Dustin Carlino
099fd288fe
all arrows are rounded
2018-12-22 14:02:42 -08:00
Dustin Carlino
1d9f3320fa
implementing draw_line and draw_rounded_line directly
2018-12-22 13:58:45 -08:00
Dustin Carlino
9b6725fc7d
back to adjusting GUI colors
2018-12-22 13:12:10 -08:00
Dustin Carlino
9d32ef8b83
use const functions to construct constant colors in many cases, now that rust 2018 is here
2018-12-22 12:39:17 -08:00
Dustin Carlino
0f62da0f63
centralize and adjust constants for text colors. also clean up places
...
unnecessarilly passing in RGB values for constants
2018-12-22 12:26:34 -08:00
Dustin Carlino
dfc08bfe97
figure out longest line for text dims by actual rendered width
2018-12-22 12:04:17 -08:00
Dustin Carlino
44c3fab9f6
working on text alignment again
2018-12-22 11:54:49 -08:00
Dustin Carlino
2510625efc
removing piston window size type from canvas, meaning piston deps are now very narrowly isolated to part of ezgui
2018-12-21 10:00:45 -08:00
Dustin Carlino
c7e7f6ae75
oops, dont allow unselecting a key-controlled menu
2018-12-19 11:52:58 -08:00
Dustin Carlino
ad497ac698
make menus handle window resizing
2018-12-19 11:48:35 -08:00
Dustin Carlino
b7f31cc8f4
make canvas know initial screen size, so centering on map pt initially does work
2018-12-18 15:37:44 -08:00
Dustin Carlino
78f3107d8a
oh, piston has a helper for rendering a line of text. use it.
2018-12-18 15:02:51 -08:00
Dustin Carlino
a0160f6be0
render highlighted lines with full width when it makes sense
2018-12-18 12:42:29 -08:00
Dustin Carlino
0a18d2afd2
fix broken top menu hotkeys when a submenu is present
2018-12-18 11:50:23 -08:00
Dustin Carlino
d4592f64a0
clippy run
2018-12-18 09:59:50 -08:00
Dustin Carlino
7ebc51ee64
use arrow keys to switch cycles, not numbers. remove number_chosen. only allow arrow keys in wizard menus.
2018-12-17 20:40:32 -08:00
Dustin Carlino
54c1f1ba73
update modal menu prompt
2018-12-17 20:21:55 -08:00
Dustin Carlino
4a98e1d086
convert all plugins to modal calls
2018-12-17 16:40:03 -08:00
Dustin Carlino
e6595c0d14
destroy modal menu when done
2018-12-17 16:08:32 -08:00
Dustin Carlino
002095bc84
make menu item activeness be mutable
2018-12-17 16:01:42 -08:00
Dustin Carlino
72a39c9597
wire up modal actions
2018-12-17 14:54:36 -08:00
Dustin Carlino
c654bf2b06
revamp menu to work in screen-space, so canvas can move beneath modal menu. also fix the menu mouseover when a prompt is present.
2018-12-17 14:42:52 -08:00
Dustin Carlino
787c965985
explicit type for screen-space stuff in ezgui
2018-12-17 14:25:05 -08:00
Dustin Carlino
32db434862
trying out modal flow in UserInput... at least initially displaying the
...
sidebar
2018-12-17 13:58:06 -08:00
Dustin Carlino
bbacdfb676
declaring modal menus
2018-12-17 13:08:46 -08:00
Dustin Carlino
2194ea38a5
grey out irrelevant top menu items
2018-12-17 12:13:32 -08:00
Dustin Carlino
875edddc7a
undo the few remaining places that pass in keys to plugins
2018-12-17 11:49:36 -08:00
Dustin Carlino
661c9715b3
handle idle event; happens when running sim
2018-12-17 11:36:14 -08:00
Dustin Carlino
b3dea902de
handle window close event
2018-12-17 11:33:57 -08:00
Dustin Carlino
806a139788
dont panic on unknown keypresses
2018-12-17 11:30:20 -08:00
Dustin Carlino
a11fe98ca9
oh yeah, still let keys be pressed for top menu actions. :D
2018-12-17 10:27:35 -08:00
Dustin Carlino
21c61e4a60
avoid typos in action_chosen
2018-12-17 10:23:14 -08:00
Dustin Carlino
6f92a82efe
glue TopMenu to UserInput... get ready to change lots of calls to it
2018-12-17 09:47:53 -08:00
Dustin Carlino
1f1f3b63e2
wiring up submenu events
2018-12-17 09:07:49 -08:00
Dustin Carlino
6595f804e0
spawn submenu in the proper place
2018-12-16 20:19:30 -08:00