Skip to content

Commit

Permalink
* Android: huge GUI revamp in base management dialogs.
Browse files Browse the repository at this point in the history
* Replaced most of tiny spinners with big thumb-friendly horizontal spinners.
* Modified dialogs: Research, Production, Market, Transfer, soldiers/pilots list in aircraft management.
* I would like to put Android/PC differences into some kind of config, like minimal list item height,
* however it depends on some hoardcoded values in C code, so feel free to revert my commit if you don't like it.
  • Loading branch information
pelya committed Nov 15, 2012
1 parent e08022c commit 2b4d522
Show file tree
Hide file tree
Showing 18 changed files with 162 additions and 208 deletions.
2 changes: 2 additions & 0 deletions LICENSES
Original file line number Diff line number Diff line change
Expand Up @@ -2618,8 +2618,10 @@ base/pics/buttons/blue3.png | GNU General Public License 2.0 or later
base/pics/buttons/blue3_disabled.png | GNU General Public License 2.0 or later
base/pics/buttons/blue_left.png | GNU General Public License 2.0 or later
base/pics/buttons/blue_left_disabled.png | GNU General Public License 2.0 or later
base/pics/buttons/blue_left_hovered.png | GNU General Public License 2.0 or later
base/pics/buttons/blue_right.png | GNU General Public License 2.0 or later
base/pics/buttons/blue_right_disabled.png | GNU General Public License 2.0 or later
base/pics/buttons/blue_right_hovered.png | GNU General Public License 2.0 or later
base/pics/buttons/large_blue.png | GNU General Public License 2.0 or later
base/pics/buttons/large_blue2.png | GNU General Public License 2.0 or later
base/pics/buttons/large_blue_disabled.png | GNU General Public License 2.0 or later
Expand Down
Binary file modified base/pics/buttons/blue_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified base/pics/buttons/blue_left_disabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added base/pics/buttons/blue_left_hovered.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified base/pics/buttons/blue_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified base/pics/buttons/blue_right_disabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added base/pics/buttons/blue_right_hovered.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions base/ufos/ui/_menu.ufo
Original file line number Diff line number Diff line change
Expand Up @@ -682,3 +682,11 @@ component spinner_blue extends spinner
bottomIcon "ui/spinner_blue_down"
size "15 19"
}

component spinner_horiz extends spinner
{
topIcon "buttons/blue_right"
bottomIcon "buttons/blue_left"
size "80 50"
horizontal true
}
10 changes: 6 additions & 4 deletions base/ufos/ui/aircraft.ufo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

