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
Dustin Carlino
b571f410ef
spawn submenus... but not in the right place. no input wiring yet.
2018-12-16 19:57:39 -08:00
Dustin Carlino
7c5ba61e89
touchscreen support. (not)
2018-12-16 19:49:00 -08:00
Dustin Carlino
8aa12fb6d9
highlight selected item in top menu
2018-12-16 19:41:11 -08:00
Dustin Carlino
a4a312d488
draw the top menu bar
2018-12-16 19:22:48 -08:00
Dustin Carlino
efc0db122a
specify top menu in UI, but it doesn't do anything yet
2018-12-16 18:23:17 -08:00
Dustin Carlino
0b069a7083
display optional prompt in the menu
2018-12-16 16:58:04 -08:00
Dustin Carlino
435f3f35c9
start wizard menus with first item selected, like the good ol days
2018-12-16 16:51:15 -08:00
Dustin Carlino
24fbc18324
rewrite a fxn from wizard with NLL
2018-12-16 16:45:52 -08:00
Dustin Carlino
2a5384cf11
making wizard use the new Menu
2018-12-16 16:29:25 -08:00
Dustin Carlino
3a47cb04e9
expressing context menu as an FSM instead
2018-12-16 16:12:51 -08:00
Dustin Carlino
6993294f24
make ContextMenu use Menu now
2018-12-16 15:49:12 -08:00
Dustin Carlino
2b245f9277
write a proper Menu constructor, now that we can calculate geometry up-front
2018-12-16 15:23:49 -08:00
Dustin Carlino
62bdd92ac3
move ownership of GlyphCache into Canvas, so calculating text dimensions can be done during event. Stick the glyphs behind a RefCell to avoid mutability creeping into canvas everywhere
2018-12-16 15:16:02 -08:00
Dustin Carlino
671dad6b02
make a blend between ScrollingMenu and ContextMenu... don't use it yet
2018-12-16 14:47:48 -08:00
Dustin Carlino
11945739bd
rename old ezgui menu to scrolling menu, which color picker will keep using for now
2018-12-16 14:18:43 -08:00
Dustin Carlino
4629015e12
delete unused TreeMenu and stop passing in the category for unimportant actions
2018-12-16 14:13:28 -08:00
Dustin Carlino
9adcb0315e
making my own event, mapping piston's event to it. will simplify downstream code and make moving away from piston even easier.
2018-12-15 20:44:28 -08:00
Dustin Carlino
d9721caa8a
left clicking to confirm or cancel a menu
2018-12-15 16:48:47 -08:00
Dustin Carlino
51d1cbba6e
highlighting if a menu item is selected
2018-12-15 16:36:45 -08:00
Dustin Carlino
cf74050758
dont call event() for a render event
2018-12-15 12:24:06 -08:00
Dustin Carlino
b633d698d2
make sure nothing else happens while a context menu is present
2018-12-15 11:07:51 -08:00
Dustin Carlino
003881fe93
prototyping right-click context menus. solid start, lots of work needed.
2018-12-15 10:39:50 -08:00
Dustin Carlino
3f2a7d6e68
display when a traffic signal is in overtime
2018-12-14 12:01:00 -08:00
Dustin Carlino
2b16b9571e
making it easier to create one-line Texts
2018-12-14 11:01:14 -08:00
Dustin Carlino
d61255a4b3
lift panic handling from UI's event to ezgui runner, use also for draw
2018-12-12 14:11:18 -08:00
Dustin Carlino
3c710c2e8a
fix the sim score plugin
2018-12-12 10:47:02 -08:00
Dustin Carlino
44d9065123
wrap long agent tooltips
2018-12-09 15:28:04 -08:00
Dustin Carlino
f48757c5e7
clippy pt2
2018-12-08 19:56:54 -08:00
Dustin Carlino
ab86835611
initially playing with clippy... pt1
2018-12-08 18:21:56 -08:00
Dustin Carlino
91b2b07fbd
remove more extern crate's; import macros directly
2018-12-06 11:22:12 -08:00
Dustin Carlino
375a923a9d
try removing most extern crate's
2018-12-06 11:00:13 -08:00
Dustin Carlino
f64f411093
upgrade all crates to 2018 in Cargo.toml. this requires switching to
...
crate:: paths everywhere. not yet fiddling with 'extern crate's
2018-12-06 10:57:31 -08:00
Dustin Carlino
6a0cd7f71e
rust 2018: run the new fmt, delete the unneeded script
2018-12-06 10:05:50 -08:00
Dustin Carlino
ac4c7a5b83
edit cycle time
2018-12-04 11:44:34 -08:00
Dustin Carlino
038cd385d7
show cycle duration in sidebar
2018-12-04 11:20:51 -08:00
Dustin Carlino
43fa67177d
plumbing generic things in ezgui runner
2018-12-04 10:20:08 -08:00
Dustin Carlino
3155bcbaf1
drawing a box to show time left in current cycle
2018-12-04 08:33:24 -08:00
Dustin Carlino
ac1e12b43a
draw ALL cycles in a sidebar, to summarize. needs tuning, but looks
...
initially good
2018-12-03 17:09:56 -08:00
Dustin Carlino
f36b967dee
drawing yield turns better in turn cycler
2018-12-03 10:37:14 -08:00
Dustin Carlino
7705289a62
specialize tooltip_lines to one plugin. solves the problem of not being able to look up objects in DrawMap
2018-11-20 11:32:03 -08:00
Dustin Carlino
7937586e52
make it easy to prefill a textbox from wizard
2018-11-14 11:56:45 -08:00