fixed bar,added item update rate setting

This commit is contained in:
sharlotte
2021-08-08 18:03:08 +09:00
parent c210347528
commit d71a04880f
5 changed files with 7 additions and 2 deletions

View File

@@ -26,6 +26,7 @@ setting.opacitysetting.name = Opacity Setting
setting.infoUiScale.name = Info UI Scaling setting.infoUiScale.name = Info UI Scaling
setting.infoUiScale.description = set scale for info ui on left-side. setting.infoUiScale.description = set scale for info ui on left-side.
setting.coreItemCheckRate.name = Item tap: update rate
setting.pastwave.name = Display Previous Wave setting.pastwave.name = Display Previous Wave
setting.pastwave.description = toggle to shows previous wave on wave info ingame.\nCurrent wave is highlighted with red. setting.pastwave.description = toggle to shows previous wave on wave info ingame.\nCurrent wave is highlighted with red.
setting.emptywave.name = Display Empty Wave setting.emptywave.name = Display Empty Wave

View File

@@ -26,6 +26,7 @@ setting.opacitysetting.name = 투명도 설정
setting.infoUiScale.name = 정보 UI 스케일링 setting.infoUiScale.name = 정보 UI 스케일링
setting.infoUiScale.description = 인게임 좌측 정보 UI의 크기를 설정합니다. setting.infoUiScale.description = 인게임 좌측 정보 UI의 크기를 설정합니다.
setting.coreItemCheckRate.name = 자원 탭: 업데이트 주기
setting.pastwave.name = 이전 단계 표시 setting.pastwave.name = 이전 단계 표시
setting.pastwave.description = 인게임 단계 탭에서 이전 단계도 표시합니다. 현재 단계는 빨간색으로 강조됩니다. setting.pastwave.description = 인게임 단계 탭에서 이전 단계도 표시합니다. 현재 단계는 빨간색으로 강조됩니다.
setting.emptywave.name = 빈 단계 표시 setting.emptywave.name = 빈 단계 표시

View File

@@ -290,6 +290,7 @@ public class SettingS {
*/ */
addGraphicSlideSetting("infoUiScale", 100, 25, 300, 25, s -> s + "%"); addGraphicSlideSetting("infoUiScale", 100, 25, 300, 25, s -> s + "%");
addGraphicSlideSetting("coreItemCheckRate", 60, 6, 180, 6, s -> Strings.fixed(s/60f,1) + "sec");
addGraphicCheckSetting("pastwave", false); addGraphicCheckSetting("pastwave", false);
addGraphicCheckSetting("emptywave", true); addGraphicCheckSetting("emptywave", true);
addGraphicSlideSetting("wavemax", 50, 0, 200, 1, s -> s + "waves"); addGraphicSlideSetting("wavemax", 50, 0, 200, 1, s -> s + "waves");

View File

@@ -13,6 +13,7 @@ import mindustry.ui.*;
import mindustry.world.blocks.storage.*; import mindustry.world.blocks.storage.*;
import static UnitInfo.SVars.modUiScale; import static UnitInfo.SVars.modUiScale;
import static arc.Core.settings;
import static mindustry.Vars.*; import static mindustry.Vars.*;
public class CoresItemsDisplay { public class CoresItemsDisplay {
@@ -74,7 +75,7 @@ public class CoresItemsDisplay {
core = team.core(); core = team.core();
heat += Time.delta; heat += Time.delta;
if(heat >= 60f) { if(heat >= settings.getInt("coreItemCheckRate")) {
heat = 0; heat = 0;
updateItem(team); updateItem(team);
} }

View File

@@ -151,6 +151,7 @@ public class SBar extends Element{
} }
} }
Draw.color(); Draw.color();
Fonts.outline.draw(name, x + width / 2f, y + height / 2f, Color.white, Scl.scl(modUiScale < 1 ? modUiScale : 1), false, Align.center);
Fonts.outline.draw(name, x + width / 2f, y + height * 0.75f, Color.white, Scl.scl(modUiScale < 1 ? modUiScale : 1), false, Align.center);
} }
} }