Merge lp:~robert-ancell/ubuntu-netwalk/modern-ui into lp:ubuntu-netwalk
- modern-ui
- Merge into trunk
Proposed by
Robert Ancell
Status: | Merged |
---|---|
Merge reported by: | Filippo Scognamiglio |
Merged at revision: | not available |
Proposed branch: | lp:~robert-ancell/ubuntu-netwalk/modern-ui |
Merge into: | lp:ubuntu-netwalk |
Diff against target: |
622 lines (+230/-291) 11 files modified
manifest.json (+1/-1) qml/UbuntuNetwalk.qml (+101/-101) qml/components/AboutDialog.qml (+0/-31) qml/components/AboutPage.qml (+12/-0) qml/components/DropdownMenu.qml (+1/-1) qml/components/GameView.qml (+1/-2) qml/components/HighScoresDialog.qml (+0/-90) qml/components/HighScoresPage.qml (+69/-0) qml/components/SettingsDialog.qml (+0/-64) qml/components/SettingsPage.qml (+44/-0) qml/components/TopBar.qml (+1/-1) |
To merge this branch: | bzr merge lp:~robert-ancell/ubuntu-netwalk/modern-ui |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Filippo Scognamiglio | Approve | ||
Review via email: mp+260907@code.launchpad.net |
Commit message
Description of the change
Update to modern UI as the current UI didn't seem to render properly on current phones.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'manifest.json' | |||
2 | --- manifest.json 2014-03-06 10:08:44 +0000 | |||
3 | +++ manifest.json 2015-06-03 03:58:13 +0000 | |||
4 | @@ -1,6 +1,6 @@ | |||
5 | 1 | { | 1 | { |
6 | 2 | "description": "Ubuntu NetWalk app", | 2 | "description": "Ubuntu NetWalk app", |
8 | 3 | "framework": "ubuntu-sdk-13.10", | 3 | "framework": "ubuntu-sdk-14.10", |
9 | 4 | "architecture": "armhf", | 4 | "architecture": "armhf", |
10 | 5 | "hooks": { | 5 | "hooks": { |
11 | 6 | "ubuntu-netwalk": { | 6 | "ubuntu-netwalk": { |
12 | 7 | 7 | ||
13 | === modified file 'qml/UbuntuNetwalk.qml' | |||
14 | --- qml/UbuntuNetwalk.qml 2014-02-09 21:40:05 +0000 | |||
15 | +++ qml/UbuntuNetwalk.qml 2015-06-03 03:58:13 +0000 | |||
16 | @@ -1,7 +1,6 @@ | |||
17 | 1 | 1 | ||
18 | 2 | import QtQuick 2.0 | 2 | import QtQuick 2.0 |
21 | 3 | import Ubuntu.Components 0.1 | 3 | import Ubuntu.Components 1.1 |
20 | 4 | import Ubuntu.Components.Popups 0.1 | ||
22 | 5 | 4 | ||
23 | 6 | import "components" | 5 | import "components" |
24 | 7 | 6 | ||
25 | @@ -16,6 +15,7 @@ | |||
26 | 16 | // Note! applicationName needs to match the .desktop filename | 15 | // Note! applicationName needs to match the .desktop filename |
27 | 17 | applicationName: "com.ubuntu.developer.flscogna.ubuntu-netwalk" | 16 | applicationName: "com.ubuntu.developer.flscogna.ubuntu-netwalk" |
28 | 18 | automaticOrientation: true | 17 | automaticOrientation: true |
29 | 18 | useDeprecatedToolbar: false | ||
30 | 19 | 19 | ||
31 | 20 | width: units.gu(100) | 20 | width: units.gu(100) |
32 | 21 | height: units.gu(75) | 21 | height: units.gu(75) |
33 | @@ -23,109 +23,109 @@ | |||
34 | 23 | headerColor: "#444444"; | 23 | headerColor: "#444444"; |
35 | 24 | backgroundColor: "#333333"; | 24 | backgroundColor: "#333333"; |
36 | 25 | footerColor: "#333333"; | 25 | footerColor: "#333333"; |
110 | 26 | 26 | ||
111 | 27 | Page { | 27 | PageStack { |
112 | 28 | id: gamepage | 28 | id: page_stack |
113 | 29 | title: i18n.tr("UbuntuNetWalk") | 29 | Component.onCompleted: push (gamepage) |
114 | 30 | 30 | ||
115 | 31 | AboutDialog{id: aboutdialog} | 31 | Page { |
116 | 32 | SettingsDialog{id: settingsdialog} | 32 | id: gamepage |
117 | 33 | HighScoresDialog{id: highscoredialog} | 33 | title: i18n.tr("UbuntuNetWalk") |
118 | 34 | 34 | ||
119 | 35 | tools: ToolbarItems { | 35 | head.actions: |
120 | 36 | ToolbarButton{ | 36 | [ |
121 | 37 | objectName: "about" | 37 | Action { |
122 | 38 | text: i18n.tr("About") | 38 | text: i18n.tr("Settings") |
123 | 39 | iconSource: Qt.resolvedUrl("imgs/png/star.png") | 39 | iconName: "settings" |
124 | 40 | 40 | onTriggered: page_stack.push (settings_page) | |
125 | 41 | onTriggered: PopupUtils.open(aboutdialog, gamepage) | 41 | }, |
126 | 42 | } | 42 | Action { |
127 | 43 | 43 | text: i18n.tr("New Game") | |
128 | 44 | ToolbarButton{ | 44 | iconName: "reload" |
129 | 45 | objectName: "highscores" | 45 | onTriggered: { |
130 | 46 | text: i18n.tr("HighScores") | 46 | var params = settingsmanager.getDifficultyParams(); |
131 | 47 | iconSource: Qt.resolvedUrl("imgs/png/star.png") | 47 | logic.newGame(params[0],params[1],params[2],params[3]); |
132 | 48 | 48 | } | |
133 | 49 | onTriggered: { | 49 | }, |
134 | 50 | PopupUtils.open(highscoredialog, gamepage) | 50 | Action { |
135 | 51 | } | 51 | text: i18n.tr("HighScores") |
136 | 52 | } | 52 | iconSource: Qt.resolvedUrl("imgs/png/star.png") |
137 | 53 | 53 | onTriggered: page_stack.push (high_scores_page) | |
138 | 54 | ToolbarButton{ | 54 | }, |
139 | 55 | objectName: "settings" | 55 | Action { |
140 | 56 | text: i18n.tr("Settings") | 56 | text: i18n.tr("About") |
141 | 57 | 57 | iconName: "info" | |
142 | 58 | iconSource: Qt.resolvedUrl("imgs/png/edit.png"); | 58 | onTriggered: page_stack.push (about_page) |
143 | 59 | 59 | } | |
144 | 60 | onTriggered: { | 60 | ] |
145 | 61 | PopupUtils.open(settingsdialog, gamepage); | 61 | |
146 | 62 | } | 62 | Timer{ |
147 | 63 | } | 63 | interval: 100 |
148 | 64 | 64 | onTriggered: logic.time += 0.1 | |
149 | 65 | ToolbarButton{ | 65 | running: logic.gameState === logic.GAME_RUNNING |
150 | 66 | objectName: "action" | 66 | repeat: true |
151 | 67 | 67 | } | |
152 | 68 | iconSource: Qt.resolvedUrl("imgs/png/reload.png") | 68 | |
153 | 69 | text: i18n.tr("New Game") | 69 | SettingsManager{ |
154 | 70 | 70 | id: settingsmanager | |
155 | 71 | onTriggered: { | 71 | } |
156 | 72 | var params = settingsmanager.getDifficultyParams(); | 72 | |
157 | 73 | logic.newGame(params[0],params[1],params[2],params[3]); | 73 | Rectangle{ |
158 | 74 | } | 74 | id: maincontainer |
159 | 75 | } | 75 | color: "#191919"; |
160 | 76 | } | 76 | |
161 | 77 | 77 | clip: true | |
162 | 78 | Timer{ | 78 | |
163 | 79 | interval: 100 | 79 | anchors.fill: parent |
164 | 80 | onTriggered: logic.time += 0.1 | 80 | |
165 | 81 | running: logic.gameState === logic.GAME_RUNNING | 81 | DropdownMenu{ |
166 | 82 | repeat: true | 82 | id: dropdownmenu |
167 | 83 | } | 83 | anchors{ |
168 | 84 | 84 | top: parent.top | |
169 | 85 | SettingsManager{ | 85 | bottom: statsbar.bottom |
170 | 86 | id: settingsmanager | 86 | left: parent.left |
171 | 87 | } | 87 | right: parent.right |
172 | 88 | 88 | } | |
173 | 89 | Rectangle{ | 89 | |
174 | 90 | id: maincontainer | 90 | z: 5 |
175 | 91 | color: "#191919"; | 91 | } |
176 | 92 | 92 | ||
177 | 93 | clip: true | 93 | TopBar{ |
178 | 94 | 94 | id: statsbar | |
179 | 95 | anchors.fill: parent | 95 | } |
180 | 96 | 96 | ||
108 | 97 | DropdownMenu{ | ||
109 | 98 | id: dropdownmenu | ||
181 | 99 | anchors{ | 97 | anchors{ |
182 | 98 | bottom: parent.bottom | ||
183 | 100 | top: parent.top | 99 | top: parent.top |
184 | 101 | bottom: statsbar.bottom | ||
185 | 102 | left: parent.left | 100 | left: parent.left |
186 | 103 | right: parent.right | 101 | right: parent.right |
212 | 104 | } | 102 | margins: units.gu(1) |
213 | 105 | 103 | } | |
214 | 106 | z: 5 | 104 | |
215 | 107 | } | 105 | GameView { |
216 | 108 | 106 | id: mainview | |
217 | 109 | TopBar{ | 107 | objectName: "mainview" |
218 | 110 | id: statsbar | 108 | |
219 | 111 | } | 109 | anchors.fill: parent |
220 | 112 | 110 | anchors.topMargin: statsbar.height | |
221 | 113 | anchors{ | 111 | visible: true |
222 | 114 | bottom: parent.bottom | 112 | } |
223 | 115 | top: parent.top | 113 | } |
224 | 116 | left: parent.left | 114 | } |
225 | 117 | right: parent.right | 115 | |
226 | 118 | margins: units.gu(1) | 116 | HighScoresPage { |
227 | 119 | } | 117 | id: high_scores_page |
228 | 120 | 118 | visible: false | |
229 | 121 | GameView { | 119 | } |
230 | 122 | id: mainview | 120 | |
231 | 123 | objectName: "mainview" | 121 | SettingsPage { |
232 | 124 | 122 | id: settings_page | |
233 | 125 | anchors.fill: parent | 123 | visible: false |
234 | 126 | anchors.topMargin: statsbar.height | 124 | } |
235 | 127 | visible: true | 125 | |
236 | 128 | } | 126 | AboutPage { |
237 | 127 | id: about_page | ||
238 | 128 | visible: false | ||
239 | 129 | } | 129 | } |
240 | 130 | } | 130 | } |
241 | 131 | 131 | ||
242 | 132 | 132 | ||
243 | === removed file 'qml/components/AboutDialog.qml' | |||
244 | --- qml/components/AboutDialog.qml 2014-01-25 10:48:17 +0000 | |||
245 | +++ qml/components/AboutDialog.qml 1970-01-01 00:00:00 +0000 | |||
246 | @@ -1,31 +0,0 @@ | |||
247 | 1 | import QtQuick 2.0 | ||
248 | 2 | import Ubuntu.Components 0.1 | ||
249 | 3 | import Ubuntu.Components.Popups 0.1 | ||
250 | 4 | |||
251 | 5 | |||
252 | 6 | Component { | ||
253 | 7 | id: aboutdialog | ||
254 | 8 | |||
255 | 9 | Dialog { | ||
256 | 10 | id: aboutdialogue | ||
257 | 11 | title: i18n.tr("About") | ||
258 | 12 | text: i18n.tr("The remake of the popular game Netwalk optimized for Ubuntu Touch! \n\n Filippo Scognamiglio (flscogna@gmail.com)") | ||
259 | 13 | |||
260 | 14 | Image{ | ||
261 | 15 | width: 128 | ||
262 | 16 | height: 128 | ||
263 | 17 | fillMode: Image.PreserveAspectFit | ||
264 | 18 | source: "../imgs/png/ubuntuNetwalkicon.png" | ||
265 | 19 | } | ||
266 | 20 | |||
267 | 21 | Rectangle{ | ||
268 | 22 | opacity: 0 | ||
269 | 23 | height: units.gu(2) | ||
270 | 24 | } | ||
271 | 25 | |||
272 | 26 | Button { | ||
273 | 27 | text: i18n.tr("Close") | ||
274 | 28 | onClicked: PopupUtils.close(aboutdialogue) | ||
275 | 29 | } | ||
276 | 30 | } | ||
277 | 31 | } | ||
278 | 32 | 0 | ||
279 | === added file 'qml/components/AboutPage.qml' | |||
280 | --- qml/components/AboutPage.qml 1970-01-01 00:00:00 +0000 | |||
281 | +++ qml/components/AboutPage.qml 2015-06-03 03:58:13 +0000 | |||
282 | @@ -0,0 +1,12 @@ | |||
283 | 1 | import QtQuick 2.0 | ||
284 | 2 | import Ubuntu.Components 1.1 | ||
285 | 3 | |||
286 | 4 | Page { | ||
287 | 5 | title: i18n.tr("About") | ||
288 | 6 | |||
289 | 7 | Label { | ||
290 | 8 | anchors.fill: parent | ||
291 | 9 | anchors.margins: units.gu (2) | ||
292 | 10 | text: i18n.tr("The remake of the popular game Netwalk optimized for Ubuntu Touch! \n\n Filippo Scognamiglio (flscogna@gmail.com)") | ||
293 | 11 | } | ||
294 | 12 | } | ||
295 | 0 | 13 | ||
296 | === modified file 'qml/components/DropdownMenu.qml' | |||
297 | --- qml/components/DropdownMenu.qml 2014-02-09 22:41:32 +0000 | |||
298 | +++ qml/components/DropdownMenu.qml 2015-06-03 03:58:13 +0000 | |||
299 | @@ -1,5 +1,5 @@ | |||
300 | 1 | import QtQuick 2.0 | 1 | import QtQuick 2.0 |
302 | 2 | import Ubuntu.Components 0.1 | 2 | import Ubuntu.Components 1.1 |
303 | 3 | 3 | ||
304 | 4 | UbuntuShape { | 4 | UbuntuShape { |
305 | 5 | id: dropdownmenu | 5 | id: dropdownmenu |
306 | 6 | 6 | ||
307 | === modified file 'qml/components/GameView.qml' | |||
308 | --- qml/components/GameView.qml 2014-03-05 22:42:41 +0000 | |||
309 | +++ qml/components/GameView.qml 2015-06-03 03:58:13 +0000 | |||
310 | @@ -1,6 +1,5 @@ | |||
311 | 1 | import QtQuick 2.0 | 1 | import QtQuick 2.0 |
314 | 2 | import Ubuntu.Components 0.1 | 2 | import Ubuntu.Components 1.1 |
313 | 3 | import Ubuntu.Components.Popups 0.1 | ||
315 | 4 | 3 | ||
316 | 5 | Item { | 4 | Item { |
317 | 6 | id: gameview | 5 | id: gameview |
318 | 7 | 6 | ||
319 | === removed file 'qml/components/HighScoresDialog.qml' | |||
320 | --- qml/components/HighScoresDialog.qml 2014-01-25 10:48:17 +0000 | |||
321 | +++ qml/components/HighScoresDialog.qml 1970-01-01 00:00:00 +0000 | |||
322 | @@ -1,90 +0,0 @@ | |||
323 | 1 | import QtQuick 2.0 | ||
324 | 2 | import Ubuntu.Components 0.1 | ||
325 | 3 | import Ubuntu.Components.Popups 0.1 | ||
326 | 4 | import Ubuntu.Components.ListItems 0.1 as ListItem | ||
327 | 5 | |||
328 | 6 | Component { | ||
329 | 7 | id: highscoredialog | ||
330 | 8 | |||
331 | 9 | Dialog { | ||
332 | 10 | id: highscoredialogue | ||
333 | 11 | title: i18n.tr("HighScores") | ||
334 | 12 | |||
335 | 13 | ListModel{ | ||
336 | 14 | id: highscoremodel | ||
337 | 15 | |||
338 | 16 | function appendAll(array){ | ||
339 | 17 | for(var i = 0; i<array.length; i++){ | ||
340 | 18 | highscoremodel.append(array[i]); | ||
341 | 19 | } | ||
342 | 20 | } | ||
343 | 21 | } | ||
344 | 22 | |||
345 | 23 | OptionSelector { | ||
346 | 24 | id: difficultyselector | ||
347 | 25 | text: i18n.tr("Difficulty") | ||
348 | 26 | model: settingsmanager.difficulty_strings | ||
349 | 27 | |||
350 | 28 | selectedIndex: settingsmanager.difficulty_index | ||
351 | 29 | |||
352 | 30 | function loadModel(difficulty){ | ||
353 | 31 | highscoremodel.clear(); | ||
354 | 32 | highscoremodel.appendAll(settingsmanager.highscores[difficulty]); | ||
355 | 33 | } | ||
356 | 34 | |||
357 | 35 | onSelectedIndexChanged: loadModel(selectedIndex) | ||
358 | 36 | Component.onCompleted: loadModel(selectedIndex); | ||
359 | 37 | } | ||
360 | 38 | |||
361 | 39 | |||
362 | 40 | Text{ | ||
363 | 41 | Label{ | ||
364 | 42 | color: "white" | ||
365 | 43 | anchors.left: parent.left | ||
366 | 44 | text: highscoremodel.count !== 0 ? i18n.tr("Name") : i18n.tr("No scores") | ||
367 | 45 | font.bold: true | ||
368 | 46 | } | ||
369 | 47 | Label{ | ||
370 | 48 | color: "white" | ||
371 | 49 | font.bold: true | ||
372 | 50 | anchors.right: parent.right | ||
373 | 51 | text: highscoremodel.count !== 0 ? i18n.tr("Time") + " (" + i18n.tr("Moves") + ")" : "" | ||
374 | 52 | } | ||
375 | 53 | } | ||
376 | 54 | |||
377 | 55 | //Divider | ||
378 | 56 | Rectangle{ | ||
379 | 57 | height: units.gu(0.5) | ||
380 | 58 | opacity: 0 | ||
381 | 59 | } | ||
382 | 60 | |||
383 | 61 | Repeater{ | ||
384 | 62 | model: highscoremodel | ||
385 | 63 | |||
386 | 64 | delegate: Text{ | ||
387 | 65 | Label{ | ||
388 | 66 | anchors.left: parent.left | ||
389 | 67 | text: name | ||
390 | 68 | color: "white" | ||
391 | 69 | } | ||
392 | 70 | Label{ | ||
393 | 71 | anchors.right: parent.right | ||
394 | 72 | color: "white" | ||
395 | 73 | font.bold: true | ||
396 | 74 | text: time.toFixed(1) + " ("+ moves + ")"; | ||
397 | 75 | } | ||
398 | 76 | } | ||
399 | 77 | } | ||
400 | 78 | |||
401 | 79 | //Divider | ||
402 | 80 | Rectangle{ | ||
403 | 81 | height: units.gu(0.5) | ||
404 | 82 | opacity: 0 | ||
405 | 83 | } | ||
406 | 84 | |||
407 | 85 | Button { | ||
408 | 86 | text: i18n.tr("Close") | ||
409 | 87 | onClicked: PopupUtils.close(highscoredialogue) | ||
410 | 88 | } | ||
411 | 89 | } | ||
412 | 90 | } | ||
413 | 91 | 0 | ||
414 | === added file 'qml/components/HighScoresPage.qml' | |||
415 | --- qml/components/HighScoresPage.qml 1970-01-01 00:00:00 +0000 | |||
416 | +++ qml/components/HighScoresPage.qml 2015-06-03 03:58:13 +0000 | |||
417 | @@ -0,0 +1,69 @@ | |||
418 | 1 | import QtQuick 2.0 | ||
419 | 2 | import Ubuntu.Components 1.1 | ||
420 | 3 | |||
421 | 4 | Page { | ||
422 | 5 | title: i18n.tr("HighScores") | ||
423 | 6 | |||
424 | 7 | ListModel{ | ||
425 | 8 | id: highscoremodel | ||
426 | 9 | |||
427 | 10 | function appendAll(array){ | ||
428 | 11 | for(var i = 0; i<array.length; i++){ | ||
429 | 12 | highscoremodel.append(array[i]); | ||
430 | 13 | } | ||
431 | 14 | } | ||
432 | 15 | } | ||
433 | 16 | |||
434 | 17 | Column{ | ||
435 | 18 | anchors.fill: parent | ||
436 | 19 | anchors.margins: units.gu (2) | ||
437 | 20 | spacing: units.gu (2) | ||
438 | 21 | |||
439 | 22 | OptionSelector { | ||
440 | 23 | id: difficultyselector | ||
441 | 24 | text: i18n.tr("Difficulty") | ||
442 | 25 | model: settingsmanager.difficulty_strings | ||
443 | 26 | |||
444 | 27 | selectedIndex: settingsmanager.difficulty_index | ||
445 | 28 | |||
446 | 29 | function loadModel(difficulty){ | ||
447 | 30 | highscoremodel.clear(); | ||
448 | 31 | highscoremodel.appendAll(settingsmanager.highscores[difficulty]); | ||
449 | 32 | } | ||
450 | 33 | |||
451 | 34 | onSelectedIndexChanged: loadModel(selectedIndex) | ||
452 | 35 | Component.onCompleted: loadModel(selectedIndex); | ||
453 | 36 | } | ||
454 | 37 | |||
455 | 38 | Label{ | ||
456 | 39 | color: "white" | ||
457 | 40 | anchors.left: parent.left | ||
458 | 41 | text: highscoremodel.count !== 0 ? i18n.tr("Name") : i18n.tr("No scores") | ||
459 | 42 | font.bold: true | ||
460 | 43 | } | ||
461 | 44 | Label{ | ||
462 | 45 | color: "white" | ||
463 | 46 | font.bold: true | ||
464 | 47 | anchors.right: parent.right | ||
465 | 48 | text: highscoremodel.count !== 0 ? i18n.tr("Time") + " (" + i18n.tr("Moves") + ")" : "" | ||
466 | 49 | } | ||
467 | 50 | |||
468 | 51 | Repeater{ | ||
469 | 52 | model: highscoremodel | ||
470 | 53 | |||
471 | 54 | delegate: Text{ | ||
472 | 55 | Label{ | ||
473 | 56 | anchors.left: parent.left | ||
474 | 57 | text: name | ||
475 | 58 | color: "white" | ||
476 | 59 | } | ||
477 | 60 | Label{ | ||
478 | 61 | anchors.right: parent.right | ||
479 | 62 | color: "white" | ||
480 | 63 | font.bold: true | ||
481 | 64 | text: time.toFixed(1) + " ("+ moves + ")"; | ||
482 | 65 | } | ||
483 | 66 | } | ||
484 | 67 | } | ||
485 | 68 | } | ||
486 | 69 | } | ||
487 | 0 | 70 | ||
488 | === removed file 'qml/components/SettingsDialog.qml' | |||
489 | --- qml/components/SettingsDialog.qml 2014-02-19 20:31:25 +0000 | |||
490 | +++ qml/components/SettingsDialog.qml 1970-01-01 00:00:00 +0000 | |||
491 | @@ -1,64 +0,0 @@ | |||
492 | 1 | import QtQuick 2.0 | ||
493 | 2 | import Ubuntu.Components 0.1 | ||
494 | 3 | import Ubuntu.Components.Popups 0.1 | ||
495 | 4 | import Ubuntu.Components.ListItems 0.1 as ListItem | ||
496 | 5 | |||
497 | 6 | Component { | ||
498 | 7 | id: settingsdialog | ||
499 | 8 | |||
500 | 9 | Dialog { | ||
501 | 10 | id: settingsdialogue | ||
502 | 11 | title: i18n.tr("Settings") | ||
503 | 12 | |||
504 | 13 | property int initialIndex; | ||
505 | 14 | |||
506 | 15 | Item{ | ||
507 | 16 | height: childrenRect.height | ||
508 | 17 | Label{ | ||
509 | 18 | text: i18n.tr("Glowing wires") | ||
510 | 19 | } | ||
511 | 20 | Switch{ | ||
512 | 21 | id: glowingchecker | ||
513 | 22 | anchors.right: parent.right | ||
514 | 23 | checked: settingsmanager.glowing | ||
515 | 24 | onCheckedChanged: settingsmanager.glowing = checked; | ||
516 | 25 | } | ||
517 | 26 | } | ||
518 | 27 | |||
519 | 28 | Item{ | ||
520 | 29 | height: childrenRect.height | ||
521 | 30 | Label{ | ||
522 | 31 | text: i18n.tr("Rotations") | ||
523 | 32 | } | ||
524 | 33 | Switch{ | ||
525 | 34 | id: rotationchecker | ||
526 | 35 | anchors.right: parent.right | ||
527 | 36 | checked: settingsmanager.rotation | ||
528 | 37 | onCheckedChanged: settingsmanager.rotation = checked; | ||
529 | 38 | } | ||
530 | 39 | } | ||
531 | 40 | |||
532 | 41 | OptionSelector { | ||
533 | 42 | id: difficultyselector | ||
534 | 43 | text: i18n.tr("Difficulty") | ||
535 | 44 | model: settingsmanager.difficulty_strings | ||
536 | 45 | selectedIndex: settingsmanager.difficulty_index | ||
537 | 46 | |||
538 | 47 | Component.onCompleted: settingsdialogue.initialIndex = selectedIndex; | ||
539 | 48 | } | ||
540 | 49 | |||
541 | 50 | Button { | ||
542 | 51 | text: i18n.tr("Close") | ||
543 | 52 | onClicked: { | ||
544 | 53 | if(difficultyselector.selectedIndex !== settingsdialogue.initialIndex){ | ||
545 | 54 | settingsmanager.difficulty_index = difficultyselector.selectedIndex; | ||
546 | 55 | |||
547 | 56 | var params = settingsmanager.getDifficultyParams(); | ||
548 | 57 | logic.newGame(params[0], params[1], params[2], params[3]); | ||
549 | 58 | } | ||
550 | 59 | |||
551 | 60 | PopupUtils.close(settingsdialogue); | ||
552 | 61 | } | ||
553 | 62 | } | ||
554 | 63 | } | ||
555 | 64 | } | ||
556 | 65 | 0 | ||
557 | === added file 'qml/components/SettingsPage.qml' | |||
558 | --- qml/components/SettingsPage.qml 1970-01-01 00:00:00 +0000 | |||
559 | +++ qml/components/SettingsPage.qml 2015-06-03 03:58:13 +0000 | |||
560 | @@ -0,0 +1,44 @@ | |||
561 | 1 | import QtQuick 2.0 | ||
562 | 2 | import Ubuntu.Components 1.1 | ||
563 | 3 | |||
564 | 4 | Page { | ||
565 | 5 | title: i18n.tr("Settings") | ||
566 | 6 | |||
567 | 7 | Column { | ||
568 | 8 | anchors.fill: parent | ||
569 | 9 | anchors.margins: units.gu (2) | ||
570 | 10 | spacing: units.gu (2) | ||
571 | 11 | |||
572 | 12 | Row{ | ||
573 | 13 | spacing: units.gu (2) | ||
574 | 14 | Label{ | ||
575 | 15 | text: i18n.tr("Glowing wires") | ||
576 | 16 | } | ||
577 | 17 | Switch{ | ||
578 | 18 | checked: settingsmanager.glowing | ||
579 | 19 | onCheckedChanged: settingsmanager.glowing = checked; | ||
580 | 20 | } | ||
581 | 21 | } | ||
582 | 22 | |||
583 | 23 | Row{ | ||
584 | 24 | spacing: units.gu (2) | ||
585 | 25 | Label{ | ||
586 | 26 | text: i18n.tr("Rotations") | ||
587 | 27 | } | ||
588 | 28 | Switch{ | ||
589 | 29 | checked: settingsmanager.rotation | ||
590 | 30 | onCheckedChanged: settingsmanager.rotation = checked; | ||
591 | 31 | } | ||
592 | 32 | } | ||
593 | 33 | |||
594 | 34 | OptionSelector { | ||
595 | 35 | text: i18n.tr("Difficulty") | ||
596 | 36 | model: settingsmanager.difficulty_strings | ||
597 | 37 | onDelegateClicked: { | ||
598 | 38 | settingsmanager.difficulty_index = index; | ||
599 | 39 | var params = settingsmanager.getDifficultyParams(); | ||
600 | 40 | logic.newGame(params[0], params[1], params[2], params[3]); | ||
601 | 41 | } | ||
602 | 42 | } | ||
603 | 43 | } | ||
604 | 44 | } | ||
605 | 0 | 45 | ||
606 | === modified file 'qml/components/TopBar.qml' | |||
607 | --- qml/components/TopBar.qml 2013-09-15 17:31:59 +0000 | |||
608 | +++ qml/components/TopBar.qml 2015-06-03 03:58:13 +0000 | |||
609 | @@ -1,5 +1,5 @@ | |||
610 | 1 | import QtQuick 2.0 | 1 | import QtQuick 2.0 |
612 | 2 | import Ubuntu.Components 0.1 | 2 | import Ubuntu.Components 1.1 |
613 | 3 | 3 | ||
614 | 4 | Rectangle{ | 4 | Rectangle{ |
615 | 5 | id: statsbar | 5 | id: statsbar |
616 | 6 | 6 | ||
617 | === removed file 'qml/imgs/png/edit.png' | |||
618 | 7 | Binary files qml/imgs/png/edit.png 2013-09-15 17:31:59 +0000 and qml/imgs/png/edit.png 1970-01-01 00:00:00 +0000 differ | 7 | Binary files qml/imgs/png/edit.png 2013-09-15 17:31:59 +0000 and qml/imgs/png/edit.png 1970-01-01 00:00:00 +0000 differ |
619 | === removed file 'qml/imgs/png/reload.png' | |||
620 | 8 | Binary files qml/imgs/png/reload.png 2013-09-15 17:31:59 +0000 and qml/imgs/png/reload.png 1970-01-01 00:00:00 +0000 differ | 8 | Binary files qml/imgs/png/reload.png 2013-09-15 17:31:59 +0000 and qml/imgs/png/reload.png 1970-01-01 00:00:00 +0000 differ |
621 | === removed file 'qml/imgs/png/ubuntuNetwalkicon.png' | |||
622 | 9 | Binary files qml/imgs/png/ubuntuNetwalkicon.png 2013-09-15 17:31:59 +0000 and qml/imgs/png/ubuntuNetwalkicon.png 1970-01-01 00:00:00 +0000 differ | 9 | Binary files qml/imgs/png/ubuntuNetwalkicon.png 2013-09-15 17:31:59 +0000 and qml/imgs/png/ubuntuNetwalkicon.png 1970-01-01 00:00:00 +0000 differ |
Thank you very much Robert. This has been on my TODO list for a very long time and I'm extremely glad someone took care of it. Cheers!