Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Resizable window nearing completion

  • Loading branch information...
commit a054cb339b89d0f856f9f9df38495f7e10adc81f 1 parent 86df8bd
@mezzoblue authored
View
BIN  Elevation UI.psd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
5 Elevation.pde
@@ -82,11 +82,14 @@ void setup() {
compass = new uiCompass();
crosshair = new uiCrosshairs();
- chrome = new uiPanel[3];
+ chrome = new uiPanel[6];
// chrome: labels and UI element backing
chrome[0] = new uiPanel("UI-Chrome-Compass");
chrome[1] = new uiPanel("UI-Chrome-Checkboxes");
chrome[2] = new uiPanel("UI-Chrome-Switches");
+ chrome[3] = new uiPanel("UI-Chrome-Elevation");
+ chrome[4] = new uiPanel("UI-Chrome-LatLong");
+ chrome[5] = new uiPanel("UI-Chrome-Zoom");
// arrow buttons
buttons[0] = new uiButton(
View
BIN  data/interface/Panel.png
Deleted file not rendered
View
BIN  data/interface/UI-Chrome-Compass.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  data/interface/UI-Chrome-Elevation.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  data/interface/UI-Chrome-LatLong.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  data/interface/UI-Chrome-Zoom.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  data/interface/UI-Panel.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
19 ui.pde
@@ -411,13 +411,12 @@ class uiScale {
void render(color col) {
if (toggle) {
- // find out current width of scene
- kmCount = scene.currentWidth;
-
// how many kilometers wide the base scale is, based on scene width and variable drawingScale value
- kmScale = (kmCount / (kmCount * scene.drawingScale) * cos(scene.averageLat * PI/180));
+ kmScale = (wide / (wide * scene.drawingScale) * cos(scene.averageLat * PI/180));
+ println(kmScale);
// how many pixels between each km marker
+ // (currently the right half of this is causing the scale to clip, but some form of averaging is necessary to keep the scale accurate)
kmInterval = (wide / kmScale) * (1000.00 / wide);
if (!scene.writePDF) {
@@ -640,6 +639,9 @@ void cacheUI() {
for (int i = 0; i < checkboxes.length; i++) {
checkboxes[i].refreshImages();
}
+ for (int i = 0; i < chrome.length; i++) {
+ chrome[i].refreshImages();
+ }
for (int i = 0; i < switches.length; i++) {
switches[i].refreshImages();
}
@@ -651,14 +653,15 @@ void positionUI(int w, int h) {
h -= sceneOffset;
UI.setCoordinates(0, h - 100, w, 100);
- println(UI.wide);
-
- compass.setCoordinates(w / 2, h - 50, 31, 31); // eventually w / 2
- mapScale.setCoordinates(w / 2, h - 106, w, 5); // very wrong when scaled up
+ compass.setCoordinates(w / 2, h - 50, 31, 31);
+ mapScale.setCoordinates(w / 2, h - 106, w, 5);
chrome[0].setCoordinates(w / 2 - 20, h - 70, 41, 41);
chrome[1].setCoordinates(w - 205, h - 70, 147, 39);
chrome[2].setCoordinates(w - 387, h - 43, 82, 28);
+ chrome[3].setCoordinates(227, h - 43, 79, 29);
+ chrome[4].setCoordinates(107, h - 64, 83, 29);
+ chrome[5].setCoordinates(353, h - 43, 59, 29);
checkboxes[0].setCoordinates(w - 134, h - 74, 19, 18);
checkboxes[1].setCoordinates(w - 134, h - 46, 19, 18);
Please sign in to comment.
Something went wrong with that request. Please try again.