component aircraft_teammember extends panel {
{
size "260 25"
size "260 50"
}

data id {
Expand All @@ -14,16 +14,18 @@ component aircraft_teammember extends panel {
string name {
pos "0 0"
color "0 .78 0 1"
size "230 25"
size "230 50"
contentalign ALIGN_CL
onClick {
cmd "aircraft_soldierlist_select <node:parent.id@integer>;"
}
}

checkbox_green selected {
tooltip "_Add/remove soldier to the team"
pos "230 0"
size "25 25"
pos "210 0"
size "50 50"
padding 17

onChange {
cmd "ui_team_assign_ucn <node:parent.id@integer>; ui_team_fill \"<node:parent.id@string>\"; aircraft_soldierlist_select <node:parent.id@integer>;"
Expand Down
2 changes: 1 addition & 1 deletion base/ufos/ui/aircraft_pilots.ufo
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ window aircraft_pilots extends iaircraft
size "270 283"
color1 "0 0.08 0 1"
color2 "0 0.16 0 1"
lineheight 25
lineheight 50
}
panel soldierlist {
pos "35 460"
Expand Down
2 changes: 1 addition & 1 deletion base/ufos/ui/aircraft_soldiers.ufo
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ window team extends iaircraft
size "270 283"
color1 "0 0.08 0 1"
color2 "0 0.16 0 1"
lineheight 25
lineheight 50
}
panel soldierlist {
pos "35 460"
Expand Down
41 changes: 22 additions & 19 deletions base/ufos/ui/market.ufo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

component cmpMarketItem extends panel {
{
size "425 25"
size "425 50"
onClick {
cmd "ui_market_select <node:this.id@string>;"
}
Expand All @@ -15,7 +15,7 @@ component cmpMarketItem extends panel {

checkbox_blue autosell {
current 0
pos "0 0"
pos "0 17"
size "22 18"

onChange {
Expand All @@ -27,35 +27,38 @@ component cmpMarketItem extends panel {

string name {
color "0 .78 0 1"
contentalign ALIGN_CL
pos "25 0"
size "250 25"
size "250 50"
ghost true
}
string storage {
color "0 .78 0 1"
contentalign ALIGN_CR
pos "280 0"
size "60 25"
pos "235 0"
size "60 50"
ghost true
}
string market {
color "0 .78 0 1"
contentalign ALIGN_CR
pos "370 0"
size "46 25"
pos "375 0"
size "60 50"
ghost true
}
string price {
color "0 .78 0 1"
contentalign ALIGN_CR
pos "432 0"
size "60 25"
pos "442 0"
size "60 50"
ghost true
}

spinner_blue buysell {
spinner_horiz buysell {
tooltip "_Buy and sell item"
pos "346 0"
pos "305 0"
inverted true

onChange {
if ( ( ( <node:parent.storage@string> + <node:parent.market@string> ) + <lastdiff> ) < 1 ) {
*node:root.selected@string = ""
Expand Down Expand Up @@ -155,13 +158,13 @@ window market extends objectinfo {
rows lines {
pos "28 175"
size "530 568"
color1 "0 0.08 0 1"
color2 "0 0.16 0 1"
color1 "0 0.10 0 1"
color2 "0 0.12 0 1"
lineheight 25
}

panel verticalline {
pos "451 175"
pos "470 175"
size "4 565"
bgcolor "0.03 0.42 0.03 1"
}
Expand All @@ -180,22 +183,22 @@ window market extends objectinfo {
string storage_label {
string "_Store"
tooltip "_Number of such items in base"
pos "325 180"
size "60 25"
pos "255 180"
size "70 25"
color "0 .78 0 1"
contentalign ALIGN_CR
}
string market_label {
string "_Market"
tooltip "_Number of such items on the market"
pos "390 180"
size "60 25"
pos "395 180"
size "70 25"
color "0 .78 0 1"
contentalign ALIGN_CR
}
string price {
string "_Price"
pos "462 180"
pos "470 180"
size "60 25"
color "0 .78 0 1"
contentalign ALIGN_CR
Expand Down
54 changes: 28 additions & 26 deletions base/ufos/ui/production.ufo
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ window production
size "530 568"
color1 "0 0.08 0 1"
color2 "0 0.16 0 1"
lineheight 25
lineheight 50
}

panel scroll_bg {
Expand Down Expand Up @@ -228,8 +228,8 @@ window production
{
dataid TEXT_PRODUCTION_LIST
color "0 .78 0 1"
rows "22"
lineheight "25"
rows "11"
lineheight "50"
pos "55 180"
size "250 550"
longlines LONGLINES_PRETTYCHOP
Expand Down Expand Up @@ -258,9 +258,9 @@ window production
color "0 .78 0 1"
contentalign ALIGN_CR
pos "310 180"
rows "22"
rows "11"
size "60 550"
lineheight "25"
lineheight "50"
onClick {
*node:root.prodlist@lineselected = <node:this@lineselected>
*node:root.prodlist_queued@lineselected = <node:this@lineselected>
Expand All @@ -286,8 +286,8 @@ window production
pos "465 180"
size "60 550"
color "0 .78 0 1"
lineheight "25"
rows "22"
lineheight "50"
rows "11"
onClick {
*node:root.prodlist@lineselected = <node:this@lineselected>
*node:root.prodlist_amount@lineselected = <node:this@lineselected>
Expand Down Expand Up @@ -356,44 +356,46 @@ window production

string prod_amount {
string *cvar:mn_production_amount
pos "730 505"
size "40 20"
pos "650 480"
size "40 50"
color "0 .78 0 1"
font "f_small"
contentalign ALIGN_UR
contentalign ALIGN_CR
}

string label_1 {
string "x1"
pos "786 505"
size "24 20"
pos "680 480"
size "24 50"
color "0 .78 0 1"
font "f_small"
contentalign ALIGN_UR
contentalign ALIGN_CR
}

string label_10 {
string "x10"
pos "824 505"
size "36 20"
pos "810 480"
size "36 50"
color "0 .78 0 1"
font "f_small"
contentalign ALIGN_UR
contentalign ALIGN_CR
}

spinner_blue prod_change {
spinner_horiz prod_change {
tooltip "_Change the production amount"
pos "810 505"
pos "710 480"
inverted true
min 1
current *cvar:mn_production_amount
max 1000
delta 1
onChange { cmd "prod_change <lastdiff>;" }
}

spinner_blue prod_change_10 {
spinner_horiz prod_change_10 {
tooltip "_Change the production amount"
pos "860 505"
pos "850 480"
inverted true
min 1
current *cvar:mn_production_amount
max 1000
Expand All @@ -406,7 +408,7 @@ window production
string "_Start this production"
background "ui/button_green_small"
pos "670 480"
size "250 32"
size "250 50"
font "f_small"
color "0 .78 0 1"
onClick { cmd "prod_inc;" }
Expand All @@ -416,9 +418,9 @@ window production
{
tooltip "_Stop production"
icon "icons/bordered_cross"
pos "900 505"
size "16 16"
padding 0
pos "931 480"
size "50 50"
padding 17
onClick { cmd "prod_stop;" }
}

Expand Down Expand Up @@ -501,7 +503,7 @@ window production

panel requirement {
{
pos "610 610"
pos "610 615"
size "346 120"
}

Expand Down Expand Up @@ -542,7 +544,7 @@ window production

panel proddesc {
{
pos "610 528"
pos "610 533"
size "346 80"
layout LAYOUT_BORDER
}
Expand Down
Loading

0 comments on commit 2b4d522

Please sign in to comment.