Dustin Carlino
93fb9a274f
Organize bike lane buffer types into a dropdown ( #724 )
...
Organize lane types in the editor. All buffer types expressed as a dropdown, and lanes for moving/not moving are grouped.
2021-08-25 14:12:17 -07:00
Michael Kirk
ae80eb2509
road editor design tweaks ( #737 )
...
- regroup sections to avoid undesirable inner rounding
- move panel away from edge
- make tabs more obvious with "shadow" on bottom of unselected tabs
2021-08-25 12:21:05 -07:00
Dustin Carlino
9761373c4b
Don't recalculate map hover state in the middle of dragging
2021-08-25 11:47:10 -07:00
Dustin Carlino
6c3ce23e5f
Use a cross-hatch pattern to show edited roads, instead of that bizarre
...
cyan.
For the moment, just to simplify things, bake the edited color into the
bike network layer. Probably will split it out later, maybe moving the
proposal management to the legend row.
2021-08-24 15:50:19 -07:00
Dustin Carlino
78222ffadb
Preserve the same Layers object through all the states of the ungap tool. Do this by a "new" Transition that's allowed to consume the current state.
...
Alternatives considered:
- put Layers in the App struct, since it's shared -- but only for the
ungap tool. It'd be nice to split it into its own standalone crate now,
but it'll be some work to refactor edit mode out of game.
- put Layers in App session
2021-08-24 14:37:16 -07:00
Dustin Carlino
bddbe8af99
Followup to #728 : highlight lanes on map when hovering on the cards
2021-08-24 10:58:04 -07:00
Dustin Carlino
b5015143cb
Small drag-and-drop typo fixes
2021-08-24 10:27:43 -07:00
Michael Kirk
4e93b34ded
restore proper shape/size/color/highlights of lane cards
2021-08-24 10:27:43 -07:00
Michael Kirk
03b15fae43
widgetry: dont grow widget as you're dragging
...
Otherwise the screen bizarrely grows/shrinks as you're dragging.
2021-08-24 10:27:43 -07:00
Michael Kirk
161e962bbc
widgetry: dragondrop inserts at proper place, not swap, fixes offset
2021-08-24 10:27:43 -07:00
Dustin Carlino
050c59e817
Draw the new state if the user would finish dropping.
...
Incorrect math in some cases, but making progress.
2021-08-24 10:27:43 -07:00
Dustin Carlino
7afd428017
Draw the card being dragged near the cursor
2021-08-24 10:27:43 -07:00
Dustin Carlino
b9b0ac5bb7
Very roughly express the road editor lane cards with DragDrop
2021-08-24 10:27:43 -07:00
Dustin Carlino
0d028d1bb7
Dragon drop poof of conscepter
2021-08-24 10:27:43 -07:00
Michael Kirk
9e0fc19bb1
canvas: double click to zoom ( #727 )
2021-08-21 09:56:15 -07:00
Dustin Carlino
4ad652fce5
Use SVG to create a text outline for labels
2021-08-20 15:14:41 -07:00
Michael Kirk
e124f21317
map explorer: add zoom buttons near legend ( #726 )
2021-08-20 12:47:19 -07:00
Dustin Carlino
135e85d06d
Force some distance spinners to render in feet
2021-08-19 10:49:10 -07:00
Dustin Carlino
98a081303f
Fix btn_plain_destructive in day/night mode. Background should be clear, not grey.
2021-08-18 13:54:28 -07:00
Dustin Carlino
ae490b54c9
Only grab OpenGL uniform location once per draw call. Chrome profiling says it's a hot-spot (very slight, but it's quite easy to fix, so...)
2021-08-15 09:51:46 -07:00
Dustin Carlino
fd1480cbac
Make widgetry require less Houdini skills: never mind on downloading new cities gets stuck with autocomplete search.
2021-08-09 14:28:55 -07:00
Dustin Carlino
1787611f56
More ergonomic route sketcher:
...
- still zoom when hovering on points
- more clearly show nodes being dragged
2021-08-08 10:00:44 -07:00
Dustin Carlino
773be88aed
Increase multisampling to fix unzoomed road outline tearing ( #722 )
2021-08-07 21:56:40 -07:00
Dustin Carlino
116198e863
Revive the ability to render in greyscale with the fragment shader, for quicker color scheme tuning...
2021-08-05 15:37:49 -07:00
Dustin Carlino
1585eed66f
Don't keep jamming the same button for the skeletonvator, that doesn't help
2021-08-04 10:51:31 -07:00
Dustin Carlino
06429d0d5f
In the mode shift dashboard, show roads that might be highly used by converted trips... but that're missing bike infrastructure. #448
2021-07-26 10:41:51 -07:00
Dustin Carlino
f6a94e8a58
Allow DrawWithTooltip to return custom data instead of string labels.
...
CloneableAny revived from e35c69f6f3
2021-07-18 14:14:19 -07:00
Dustin Carlino
942f2292fc
Steps towards clicking cells in the problem matrix to explore trips with differences. #600
...
- Add optional clickable labels to DrawWithTooltips
- Wire up problem_matrix to remember the list of trips associated with
each cell
- When clicking a cell, just open one arbitrary example trip
2021-07-18 14:14:19 -07:00
Michael Kirk
78a840edfa
return Duration not mins
2021-07-13 22:51:18 -07:00
Dustin Carlino
14a0e005c8
Make sliders trigger Outcome::Changed, except for scrollbars. Manually
...
verified this doesn't break or slow down existing uses of sliders.
2021-07-13 12:36:54 -07:00
Dustin Carlino
184593094e
Also round up the X axis for the elevation plot, and lower the number of
...
line plot labels by default
2021-07-09 09:23:56 -07:00
Michael Kirk
321c9d9c40
Label contingency matrix axes
2021-06-23 10:13:51 -07:00
Dustin Carlino
8f199177f5
Upgrade to Rust 1.53
...
- arrays are now iterable directly
- switch to using BTree{Set,Map}::retain!
- a round of clippy
- regenerate scenarios and prebaked data; not sure why, but there's a
diff
2021-06-17 23:04:35 -07:00
Rémi Lauzier
1a4b997818
Fix some clippy warnings
2021-06-16 16:21:35 -07:00
Dustin Carlino
d827673ace
Periodically free memory in the middle of screenshot test, to avoid
...
running out on my current machine. Fixes #671 .
Finally regenerate screenshots for the first time in ages... just
blindly accepting everything, because the slightly different screen size
means everything was slightly shifted down.
2021-06-09 14:31:40 -07:00
Dustin Carlino
889c500eb1
Force geojson to use geo-types feature everywhere. This lets different
...
binaries properly share workspace dependencies.
See
https://www.reddit.com/r/rust/comments/nvd6y7/common_crates_in_cargo_workspace_recompiled_due/
for the full story behind this mess.
I'm going to keep repeating this process until I get game and importer
to share dependencies again.
2021-06-09 09:48:53 -07:00
Dustin Carlino
a38125ad2c
Adjust multi road editor more -- custom cursor icons for select/unselect
2021-06-03 15:23:55 -07:00
Dustin Carlino
2f71751929
Add support for tooltips on disabled buttons. Use this to explain a f… ( #661 )
...
* Add support for tooltips on disabled buttons. Use this to explain a few pecularities of the road editor UI.
* Consistent tooltip storage
2021-05-24 15:05:32 -07:00
Vinzent Steinberg
a1899e29f8
Update dependencies ( #656 )
...
* Update dependencies
* Use github for polylabel, to make all dependencies use geo 0.18, not a mix of 0.18 and 0.17
* Downgrade lyon to avoid a crash
Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2021-05-22 16:23:06 -07:00
Michael Kirk
94501e4699
size horizontal-divider WRT its parent size, not absolute window size
2021-05-17 18:19:06 -07:00
Michael Kirk
ed36776b1d
PERF: don't recompute flexbox when scrolling
2021-05-17 17:44:06 -07:00
Dustin Carlino
1e3ed254a9
Reorganize canvas settings, so that they can actually be saved. #216
2021-05-17 13:12:45 -07:00
Dustin Carlino
0f06d4d52f
Make canvas scroll speed configurable, just like GUI panel scroll speed.
2021-05-17 10:16:44 -07:00
Vinzent Steinberg
9d17faa878
Prefer slices over reference to owned type
2021-05-15 14:24:08 -07:00
Dustin Carlino
1edbca6509
Refactor most of the places extracting polygons from geojson files ( #644 )
2021-05-15 09:05:28 -07:00
Michael Kirk
9fc2505df8
touch up "travel times" screen (formerly "trip summaries") ( #645 )
...
* touch-up scatter plot
* Bespoke bucket durations for faster/slower, rename duration summaries
* codify secondary text color per theme
* clarify axis labels apply to bar boundaries
* address clippy
2021-05-14 16:19:00 -07:00
Dustin Carlino
29c881ffc3
Switch from cargo +nighty fmt to the stable cargo fmt. Whatever edge-case formatting was happening with stable has been fixed
2021-05-14 08:39:51 -07:00
Vinzent Steinberg
fd3b0e2a14
Fix compilation failures and most clippy warnings ( #642 )
...
* abstutil: Fix compilation failure
* map_gui: Fix compilation
* traffic_signal_data: Fix compilation failure
* map_model: Fix compilation failure
* abstutil: Fix doctests
* abstio: Fix most clippy warnings
* abstutil: Fix most clippy warnings
* collisions: Fix clippy warning
* convert_osm: Fix clippy warnings
* sim: Fix most clippy warnings
* geom: Fix clippy warnings
* kml: Fix clippy warnings
* map_model: Fix most clippy warnings
* fifteen_min: Fix clippy warnings
* game: Fix many clippy warnings
* Disable some noisy clippy warnings
* headless: Fix clippy warnings
* importer: Fix clippy warnings
* map_editor: Fix clippy warnings
* map_gui: Fix clippy warnings
* osm_viewer: Fix clippy warnings
* parking_mapper: Fix most clippy warnings
* popdat: Fix clippy warnings
* santa: Fix clippy warnings
* sumo: Fix clippy warnings
* traffic_seitan: Fix clippy warning
* updater: Fix clippy warnings
* widgetry: Fix clippy warnings
* tests: Fix some clippy warnings
* Fix compilation on stable Rust
* Simplify unwrapping
* Make use of `Entry` more readable
* Fix formatting
* Fix code that was broken in the refactoring
* Apply cargo +stable fmt
* Fix code that was broken in the refactoring, second try
* Remove `Default` impls that are equivalent to `new`
* Remove obsolete clippy wrapper
* Avoid turbofish
* Prefer `unwrap_or_else` over allowing `clippy::or_fun_call`
* Remove redundant `into_iter`
* Fix typo
* Prefer `&& false` over commenting code out
* Fix some clippy warnings
Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2021-05-14 08:32:56 -07:00
Michael Kirk
0d758c74f1
Polish contingency matrix / risk screen
...
- better color contrast
- don't color neutral/no-change buckets
- show "-" rather than "0" for cells which have been filtered out
- bespoke, non-linear, bucket durations for x-axis
- less buckets for y-axis
- better copy for tooltips
- label axes
- show empty chart rather than no chart
- remove "delays" which aren't really risks
- clarify that risk visualizations are just for bikes for now
- remove filter UI and only include bikes
2021-05-13 13:35:04 -07:00
Michael Kirk
cfbd58cdce
shrink down jump-to menu w/ exact sizing
2021-05-12 17:39:19 -07:00
Michael Kirk
ec82b728dc
hotkeys for proposal navigation
2021-05-12 17:39:19 -07:00
Dustin Carlino
8826af31cb
Make the CSV extra shapes parser handle WKT linestrings, so we can
...
visualize the GMNS signal timing data easily. #626
And fiddle with the KML viewer UI a bit to make it easier to inspect the
movement polylines.
2021-05-05 13:40:53 -07:00
Dustin Carlino
82332ad94a
Change how durations are printed ( #633 )
2021-04-29 14:22:35 -07:00
Dustin Carlino
5186957ce4
Store a generic type in the Spinner widget. ( #631 )
2021-04-29 11:35:22 -07:00
Dustin Carlino
8c5f603c39
Pick default scenarios better, and describe some of the UK scenarios in the picker.
...
And the tiny Widget::evenly_spaced_row refactor from the previous PR
2021-04-28 18:01:08 -07:00
Michael Kirk
4a18c64701
tweaks to get closer to the design ( #630 )
2021-04-28 17:59:23 -07:00
Dustin Carlino
7f2dafb489
Get closer to the Figma card style for road editor buttons. #597 ( #627 )
2021-04-28 17:39:21 -07:00
Dustin Carlino
b235c0d0bb
Organize the per-country city picker UI by alphabetical rows. Quick idea from today's UX session.
2021-04-28 17:19:09 -07:00
Dustin Carlino
bc591c1b5f
Plumb back the widget name in Outcome::Changed
2021-04-22 13:09:32 -07:00
Dustin Carlino
babdc9e384
Let TextBox know its own name, and clean up the API for creating them
2021-04-22 13:09:32 -07:00
Dustin Carlino
ff039f017a
Let Spinner know its own name
2021-04-22 13:09:32 -07:00
Dustin Carlino
4ee50de58d
Make dropdowns start with the current value when you open them
2021-04-22 07:57:23 -07:00
Michael Kirk
0697e1f649
make minimap fixed size
...
On very large windows, the minimap felt a little weird.
Plus, looked weird on very short windows, since we were only considering
width, not height,
Now that layout is all in logical pixels, we're more likely to get
reasonable layout using "fixed-size" components, and only judicious use
of components that scale with the window.
2021-04-15 19:22:37 -07:00
Dustin Carlino
1e94ba9b06
Update some tutorial wording from Yuwen's designs.
...
Internally, overhaul some of the crazy tutorial code to just use Text,
not Vec<String>.
2021-04-13 16:56:39 -07:00
Michael Kirk
4f81f186af
embed mode and reworked web build system ( #592 )
...
* root element id from Settings, respect element size
* Plumb assets root via settings
* adapt crates to new wasm api
* more FileLoader cleanup
* use tsc bin from node_modules
* avoid spurious unlink errors
GNU Make considers the src/*/wasm_pkg targets as intermediate build
files and attempted to `rm` them. We can stop that my marking them as
`.PRECIOUS`
https://www.gnu.org/software/make/manual/html_node/Special-Targets.html
* `open` doesn't work on Linux
We could do something with xdg-open, but meh, not worth having platform
dependent logic for this.
* fix typo, clarify instructions
* make server compatible with older python install on linux
* revert change - we dont want to include music on web
the leading "-" means exclude a subdir of an included dir.
* better wrap of comments
* fix misfire in copy/pasted comment
* update docs
2021-04-01 19:31:02 -07:00
Dustin Carlino
0e86b94408
Make the start/end rectangular filter actually apply to the trip tables. #574
2021-03-31 16:35:56 -07:00
Dustin Carlino
c89e918fec
Create a dummy widget to stash generic state in a Panel, and use it to plumb around the rectangular regions to the trip table filters. #574
...
The filter still doesn't make use of the regions yet.
2021-03-31 16:35:56 -07:00
Dustin Carlino
ef7cbdcf48
Generalize LinePlot to handle any kind of X-axis, not just time. #82
...
Also split out some common code to a plots module. Fan charts and
scatter plots are still hardcoded to use Time as the X-axis and
duplicate lots of code, but this is a step towards refactoring
everything.
2021-03-26 12:07:21 -07:00
Dustin Carlino
73a31d1633
Add a line plot showing the elevation of the route taken by pedestrians
...
and cyclists. Add support for Distance as the Y axis of a LinePlot. #82
2021-03-26 12:07:21 -07:00
Dustin Carlino
2c1c18d34a
Upgrade glow
2021-03-25 15:23:13 -07:00
Michael Kirk
e672256828
Import screen UI fixups ( #584 )
...
* Import screen UI fixups
- even out the spacing a bit
- use underline style for "Alternate Instructions" web link
- left/right switch is more intuitive than right/left
- disambiguate label from toggle id
2021-03-23 15:11:14 -07:00
Michael Kirk
b07ac626d4
fixup proposal "tabs"
2021-03-22 12:00:43 -07:00
Michael Kirk
761e2e6412
new tab styles for info panels
2021-03-20 14:33:54 -07:00
Michael Kirk
af079c24e6
rename txt.add -> txt.add_line
2021-03-19 17:48:30 -07:00
Michael Kirk
affd582093
more concise Text
/ tooltip()
2021-03-19 16:48:54 -07:00
Dustin Carlino
edfb745bb2
Change the default color scheme to day mode. Behaviorally, this rolls out the change for the OSM viewer, 15m app, parking mapper, and map_editor.
2021-03-19 15:26:35 -07:00
Michael Kirk
2de212438f
fix comment typos
2021-03-19 12:43:32 -07:00
Michael Kirk
62180432b9
increase tab contrast a bit more in dark theme
2021-03-19 11:56:22 -07:00
Michael Kirk
014bd56379
CR: clarify swap_inner_content method
2021-03-19 11:56:22 -07:00
Michael Kirk
8b685fd746
increase contrast of panel_bg vs the panel_section
...
Currently the color was only via transparency - so depending on what was
behind the panel, there was sometimes not enough contrast.
2021-03-19 11:56:22 -07:00
Michael Kirk
e493c02d83
convert trip tables to new tabs
...
The GenericTable machinery lost a lot of it's utility now that we have
proper tabs. I've left a couple of free functions to be shared, and
inlined the remaining simple functionality.
2021-03-19 11:56:22 -07:00
Michael Kirk
e39059644c
fixup! wip apply tabs to TimeWarp
2021-03-19 11:56:22 -07:00
Michael Kirk
02d08fa262
fixup! style tabs
2021-03-19 11:56:22 -07:00
Michael Kirk
1d57bb5f25
wip apply tabs to TimeWarp
2021-03-19 11:56:22 -07:00
Michael Kirk
7f00154ae6
style tabs
2021-03-19 11:56:22 -07:00
Michael Kirk
ab787a5cd1
WIP: spiked tabs implementation for widgetry demo
...
TODO:
- tooltips (or is that just a responsibility of the button builder?)
- widgetry color scheme should use day-theme
- pick nice tab colors
- start applying!
- jump in time
- info panel
- "more data"
- fix width to match widest? Or maybe width modes?
2021-03-19 11:56:22 -07:00
Michael Kirk
a0ad4bd762
fixup! Replace ButtonImage with Image
...
Apply default tint to icons unless specified as untinted
2021-03-18 11:02:41 -07:00
Michael Kirk
546599e4f9
Replace ButtonImage with Image
2021-03-17 19:06:43 -07:00
Dustin Carlino
1773782975
Place layer panels and info panels in the same place, on the left side of the screen. Simplify layer code, now that we don't need to align relative to the minimap.
2021-03-17 14:15:13 -07:00
Michael Kirk
4418c94fd6
fixup! minimap controls: agent toggles and meters into one row
2021-03-16 18:28:50 -07:00
Michael Kirk
264f1f939f
minimap controls: agent toggles and meters into one row
...
Some ancillary changes:
Made the GeomBatchStack public and extracted the ImageSource
functionality from ButtonBuilder to Image.
2021-03-16 18:28:50 -07:00
Michael Kirk
810c89eeb1
meter shows "finished trips vs baseline" instead of time ( #565 )
2021-03-15 17:10:08 -07:00
Dustin Carlino
59e9735318
Force actdev top panels to have the same height. #551
2021-03-12 17:48:35 -08:00
Dustin Carlino
8ac62fed47
Trying out some UI changes suggested by Martin:
...
- Increase day mode panel opacity to 95% to help text legibility
- Combine the time/speed panels, and remove the sunrise/sunset icons
- 4 mode colors matching actdev, also changing night mode residential
buildings
2021-03-12 17:48:35 -08:00
Dustin Carlino
522b902453
Improve the traffic signal timing UI. There's a choice between fixed and
...
variable timing, but currently you have to remember to toggle it; the
two extra spinners get ignored otherwise. The new version is still
confusing, but I think it's an improvement.
2021-03-11 11:39:58 -08:00
Dustin Carlino
8be24bf007
Use AsRef<str> in more widgetry methods, getting rid of &format at many
...
call-sites. #253
To make some of these work, changed Label to store a String. Ultimately
it gets transformed into Text, so we need to allocate eventually.
2021-03-11 11:29:18 -08:00
Dustin Carlino
9c2c8bbd8f
Change some uses of Into<String> to AsRef<str>, to avoid allocations. #253
...
I manually audited all uses. I kept Into<String> when we really do wind
up storing a String.
2021-03-11 11:29:18 -08:00
Dustin Carlino
f5eca6ff02
Seemingly fix squished loading screens at startup by always using inner_size. ( #561 )
2021-03-11 09:48:39 -08:00
Dustin Carlino
65d7bc5c8e
Rename {Text,TextSpan}::draw to into_widget, for consistency. #253
2021-03-09 09:59:30 -08:00
Dustin Carlino
a4a20ce1e5
draw_text renamed to text_widget, for consistency. #253
2021-03-09 09:56:41 -08:00
Dustin Carlino
b0bcdb2115
Replace Widget::draw_batch with batch.into_widget, for consistency. #253 ( #554 )
2021-03-09 08:55:12 -08:00
Dustin Carlino
42bd63e79b
Lift URL and viewport code from game to map_gui. Also use it for OSM viewer and the 15min tool.
2021-03-04 13:22:09 -08:00
Dustin Carlino
4d048d83bd
A few misc fixes after the grand button/color refactor:
...
- Always draw traffic signal stage numbers as white, even in day mode
- Always draw loading screen text as white, in any theme
- Double the scrollbar thickness from 4px to 8px (still way thinner than
the original design)
[rebuild] [release]
2021-02-28 10:31:00 -08:00
Michael Kirk
09c98b99c7
better contrast for primary button when disabled ( #548 )
2021-02-27 21:11:03 -08:00
Michael Kirk
86799e2832
Remove StyledButtons - instead implement everything on the individual
...
ButtonStyle
2021-02-27 21:08:26 -08:00
Michael Kirk
703ab1a0e8
inline dark style since we were assigning most of the props via overrides anyway
2021-02-27 21:08:26 -08:00
Michael Kirk
11a904a4da
WIP: separate style for plain
2021-02-27 21:08:26 -08:00
Michael Kirk
6b35060dbb
inline more functionality into ButtonStyle
2021-02-27 21:08:26 -08:00
Michael Kirk
c3985ffdd1
btn_solid -> btn_tab and replace inappropriate uses
2021-02-27 21:08:26 -08:00
Michael Kirk
7fe0e521ee
Use btn_destructive.* methods instead of btn_destructive_*
2021-02-27 21:08:26 -08:00
Michael Kirk
cee0e5dbbd
Use btn_primary.* methods instead of btn_primary_*
2021-02-27 21:08:26 -08:00
Michael Kirk
87a1a3f027
fix outline for spinner (without crashing!) and cache drawable
2021-02-27 15:29:03 -08:00
Michael Kirk
088e434a0a
Revert "Fix too-thin outline of Spinner"
...
This reverts commit 9dc2b365c8
.
2021-02-27 15:29:03 -08:00
Michael Kirk
27b20c45c8
make EdgeInset f64, like other layout
...
Remove unnecessary casts to f64
2021-02-27 13:14:37 -08:00
Michael Kirk
9dc2b365c8
Fix too-thin outline of Spinner
2021-02-27 13:13:41 -08:00
Michael Kirk
1e75352ce0
Theme section bg
...
`Widget::outline` takes OutlineStyle
2021-02-27 13:13:41 -08:00
Michael Kirk
73280bc114
consolidate OutlineStyle
...
We had a lot of constants sprinkled around. This consolidates the
constants and packages the outline thickness and color into a tuple,
making for a (usually) cleaner callsite.
2021-02-27 13:13:41 -08:00
Michael Kirk
300172282b
disabled outline/plain buttons should not gain a background
2021-02-27 13:13:41 -08:00
Michael Kirk
2378da9731
theme signal editor bg
2021-02-27 10:30:41 -08:00
Michael Kirk
5f3c914e28
Pad SliderArea so it doesn't overlap neighboring elements
...
and shrink it down just a bit to be more in scale with other UI
2021-02-26 18:59:19 -08:00
Michael Kirk
bee4989a5d
make area slider wider than scrollbars
2021-02-26 18:59:19 -08:00
Michael Kirk
cae7f55ba4
theme slider/scrollbars
2021-02-26 18:59:19 -08:00
Michael Kirk
cf69dd0370
slightly better approach to get the cut-scene looking better
2021-02-26 16:30:14 -08:00
Michael Kirk
bcba72cddf
enable new day theme, but retain legacy theme for pregame
2021-02-26 16:30:14 -08:00
Michael Kirk
4b2f3888ed
replace btn_solid w/ primary/outline as appropriate
2021-02-26 14:05:19 -08:00
Michael Kirk
6156311576
add btn_primary style
2021-02-26 14:05:19 -08:00
Michael Kirk
143fdc3fd5
label_underlined_text for "link" buttons
2021-02-26 14:05:19 -08:00
Michael Kirk
7e3d8bded9
per design: outline style for dropdowns
2021-02-26 14:05:19 -08:00
Michael Kirk
f5b52073fc
shade dropdown/text-fields in night mode
...
Consistent with other themes, fields in night mode should be distinct
from the panel color, a shade darker.
2021-02-26 14:05:19 -08:00
Michael Kirk
3019a6fff1
Introduce Image
component to handle themed icons ( #537 )
2021-02-25 18:06:19 -08:00
Michael Kirk
46593b01ed
theme text field (and fixup layout)
2021-02-25 17:42:04 -08:00
Michael Kirk
6b8211c3ba
theme dividers
2021-02-25 17:42:04 -08:00
Dustin Carlino
357ba15afe
Add back the zcool font so the Taipei map renders names. But this time, asynchronously load the font instead of bundling it in system assets and increasing the .wasm size. #535
...
Temporarily take on some technical debt with the new RawFileLoader...
2021-02-25 15:25:47 -08:00
Dustin Carlino
6bfa569923
Support changing fonts in the middle of a line. Use this to draw numeric ( #533 )
...
IDs in the status bar as bold, not red.
2021-02-25 08:57:42 -08:00
Michael Kirk
5d7875d5be
theme spinner
2021-02-24 20:17:18 -08:00
Michael Kirk
fc4a4d1071
Fix loading screen legibility
...
long-term we should probably get all the colors from Style, but until
then just hardcode White text since all other colors are hardcoded.
2021-02-24 20:17:18 -08:00
Michael Kirk
ac30774b06
theme dropdowns and menus
2021-02-24 18:10:06 -08:00
Michael Kirk
c6d361c4b0
remove take_menu
2021-02-24 18:10:06 -08:00
Michael Kirk
9533c10137
Theme switches
...
The main button API only allows re-writing one color of the image.
Since we need to rewrite multiple colors for the switch, I introduced a
`image_batch` for buttons which lets you do all kinds of manual
fanciness, and pass the result into the button API.
2021-02-24 14:59:47 -08:00
Michael Kirk
f34f6ab315
theme checkbox
2021-02-24 14:59:47 -08:00
Michael Kirk
d774aeae44
rename toggle/checkbox
2021-02-24 14:59:47 -08:00
Michael Kirk
3ab7fc4361
Fix tooltips and hotkey for day-theme ( #528 )
2021-02-24 10:52:57 -08:00
Michael Kirk
1387a8c11f
Text gets default color from Style ( #526 )
2021-02-23 19:30:50 -08:00
Dustin Carlino
0344e51170
Merge pull request #525 from a-b-street/prefetch
...
Make a web loader that can 'prefetch' abst in the background. cyipt/a…
2021-02-23 13:34:55 -08:00
Dustin Carlino
316dcd7d06
themed buttons ( #524 )
...
* cargo fmt
* rename ButtonStyle to ButtonTheme to avoid ambiguity
widgetry::styles::button:ButtonStyle -> ButtonTheme is a collection of
colors
vs. widgetry::widgets::button::ButtonStyle which is a per-state styling
(hover vs. disabled etc.)
* Collapse button styles to be theme specified (no visible changes).
Button colors are now determined by the color scheme, but for now all
schemes are hardcoded to use the same "night" button colors. Read on for
rationale...
Previously, which button colors to use (dark/light) was specified inline
while building the UI.
Eventually we want to live in a world where color scheme determines:
- panel colors
- button colors
- text colors
The theme could already choose panel colors easily enough, but because
the buttons and text were not determined by theme, choosing anything
other than a black or dark grey panel color makes the buttons and text
unreadable.
This PR tackled the themeable "button colors" portion, but all themes
continue to use the "night" colors for now, because using the actual
"day" colors would still make the text unreadable.
next up: themeable text!
The one intentional regression is within the pregame tutorial,
which has always been styled differently from the rest of the app. An
expeditious hack has caused the prev/next/continue buttons to lose their
visible hover state. I'll restore this upon completing the day theme
work.
* rethink rename... keep Style.ButtonStyle, rename button::ButtonStyle->ButtonStateStyle
* btn_solid_panel is the same as btn_solid
2021-02-23 11:49:28 -08:00
Dustin Carlino
4c97687a5b
Make a web loader that can 'prefetch' abst in the background. cyipt/actdev-ui#15
2021-02-23 11:45:39 -08:00
Michael Kirk
657887e90f
stray mut
2021-02-23 11:32:20 -08:00
Dustin Carlino
8bee003808
Fix a few stray warnings from rustc, and improve a panic error message when data/system gets unexpected directory names
2021-02-23 11:16:43 -08:00
Michael Kirk
62a433ed8d
btn_solid_panel is the same as btn_solid
2021-02-23 10:17:49 -08:00
Michael Kirk
dde3ca9f67
rethink rename... keep Style.ButtonStyle, rename button::ButtonStyle->ButtonStateStyle
2021-02-23 09:56:58 -08:00