From 83b9f924fa2fe1880a0645bf601397289cdb1253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Karnok?= Date: Fri, 4 Feb 2022 09:17:59 +0100 Subject: [PATCH] Production Screen add/remove multipliers via SHIFT, tooltips --- checkstyle.xml | 1 + data/de/labels.xml | 12 +++++- data/en/labels.xml | 12 +++++- data/es/labels.xml | 12 +++++- data/fr/labels.xml | 12 +++++- data/hu/labels.xml | 12 +++++- data/ru/labels.xml | 12 +++++- open-ig-config.xml | 2 +- src/hu/openig/GameWindow.java | 2 +- src/hu/openig/mechanics/ResearchPlanner.java | 2 +- .../screen/items/CustomBalanceScreen.java | 11 +++-- src/hu/openig/screen/items/ProfileScreen.java | 2 +- .../items/ResearchProductionScreen.java | 43 +++++++++++-------- src/hu/openig/screen/items/StarmapScreen.java | 2 +- src/hu/openig/screen/items/TestScreen.java | 2 +- 15 files changed, 101 insertions(+), 38 deletions(-) diff --git a/checkstyle.xml b/checkstyle.xml index a514bb829..7802843d7 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -173,6 +173,7 @@ + diff --git a/data/de/labels.xml b/data/de/labels.xml index 65757530a..0aa7063b3 100644 --- a/data/de/labels.xml +++ b/data/de/labels.xml @@ -2957,8 +2957,8 @@ Kein Technologie ausgewählt Kosten: %,d cr Inventar: %,d - Produktionszahl um eins reduzieren.[n]Halte [c=FFFFFFFF]SHIFT[/c] um sie mit 10 zu reduzieren. - Produktionszahl um eins erhöhen.[n]Halte [c=FFFFFFFF]SHIFT[/c] um sie mit 10 zu reduzieren. + Produktionszahl um eins reduzieren.[n]Halte [c=FFFFFFFF]SHIFT[/c] um sie mit 10 zu reduzieren.[n]Halte [c=FFFFFFFF]CTRL+SHIFT[/c] um sie mit 100 zu reduzieren. + Produktionszahl um eins erhöhen.[n]Halte [c=FFFFFFFF]SHIFT[/c] um sie mit 10 zu reduzieren.[n]Halte [c=FFFFFFFF]CTRL+SHIFT[/c] um sie mit 100 zu reduzieren. Produktion beenden. Produktionspriorität um 5 erhöhen.[n]Die minimale Priorität ist 0, dabei ist die Produktion pausiert. Die maximale Priorität ist 100. Produktionspriorität um 5 reduzieren.[n]Die minimale Priorität ist 0, dabei ist die Produktion pausiert. Die maximale Priorität ist 100. @@ -3313,6 +3313,8 @@ Problems Lab Click to sell 1 unit from the inventory[n]Hold [c=FFFFFFFF]SHIFT[/c] while clicking to sell 10 units.[n]Hold [c=FFFFFFFF]CTRL+SHIFT[/c] while clicking to sell 100 units. + Click to produce 10 more units[n]Hold [c=FFFFFFFF]SHIFT[/c] while clicking add 100 more units. + Click to produce 10 less units[n]Hold [c=FFFFFFFF]SHIFT[/c] while clicking to remove 100 units. Fire target specific rockets/bombs only Accept Decline @@ -3651,6 +3653,12 @@ At most one morale building of a type can be built. Original Open-IG mode. Every additional morale building does full contribution with no upper limit. Custom Balance Settings + Hold [c=FFFFFFFF]SHIFT[/c] to increase by 250.000 cr. + Hold [c=FFFFFFFF]SHIFT[/c] to decrease by 250.000 cr. + Hold [c=FFFFFFFF]SHIFT[/c] to increase by 10%. + Hold [c=FFFFFFFF]SHIFT[/c] to decrease by 10%. + Hold [c=FFFFFFFF]SHIFT[/c] to increase by 0.5 points/day. + Hold [c=FFFFFFFF]SHIFT[/c] to decrease by 0.5 points/day. Toggle Pavement Mode (pave over large surface features)[n]Shortcut: [c=FFFFFFFF]P[/c][n]Price: 5000 cr per cell Settle in colonists from another planet (opens dialog) Move colonists to another planet (opens dialog) diff --git a/data/en/labels.xml b/data/en/labels.xml index b3cda6220..4ac58dac3 100644 --- a/data/en/labels.xml +++ b/data/en/labels.xml @@ -2841,8 +2841,8 @@ No technology selected Cost: %,d cr Inventory: %,d - Remove one unit of production.[n]Hold the [c=FFFFFFFF]SHIFT[/c] key to remove 10 units. - Add one unit of production.[n]Hold the [c=FFFFFFFF]SHIFT[/c] key to add 10 units. + Remove one unit of production.[n]Hold the [c=FFFFFFFF]SHIFT[/c] key to remove 10 units.[n]Hold the [c=FFFFFFFF]CTRL+SHIFT[/c] keys to remove 100 units. + Add one unit of production.[n]Hold the [c=FFFFFFFF]SHIFT[/c] key to add 10 units.[n]Hold the [c=FFFFFFFF]CTRL+SHIFT[/c] keys to add 100 units. Remove from production. Increase the production priority by 5 points.[n]The minimum priority is 0, which pauses the production. The maximum priority is 100. Decrease the production priority by 5 points.[n]The minimum priority is 0, which pauses the production. The maximum priority is 100. @@ -3277,6 +3277,8 @@ Problems Lab Click to sell 1 unit from the inventory[n]Hold [c=FFFFFFFF]SHIFT[/c] while clicking to sell 10 units.[n]Hold [c=FFFFFFFF]CTRL+SHIFT[/c] while clicking to sell 100 units. + Click to produce 10 more units[n]Hold [c=FFFFFFFF]SHIFT[/c] while clicking add 100 more units. + Click to produce 10 less units[n]Hold [c=FFFFFFFF]SHIFT[/c] while clicking to remove 100 units. Fire target specific rockets/bombs only Accept Decline @@ -3618,6 +3620,12 @@ At most one morale building of a type can be built. Original Open-IG mode. Every additional morale building does full contribution with no upper limit. Custom Balance Settings + Hold [c=FFFFFFFF]SHIFT[/c] to increase by 250.000 cr. + Hold [c=FFFFFFFF]SHIFT[/c] to decrease by 250.000 cr. + Hold [c=FFFFFFFF]SHIFT[/c] to increase by 10%. + Hold [c=FFFFFFFF]SHIFT[/c] to decrease by 10%. + Hold [c=FFFFFFFF]SHIFT[/c] to increase by 0.5 points/day. + Hold [c=FFFFFFFF]SHIFT[/c] to decrease by 0.5 points/day. Toggle Pavement Mode (pave over large surface features)[n]Shortcut: [c=FFFFFFFF]P[/c][n]Price: 5000 cr per cell Settle in colonists from another planet (opens dialog) Move colonists to another planet (opens dialog) diff --git a/data/es/labels.xml b/data/es/labels.xml index adb8c0003..fbf348521 100644 --- a/data/es/labels.xml +++ b/data/es/labels.xml @@ -2620,7 +2620,7 @@ An inspiring piece of poetry is of more importance than the most powerful weapon. We would be honored to fight along the Garthogs against the other pathetic races. Admiral, please consider the possibility of making peace between the two nations. - Add one unit of production.[n]Hold the [c=FFFFFFFF]SHIFT[/c] key to add 10 units. + Add one unit of production.[n]Hold the [c=FFFFFFFF]SHIFT[/c] key to add 10 units.[n]Hold the [c=FFFFFFFF]CTRL+SHIFT[/c] key to add 100 units. Debug mode allows more traits to be selected than the regular points would allow. You have crushed our people. We will surrender to save what is left of our nation. The Free Nations Society offers the Empire two choices: surrender or annihilation. @@ -2691,7 +2691,7 @@ We offer you the chance to share in our glory and postpone your inevitable destruction. The Empire will heap rewards upon you if relations were to improve between our nations. Resistance is still high against Earthlings. I'm not sure such agreement could be done. - Remove one unit of production.[n]Hold the [c=FFFFFFFF]SHIFT[/c] key to remove 10 units. + Remove one unit of production.[n]Hold the [c=FFFFFFFF]SHIFT[/c] key to remove 10 units.[n]Hold the [c=FFFFFFFF]CTRL+SHIFT[/c] keys to remove 100 units. The strongest destroyer of the Garthog with support for the best equipment and rockets. The Free Nations Society will not be party to spreading the Empire's totalitarian reign. At this point certain unfortunate fiscal laws prevent us from accepting your investment. @@ -3215,6 +3215,8 @@ The Shocker ECM is an active countermeasures system. Using lasers, radio burst beams gravitic pulse fields and neutrino emitters it confuses and diverts missile attacks. Carrying a dual twin laser weapons load the Hammerhead is an incremental improvement on the Valkyrie. It also has a new shield design with high capacity field inductors. Click to sell 1 unit from the inventory[n]Hold [c=FFFFFFFF]SHIFT[/c] while clicking to sell 10 units.[n]Hold [c=FFFFFFFF]CTRL+SHIFT[/c] while clicking to sell 100 units. + Click to produce 10 more units[n]Hold [c=FFFFFFFF]SHIFT[/c] while clicking add 100 more units. + Click to produce 10 less units[n]Hold [c=FFFFFFFF]SHIFT[/c] while clicking to remove 100 units. Only a fool wakes a sleeping Hunting Vrore! The Morgath Confederate will not be devoured along with your Empire. Nature has no sympathy for the weaker side of a conflict. Quick production panel[n][c=FFFFFFFF]Left mouse button[/c]: show or hide panel[n][c=FFFFFFFF]Right mouse button[/c]: production screen[n]Panel shortcut: [c=FFFFFFFF]C[/c] Prefab housing is the cheapest low capacity housing available for your colonists. It comes in four exciting designer interior colors: puce, aquamarine, chiffon, and plaid. @@ -3571,6 +3573,12 @@ At most one morale building of a type can be built. Original Open-IG mode. Every additional morale building does full contribution with no upper limit. Custom Balance Settings + Hold [c=FFFFFFFF]SHIFT[/c] to increase by 250.000 cr. + Hold [c=FFFFFFFF]SHIFT[/c] to decrease by 250.000 cr. + Hold [c=FFFFFFFF]SHIFT[/c] to increase by 10%. + Hold [c=FFFFFFFF]SHIFT[/c] to decrease by 10%. + Hold [c=FFFFFFFF]SHIFT[/c] to increase by 0.5 points/day. + Hold [c=FFFFFFFF]SHIFT[/c] to decrease by 0.5 points/day. Toggle Pavement Mode (pave over large surface features)[n]Shortcut: [c=FFFFFFFF]P[/c][n]Price: 5000 cr per cell Settle in colonists from another planet (opens dialog) Move colonists to another planet (opens dialog) diff --git a/data/fr/labels.xml b/data/fr/labels.xml index 2b77e6e45..c3319d044 100644 --- a/data/fr/labels.xml +++ b/data/fr/labels.xml @@ -2466,11 +2466,13 @@ Attention, vous n'avez pas d'usine d'armes! Increase the production priority by 5 points.[n]The minimum priority is 0, which pauses the production. The maximum priority is 100. Usine orbitale - Remove one unit of production.[n]Hold the [c=FFFFFFFF]SHIFT[/c] key to remove 10 units. - Add one unit of production.[n]Hold the [c=FFFFFFFF]SHIFT[/c] key to add 10 units. + Remove one unit of production.[n]Hold the [c=FFFFFFFF]SHIFT[/c] key to remove 10 units.[n]Hold the [c=FFFFFFFF]CTRL+SHIFT[/c] keys to remove 100 units. + Add one unit of production.[n]Hold the [c=FFFFFFFF]SHIFT[/c] key to add 10 units.[n]Hold the [c=FFFFFFFF]CTRL+SHIFT[/c] keys to add 100 units. Pause all production activities. Resume all production activities. Maintenez [c=FFFFFFFF]MAJ[/c] pour vendre par 10 unités.[n]Maintenez [c=FFFFFFFF]CTRL+MAJ[/c] pour vendre par 100 unités. + Click to produce 10 more units[n]Hold [c=FFFFFFFF]SHIFT[/c] while clicking add 100 more units. + Click to produce 10 less units[n]Hold [c=FFFFFFFF]SHIFT[/c] while clicking to remove 100 units. Profil: Retour Nouveau profil : @@ -3580,6 +3582,12 @@ At most one morale building of a type can be built. Original Open-IG mode. Every additional morale building does full contribution with no upper limit. Custom Balance Settings + Hold [c=FFFFFFFF]SHIFT[/c] to increase by 250.000 cr. + Hold [c=FFFFFFFF]SHIFT[/c] to decrease by 250.000 cr. + Hold [c=FFFFFFFF]SHIFT[/c] to increase by 10%. + Hold [c=FFFFFFFF]SHIFT[/c] to decrease by 10%. + Hold [c=FFFFFFFF]SHIFT[/c] to increase by 0.5 points/day. + Hold [c=FFFFFFFF]SHIFT[/c] to decrease by 0.5 points/day. Toggle Pavement Mode (pave over large surface features)[n]Shortcut: [c=FFFFFFFF]P[/c][n]Price: 5000 cr per cell Settle in colonists from another planet (opens dialog) Move colonists to another planet (opens dialog) diff --git a/data/hu/labels.xml b/data/hu/labels.xml index 22db50a5c..cdcb574e1 100644 --- a/data/hu/labels.xml +++ b/data/hu/labels.xml @@ -2887,8 +2887,8 @@ Nincs technológia kiválasztva. Költség: %,d cr Készlet: %,d - A gyártandó mennyiség csökkentése eggyel.[n]A [c=FFFFFFFF]SHIFT[/c] nyomva tartásával tízzel csökkent. - A gyártandó mennyiség növelése eggyel.[n]A [c=FFFFFFFF]SHIFT[/c] nyomva tartásával tízzel növel. + A gyártandó mennyiség csökkentése eggyel.[n]A [c=FFFFFFFF]SHIFT[/c] nyomva tartásával tízzel csökkent.[n]A [c=FFFFFFFF]CTRL+SHIFT[/c] nyomva tartásával százzal csökkent. + A gyártandó mennyiség növelése eggyel.[n]A [c=FFFFFFFF]SHIFT[/c] nyomva tartásával tízzel növel.[n]A [c=FFFFFFFF]CTRL+SHIFT[/c] nyomva tartásával százzal növel. A gyártás kivétele. A gyártás fontosságának növelése 5 ponttal.[n]A minimális prioritás 0, ami szünetelteti a gyártást. A maximális prioritás 100. A gyártás fontosságának csökkentése 5 ponttal.[n]A minimális prioritás 0, ami szünetelteti a gyártást. A maximális prioritás 100. @@ -3312,6 +3312,8 @@ Kutatókp. Problémák Kattints 1 egység készletből történő eladásához[n]Tartsd lenyomva a [c=FFFFFFFF]SHIFT[/c] billentyűt 10 egység eladásához.[n]Tartsd lenyomva a [c=FFFFFFFF]CTRL+SHIFT[/c] billentyűket 100 egység eladásához. + Kattints 10 további egység gyártásához[n]Tartsd lenyomva a [c=FFFFFFFF]SHIFT[/c] billentyűt 100 további egység gyártásához. + Kattints 10-zel kevesebb egység gyártásához[n]Tartsd lenyomva a [c=FFFFFFFF]SHIFT[/c] billentyűt 100-zal kevesebb egység gyártásához. Csak a célnak megfelelő rakéta/bomba kilövése Elfogad Visszautasít @@ -3650,6 +3652,12 @@ Minden egyes új épület fele annyira járul hozzá a morálhoz, mint a korábbi épület, így maximum dupla bónusz érhető el típusonként. Aszimptotikus Egyedi nehézség-beállítások + A [c=FFFFFFFF]SHIFT[/c] billentyű nyomva tartása mellett 250.000 kredittel nő. + A [c=FFFFFFFF]SHIFT[/c] billentyű nyomva tartása mellett 250.000 kredittel csökken. + A [c=FFFFFFFF]SHIFT[/c] billentyű nyomva tartása mellett 10%-kal nő. + A [c=FFFFFFFF]SHIFT[/c] billentyű nyomva tartása mellett 10%-kal csökken. + A [c=FFFFFFFF]SHIFT[/c] billentyű nyomva tartása mellett 0.5 pont/nappal nő. + A [c=FFFFFFFF]SHIFT[/c] billentyű nyomva tartása mellett 0.5 pont/nappal csökken. Felszíni formációk lefedése mód váltás[n]Gyorsbillentyű: [c=FFFFFFFF]P[/c][n]Egységár: 5000 cr cellánként Lakosság betelepítése egy másik bolygóról (dialógus nyílik) Lakosság kitelepítése egy másik bolygóra (dialógus nyílik) diff --git a/data/ru/labels.xml b/data/ru/labels.xml index 8e39c6e3e..f49bf1f91 100644 --- a/data/ru/labels.xml +++ b/data/ru/labels.xml @@ -2287,8 +2287,8 @@ Warning, you don't have weapons factory! Increase the production priority by 5 points.[n]The minimum priority is 0, which pauses the production. The maximum priority is 100. Orbital Factory - Remove one unit of production.[n]Hold the [c=FFFFFFFF]SHIFT[/c] key to remove 10 units. - Add one unit of production.[n]Hold the [c=FFFFFFFF]SHIFT[/c] key to add 10 units. + Remove one unit of production.[n]Hold the [c=FFFFFFFF]SHIFT[/c] key to remove 10 units.[n]Hold the [c=FFFFFFFF]CTRL+SHIFT[/c] keys to remove 100 units. + Add one unit of production.[n]Hold the [c=FFFFFFFF]SHIFT[/c] key to add 10 units.[n]Hold the [c=FFFFFFFF]CTRL+SHIFT[/c] keys to add 100 units. Pause all production activities. Resume all production activities. Профиль: @@ -3296,6 +3296,8 @@ Problems Lab Click to sell 1 unit from the inventory[n]Hold [c=FFFFFFFF]SHIFT[/c] while clicking to sell 10 units.[n]Hold [c=FFFFFFFF]CTRL+SHIFT[/c] while clicking to sell 100 units. + Click to produce 10 more units[n]Hold [c=FFFFFFFF]SHIFT[/c] while clicking add 100 more units. + Click to produce 10 less units[n]Hold [c=FFFFFFFF]SHIFT[/c] while clicking to remove 100 units. Fire target specific rockets/bombs only Accept Decline @@ -3634,6 +3636,12 @@ At most one morale building of a type can be built. Original Open-IG mode. Every additional morale building does full contribution with no upper limit. Custom Balance Settings + Hold [c=FFFFFFFF]SHIFT[/c] to increase by 250.000 cr. + Hold [c=FFFFFFFF]SHIFT[/c] to decrease by 250.000 cr. + Hold [c=FFFFFFFF]SHIFT[/c] to increase by 10%. + Hold [c=FFFFFFFF]SHIFT[/c] to decrease by 10%. + Hold [c=FFFFFFFF]SHIFT[/c] to increase by 0.5 points/day. + Hold [c=FFFFFFFF]SHIFT[/c] to decrease by 0.5 points/day. Toggle Pavement Mode (pave over large surface features)[n]Shortcut: [c=FFFFFFFF]P[/c][n]Price: 5000 cr per cell Settle in colonists from another planet (opens dialog) Move colonists to another planet (opens dialog) diff --git a/open-ig-config.xml b/open-ig-config.xml index 24dd7bdd9..5c81a93ad 100644 --- a/open-ig-config.xml +++ b/open-ig-config.xml @@ -13,7 +13,7 @@ 0 0 false -746 +822 true true 10 diff --git a/src/hu/openig/GameWindow.java b/src/hu/openig/GameWindow.java index f045f79f3..dfd236bf6 100644 --- a/src/hu/openig/GameWindow.java +++ b/src/hu/openig/GameWindow.java @@ -2234,7 +2234,7 @@ protected void renderTooltip(Graphics2D g2) { if (x0 + lbl.width + 6 > getInnerWidth()) { x0 = getInnerWidth() - lbl.width - 6; } - if (y0 + 20 > getInnerHeight()) { + if (y0 + lbl.height + 6 > getInnerHeight()) { y0 = tooltipHelper.y - lbl.height - 6; } g2.fillRect(x0, y0, lbl.width + 6, lbl.height + 6); diff --git a/src/hu/openig/mechanics/ResearchPlanner.java b/src/hu/openig/mechanics/ResearchPlanner.java index 413c45f43..16287960f 100644 --- a/src/hu/openig/mechanics/ResearchPlanner.java +++ b/src/hu/openig/mechanics/ResearchPlanner.java @@ -338,7 +338,7 @@ class CompareFromMap implements Comparator { * Constructor. * @param map the backing map to use */ - public CompareFromMap(Map map) { + CompareFromMap(Map map) { this.map = map; } @Override diff --git a/src/hu/openig/screen/items/CustomBalanceScreen.java b/src/hu/openig/screen/items/CustomBalanceScreen.java index 497b32419..d85eafc25 100644 --- a/src/hu/openig/screen/items/CustomBalanceScreen.java +++ b/src/hu/openig/screen/items/CustomBalanceScreen.java @@ -25,9 +25,7 @@ public class CustomBalanceScreen extends ScreenBase { /** The panel base rectangle. */ final Rectangle base = new Rectangle(0, 0, 640, 400); - /** - * The record for the values being edited. - */ + /** The record for the values being edited. */ final CustomBalanceSettings settings = new CustomBalanceSettings(); /** * The action to invoke once the user has chosen the traits. @@ -187,6 +185,9 @@ public void invoke() { } }; + next.tooltip(get("custombalance.bonusmoney.plus.tooltip")); + prev.tooltip(get("custombalance.bonusmoney.minus.tooltip")); + bonusMoneySpinner = new UISpinner(14, prev, next, commons.text()); bonusMoneySpinner.getValue = new Func1() { @Override @@ -231,6 +232,8 @@ public void invoke() { doRepaint(); } }; + next.tooltip(get("custombalance.bonusproduction.plus.tooltip")); + prev.tooltip(get("custombalance.bonusproduction.minus.tooltip")); bonusProductionSpinner = new UISpinner(14, prev, next, commons.text()); bonusProductionSpinner.getValue = new Func1() { @@ -277,6 +280,8 @@ public void invoke() { doRepaint(); } }; + next.tooltip(get("custombalance.deterioration.plus.tooltip")); + prev.tooltip(get("custombalance.deterioration.minus.tooltip")); deteriorationSpinner = new UISpinner(14, prev, next, commons.text()); deteriorationSpinner.getValue = new Func1() { diff --git a/src/hu/openig/screen/items/ProfileScreen.java b/src/hu/openig/screen/items/ProfileScreen.java index c449aa949..8e4fda7dc 100644 --- a/src/hu/openig/screen/items/ProfileScreen.java +++ b/src/hu/openig/screen/items/ProfileScreen.java @@ -284,7 +284,7 @@ class ProfileLabel extends UILabel { * Constructor, initializes the profile name. * @param name the profile name */ - public ProfileLabel(String name) { + ProfileLabel(String name) { super(name, 14, commons.text()); this.name = name; } diff --git a/src/hu/openig/screen/items/ResearchProductionScreen.java b/src/hu/openig/screen/items/ResearchProductionScreen.java index 18914952c..61943868e 100644 --- a/src/hu/openig/screen/items/ResearchProductionScreen.java +++ b/src/hu/openig/screen/items/ResearchProductionScreen.java @@ -62,7 +62,6 @@ */ public class ResearchProductionScreen extends ScreenBase implements ResearchProductionAnimation { /** - * The annotation to indicate which UI elements should by default * be visible on the screen. Mark only uncommon elements. * @author akarnokd, Mar 19, 2011 @@ -104,7 +103,7 @@ class ProductionLine extends UIContainer { /** Was the shift pressed? */ boolean shiftDown; /** Initialize the inner fields. */ - public ProductionLine() { + ProductionLine() { base = new UIImage(commons.research().productionLine); base.z = -1; width = base.width; @@ -126,8 +125,12 @@ public void invoke() { public void invoke() { buttonSound(SoundType.CLICK_HIGH_2); int cnt = -1; - if (shiftDown) { - cnt *= 10; + if (lessBuild.lastEvent != null && lessBuild.lastEvent.has(Modifier.SHIFT)) { + if (lessBuild.lastEvent.has(Modifier.CTRL)) { + cnt *= 100; + } else { + cnt *= 10; + } } doChangeCount(cnt); } @@ -148,8 +151,12 @@ public void invoke() { public void invoke() { buttonSound(SoundType.CLICK_HIGH_2); int cnt = 1; - if (shiftDown) { - cnt *= 10; + if (moreBuild.lastEvent != null && moreBuild.lastEvent.has(Modifier.SHIFT)) { + if (moreBuild.lastEvent.has(Modifier.CTRL)) { + cnt *= 100; + } else { + cnt *= 10; + } } doChangeCount(cnt); } @@ -702,9 +709,7 @@ public void draw(Graphics2D g2) { g2.setTransform(savea); } /** - * Paint the research arrow for the actualSubCategory. - * @param g2 the graphics context */ void drawResearchArrow(Graphics2D g2) { @@ -735,7 +740,6 @@ ResearchMainCategory getCurrentMainCategory() { } /** * Returns the coloring for the lab amounts. - * @param total the total lab amount * @param active the active lab amount * @param required the required lab amount @@ -1071,9 +1075,14 @@ public void invoke() { @Override public void invoke() { buttonSound(SoundType.CLICK_HIGH_2); - doChangeCount(-10); + if (removeTen.lastEvent != null && removeTen.lastEvent.has(Modifier.SHIFT)) { + doChangeCount(-100); + } else { + doChangeCount(-10); + } } }; + removeTen.tooltip(get("production.removeTen.tooltip")); removeOne = new UIImageButton(commons.research().minusOne); removeOne.setDisabledPattern(commons.common().disabledPattern); removeOne.setHoldDelay(200); @@ -1101,9 +1110,15 @@ public void invoke() { @Override public void invoke() { buttonSound(SoundType.CLICK_HIGH_2); - doChangeCount(10); + if (addTen.lastEvent != null && addTen.lastEvent.has(Modifier.SHIFT)) { + doChangeCount(100); + } else { + doChangeCount(10); + } } }; + addTen.tooltip(get("production.addTen.tooltip")); + sell = new UIImageButton(commons.research().sell); sell.setDisabledPattern(commons.common().disabledPattern); sell.setHoldDelay(200); @@ -1573,10 +1588,8 @@ void setUIVisibility() { } } /** - * Display values based on the current technology. * @param ps the all planet statistics. - */ public void update(PlanetStatistics ps) { final ResearchType rt = research(); @@ -1792,7 +1805,6 @@ void updateActive(PlanetStatistics ps) { } if (rt != null && mode == Screens.RESEARCH && rs != null) { - activeCivilLabValue.color(labColor(ps.labs.civil, ps.activeLabs.civil, rt.civilLab)); activeMechLabValue.color(labColor(ps.labs.mech, ps.activeLabs.mech, rt.mechLab)); activeCompLabValue.color(labColor(ps.labs.comp, ps.activeLabs.comp, rt.compLab)); @@ -1831,7 +1843,6 @@ void updateActive(PlanetStatistics ps) { void updateProduction(PlanetStatistics ps) { ResearchType rt = research(); needsOrbitalFactory.visible(mode == Screens.PRODUCTION && player().isAvailable(rt) - && rt.has(ResearchType.PARAMETER_NEEDS_ORBITAL_FACTORY) && ps.orbitalFactory == 0); ResearchMainCategory cat = getCurrentMainCategory(); @@ -1949,9 +1960,7 @@ void updateProduction(PlanetStatistics ps) { addButton.visible( mode == Screens.PRODUCTION && player().isAvailable(rt) - && !inProduction - && rt.category.main == cat && !rt.nobuild && productions.size() < 5 diff --git a/src/hu/openig/screen/items/StarmapScreen.java b/src/hu/openig/screen/items/StarmapScreen.java index b0a393bc9..ed0cc1bd2 100644 --- a/src/hu/openig/screen/items/StarmapScreen.java +++ b/src/hu/openig/screen/items/StarmapScreen.java @@ -1182,7 +1182,7 @@ static final class RadarCircle { * @param y the center Y * @param r the radius */ - public RadarCircle(int x, int y, int r) { + RadarCircle(int x, int y, int r) { this.x = x; this.y = y; this.r = r; diff --git a/src/hu/openig/screen/items/TestScreen.java b/src/hu/openig/screen/items/TestScreen.java index 3f9de83c8..ca65b450d 100644 --- a/src/hu/openig/screen/items/TestScreen.java +++ b/src/hu/openig/screen/items/TestScreen.java @@ -186,7 +186,7 @@ static class TestChoice extends UIComponent { * @param q the question * @param a the answer */ - public TestChoice(TestQuestion q, TestAnswer a) { + TestChoice(TestQuestion q, TestAnswer a) { this.question = q; this.answer = a; height = 14;