Merge branch 'master' into crater
# Conflicts: # core/assets/sprites/sprites.atlas # core/assets/sprites/sprites.png # core/assets/sprites/sprites2.png # core/assets/sprites/sprites3.png
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 414 B After Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 402 B |
|
Before Width: | Height: | Size: 292 B After Width: | Height: | Size: 292 B |
|
Before Width: | Height: | Size: 313 B After Width: | Height: | Size: 313 B |
|
Before Width: | Height: | Size: 271 B After Width: | Height: | Size: 271 B |
|
Before Width: | Height: | Size: 297 B After Width: | Height: | Size: 297 B |
|
Before Width: | Height: | Size: 411 B After Width: | Height: | Size: 411 B |
|
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 410 B |
|
Before Width: | Height: | Size: 271 B After Width: | Height: | Size: 271 B |
|
Before Width: | Height: | Size: 303 B After Width: | Height: | Size: 303 B |
|
Before Width: | Height: | Size: 289 B After Width: | Height: | Size: 289 B |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -466,7 +466,7 @@ uncover = Descubrir
|
||||
configure = Configurar carga inicial
|
||||
bannedblocks = Bloques prohibidos
|
||||
addall = Añadir todo
|
||||
configure.locked = [LIGHT_GRAY]Alcanza la oleada {0}\npara configurar la carga inicial.
|
||||
configure.locked = [LIGHT_GRAY]Para configurar la carga inicial: {0}.
|
||||
configure.invalid = La cantidad debe estar entre 0 y {0}.
|
||||
zone.unlocked = [LIGHT_GRAY]{0} desbloqueado.
|
||||
zone.requirement.complete = Oleada {0} alcanzada:\nrequerimientos de la zona {1} cumplidos.
|
||||
@@ -1187,7 +1187,7 @@ block.bridge-conveyor.description = Bloque avanado de transporte. Puede transpor
|
||||
block.phase-conveyor.description = Bloque de transporte avanzado. Usa energía para transportar objetos a otro transportador de fase conectado a través de varias casillas.
|
||||
block.sorter.description = Clasifica objetos. Si un objeto es igual al seleccionado, pasará al frente. Si no, el objeto saldrá por la izquierda y la derecha.
|
||||
block.inverted-sorter.description = Procesa elementos como un clasificador estándar, pero en su lugar pasa elementos seleccionados a los lados.
|
||||
block.router.description = Acepta objetos de una dirección luego los deja equitativamente en hasta 3 direcciones diferentes. Útil para dividir los materiales de una fuente de recursos a múltiples objetivos. /n/n[scarlet]Nunca usar como entrade de producción porque puede tapar con los objetos de salida.[]
|
||||
block.router.description = Acepta objetos de una dirección luego los deja equitativamente en hasta 3 direcciones diferentes. Útil para dividir los materiales de una fuente de recursos a múltiples objetivos. \n\n[scarlet]Nunca usar como entrada de producción porque puede tapar con los objetos de salida.[]
|
||||
block.distributor.description = Un enrutador avanzado que distribuye objetos equitativamente en hasta otras 7 direcciones.
|
||||
block.overflow-gate.description = Un enrutador que solo saca por la izquierda y la derecha si la cinta del frente está llena.
|
||||
block.underflow-gate.description = El opuesto de la compuerda de desborde. Solo dispensa hacia el frente si los lados están bloqueados.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
credits.text = 제작자 [ROYAL]Anuken[] - [SKY]anukendev@gmail.com[] / [scarlet]한국어 번역자[] - [royal]Potion[]
|
||||
credits.text = 제작자 [ROYAL]Anuken[] - [SKY]anukendev@gmail.com[] / [scarlet]한국어 번역자[] [royal]Potion[] ,[royal]Corby-Yun[]
|
||||
credits = 제작자
|
||||
contributors = 번역 및 개발 기여자들
|
||||
discord = Mindustry Discord 에 참여해보세요!
|
||||
@@ -13,9 +13,9 @@ link.google-play.description = Google Play 스토어 정보
|
||||
link.f-droid.description = F-Droid 카탈로그
|
||||
link.wiki.description = 공식 Mindustry 위키
|
||||
link.feathub.description = 기능 아이디어 건의하기
|
||||
linkfail = 링크를 여는 데 실패했습니다!\nURL이 기기의 클립보드에 복사되었습니다.
|
||||
screenshot = 스크린 샷이 {0} 경로에 저장되었습니다.
|
||||
screenshot.invalid = 맵이 너무 커서 스크린 샷을 찍을 메모리가 충분하지 않습니다.
|
||||
linkfail = 링크를 열지 못했습니다!\nURL이 클립보드에 복사되었습니다.
|
||||
screenshot = 스크린 샷이 {0} 에 저장되었습니다.
|
||||
screenshot.invalid = 맵이 너무 커서 메모리 부족해 스크린샷을 못했습니다.
|
||||
gameover = 게임 오버
|
||||
gameover.pvp = [accent]{0}[] 팀이 승리했습니다!
|
||||
highscore = [accent]최고점수 달성!
|
||||
@@ -29,22 +29,22 @@ load.system = 시스템
|
||||
load.mod = 모드
|
||||
load.scripts = 스크립트
|
||||
|
||||
be.update = 새로운 테스트 버전이 출시되었습니다.
|
||||
be.update = 새로운 최신 빌드를 플레이 할 수 있습니다.
|
||||
be.update.confirm = 다운로드 후 게임을 재시작하시겠습니까?
|
||||
be.updating = 업데이트 중...
|
||||
be.ignore = 무시
|
||||
be.noupdates = 새로운 업데이트가 발견되지 않았습니다.
|
||||
be.check = 업데이트 확인
|
||||
be.noupdates = 새로운 업데이트가 없습니다.
|
||||
be.check = 업데이트 확인합니다.
|
||||
|
||||
schematic = 설계도
|
||||
schematic.add = 설계도 저장하기
|
||||
schematics = 설계도 모음
|
||||
schematic.replace = A schematic by that name already exists. Replace it?
|
||||
schematic.exists = A schematic by that name already exists.
|
||||
schematic.replace = 이 설계도 이름이 이미 존재합니다. 바꾸겠습니까?
|
||||
schematic.exists = 이 회로도 이름이 이미 존재합니다.
|
||||
schematic.import = 설계도 불러오기
|
||||
schematic.exportfile = 파일 내보내기
|
||||
schematic.importfile = 파일 불러오기
|
||||
schematic.browseworkshop = 창작마당 탐색
|
||||
schematic.browseworkshop = 창작마당 검색
|
||||
schematic.copy = 클립보드에 복사하기
|
||||
schematic.copy.import = 클립보드에서 붙여넣기
|
||||
schematic.shareworkshop = 창작마당에 공유
|
||||
@@ -52,26 +52,26 @@ schematic.flip = 좌우 뒤집기 : [accent][[{0}][] / 상하 뒤집기 : [accen
|
||||
schematic.saved = 설계도 저장됨.
|
||||
schematic.delete.confirm = 삭제된 설계도는 복구할 수 없습니다. 정말로 삭제하시겠습니까?
|
||||
schematic.rename = 설계도명 변경
|
||||
schematic.info = 크기 : {0}x{1}, 블럭 수 : {2}
|
||||
schematic.info = {0}x{1}크기, {2} 블럭.
|
||||
|
||||
stat.wave = 버틴 단계 수 : [accent]{0}
|
||||
stat.enemiesDestroyed = 파괴한 적 수 : [accent]{0}
|
||||
stat.built = 건설한 건물 수 : [accent]{0}
|
||||
stat.destroyed = 파괴된 건물 수 : [accent]{0}
|
||||
stat.deconstructed = 파괴한 건물 수 : [accent]{0}
|
||||
stat.delivered = 획득한 자원 :
|
||||
stat.playtime = 지역 클리어시간 : [accent] {0}
|
||||
stat.wave = 패배한 웨이브 : [accent]{0}
|
||||
stat.enemiesDestroyed = 부순 적 수 : [accent]{0}
|
||||
stat.built = 지은 건물 수 : [accent]{0}
|
||||
stat.destroyed = 부서진 건물 수 : [accent]{0}
|
||||
stat.deconstructed = 부순 건물 수 : [accent]{0}
|
||||
stat.delivered = 얻은 자원 :
|
||||
stat.playtime = 플레이 타임 : [accent] {0}
|
||||
stat.rank = 최종 점수 : [accent]{0}
|
||||
|
||||
launcheditems = [accent]창고
|
||||
launchinfo = [출격되지 않음][[출격]파랑색으로 표시된 자원들을 획득합니다.
|
||||
launcheditems = [accent]보유 자원
|
||||
launchinfo = [출격되지 않음][[출격]파랑색으로 표시된 자원들을 얻습니다.
|
||||
map.delete = 정말로 "[accent]{0}[]" 맵을 삭제하시겠습니까?
|
||||
level.highscore = 최고 점수 : [accent]{0}
|
||||
level.select = 맵 선택
|
||||
level.mode = 게임 모드 :
|
||||
showagain = 다음 세션에서 이 메세지를 표시하지 않습니다
|
||||
showagain = 다음 세션에 다시 이 메세지를 표시하지 않습니다.
|
||||
coreattack = < 코어가 공격받고 있습니다! >
|
||||
nearpoint = [[ [scarlet]적 생성 구역에서 나가세요[] ]\n적 생성 시 구역 내 건물 및 유닛 파괴
|
||||
nearpoint = [[ [scarlet]낙하 지점 에서 나가세요[] ]\n적 낙하 시 낙하 지점 내 건물 및 유닛 파괴
|
||||
database = 코어 기록보관소
|
||||
savegame = 게임 저장
|
||||
loadgame = 게임 불러오기
|
||||
@@ -97,37 +97,37 @@ uploadingcontent = 컨텐츠 업로드
|
||||
uploadingpreviewfile = 미리보기 파일 업로드
|
||||
committingchanges = 바뀐 점 적용
|
||||
done = 완료
|
||||
feature.unsupported = 당신의 기기는 이 기능을 지원하지 않습니다.
|
||||
feature.unsupported = 이 기기는 이 기능을 지원하지 않습니다.
|
||||
|
||||
mods.alphainfo = 현재의 모드는 첫 번째 시도이며, 그리고[scarlet] 버그가 매우 많음을 명심하십시오[].\n만약 버그를 발견할경우 Mindustry 깃허브 또는 디스코드로 제보해주세요.
|
||||
mods.alphainfo = 현재의 모드는 시험적 기능이며, [scarlet] 버그가 많을 수도 있습니다.[].\n만약 버그를 발견할경우 Mindustry 깃허브 또는 디스코드로 제보해주세요.
|
||||
mods.alpha = [accent](시험적 기능)
|
||||
mods = 모드
|
||||
mods.none = [LIGHT_GRAY]추가한 모드가 없습니다!
|
||||
mods.guide = 모드 가이드
|
||||
mods.none = [LIGHT_GRAY]모드가 없습니다!
|
||||
mods.guide = 모드 제작 가이드
|
||||
mods.report = 문제 신고
|
||||
mods.openfolder = 모드 폴더 열기
|
||||
mod.display = [gray]모드 :[orange] {0}
|
||||
mod.enabled = [blue]활성화
|
||||
mod.disabled = [scarlet]적용 안됨
|
||||
mod.disable = [lightgray]비활성화
|
||||
mod.delete.error = 모드를 삭제할 수 없습니다. 아마도 해당 모드가 사용중인 것 같습니다.
|
||||
mod.requiresversion = [scarlet]게임의 버전이 낮아 모드를 활성화할 수 없습니다!\n[scarlet]요구되는 게임 버전 : [accent]{0}
|
||||
mod.delete.error = 모드를 삭제할 수 없습니다. 게임 밖에서 모드 파일을 사용 중일 수 있습니다.
|
||||
mod.requiresversion = [scarlet]필요한 게임 버전 : [accent]{0}
|
||||
mod.missingdependencies = [scarlet]필요한 모드 : {0}
|
||||
mod.erroredcontent = [scarlet]컨텐츠 오류
|
||||
mod.errors = 모드 설정을 불러오는 중 오류가 발생하였습니다.
|
||||
mod.errors = 내용을 불러오는 중 오류가 발생하였습니다.
|
||||
mod.noerrorplay = [scarlet]모드에 오류가 존재합니다.[] 해당 오류가 발생하는 모드를 비활성화하거나 모드의 오류를 고친 후 플레이가 가능합니다.
|
||||
mod.nowdisabled = [scarlet]모드 '{0}'는 다음의 모드에 의존합니다 : [accent] {1}\n[lightgray]이 모드를 먼저 다운로드해야합니다.\n이 모드는 자동으로 비활성화됩니다.
|
||||
mod.enable = 활성화
|
||||
mod.requiresrestart = 모드 변경사항을 적용하기 위해 게임을 종료합니다.
|
||||
mod.reloadrequired = [scarlet]새로고침 예정됨
|
||||
mod.import = 모드 추가
|
||||
mod.import.github = 깃허브 모드 추가
|
||||
mod.import.github = 깃허브에서 모드 불러오기
|
||||
mod.item.remove = 이것은 모드[accent] '{0}'[]의 자원입니다. 이 자원을 삭제하려면, 이 모드를 제거해야합니다.
|
||||
mod.remove.confirm = 이 모드를 삭제하시겠습니까?
|
||||
mod.author = [LIGHT_GRAY]제작자 : [] {0}
|
||||
mod.missing = 이 세이브파일에는 설치하지 않은 모드 혹은 현재 버전에 속해있지 않은 데이터가 포함되어 있습니다. 이 파일을 불러올 경우 세이브파일의 데이터가 손상될 수 있습니다. 정말로 이 파일을 불러오시겠습니까?\n[lightgray]모드 :\n{0}
|
||||
mod.preview.missing = 창작마당에 당신의 모드를 업로드하기 전에 미리보기 이미지를 먼저 추가해야합니다.\n[accent] preview.png[]라는 이름으로 미리보기 이미지를 당신의 모드 폴더안에 준비한 후 다시 시도해주세요.
|
||||
mod.folder.missing = 창작마당에는 폴더 형태의 모드만 게시할 수 있습니다.\n모드를 폴더 형태로 바꾸려면 파일을 폴더에 압축 해제하고 이전 압축파일을 제거한 후, 게임을 재시작하거나 모드를 다시 로드하십시오.
|
||||
mod.missing = 이 세이브에는 설치하지 않은 모드나 현재 버전에 없는 데이터가 포함되어 있습니다. 세이브가 손상될 수 있습니다. 불러오시겠습니까?\n[lightgray]모드 :\n{0}
|
||||
mod.preview.missing = 창작마당에 모드를 업로드하기 전에 미리보기 이미지를 추가해야합니다.\n[accent] 모드 폴더안에 preview.png[]이름의 미리보기 이미지를 준비한 후 다시 시도해주세요.
|
||||
mod.folder.missing = 창작마당에는 폴더 형태의 모드만 게시할 수 있습니다.\n모드를 폴더 형태로 바꾸려면 모드 파일을 모드 폴더에 압축 풀고 이전 모드 파일을 삭제 후, 게임을 재시작하거나 모드를 다시 로드하십시오.
|
||||
mod.scripts.unsupported = 당신의 기기는 자바스크립트를 지원하지 않습니다. 모드의 일부 기능이 작동하지 않을 수 있습니다.
|
||||
|
||||
about.button = 정보
|
||||
@@ -140,18 +140,18 @@ techtree = 연구 기록
|
||||
research.list = [LIGHT_GRAY]연구 :
|
||||
research = 연구
|
||||
researched = [LIGHT_GRAY]{0}연구 완료.
|
||||
players = 현재 {0}명 접속 중
|
||||
players.single = 현재 {0}명만 있음.
|
||||
players.search = search
|
||||
players.notfound = [gray]no players found
|
||||
players = {0}명 접속 중
|
||||
players.single = {0}명만 있음.
|
||||
players.search = 플레이어 검색
|
||||
players.notfound = [gray]플레이어를 찾을수 없습니다.
|
||||
server.closing = [accent]서버 닫는 중...
|
||||
server.kicked.kick = 서버에서 추방되었습니다!
|
||||
server.kicked.whitelist = 당신은 이 서버의 화이트리스트에 등록되어있지 않습니다.
|
||||
server.kicked.serverClose = 서버 종료됨.
|
||||
server.kicked.vote = 당신은 투표로 추방되었습니다. 그러니 좀 적당히 하지 그랬어요?
|
||||
server.kicked.serverClose = 서버 닫힘.
|
||||
server.kicked.vote = 당신은 투표로 추방되었습니다. 잘가요.
|
||||
server.kicked.clientOutdated = 오래된 버전의 게임입니다! 게임을 업데이트하세요!
|
||||
server.kicked.serverOutdated = 오래된 버전의 서버입니다! 서버 호스트 관리자에게 문의하세요!
|
||||
server.kicked.banned = 서버 규칙 위반으로 인해, 이제 당신은 영원히 이 서버를 플레이 하실 수 없습니다.
|
||||
server.kicked.banned = 이 서버에서 벤 되었습니다.
|
||||
server.kicked.typeMismatch = 클라이언트와 호환되지 않는 서버입니다. 디스코드에서 #mods에 들러보는 건 어떨까요?
|
||||
server.kicked.playerLimit = 서버가 꽉 찼습니다. 빈 공간이 생길 때까지 기다려주세요.
|
||||
server.kicked.recentKick = 방금 추방되었습니다.\n잠시 기다린 후에 접속해주세요.
|
||||
@@ -159,7 +159,7 @@ server.kicked.nameInUse = 이 닉네임은 이미 이 서버에서 사용중입
|
||||
server.kicked.nameEmpty = 당신의 닉네임이 비어있습니다.
|
||||
server.kicked.idInUse = 이미 서버에 접속중입니다! 다중 계정은 허용되지 않습니다.
|
||||
server.kicked.customClient = 이 서버는 직접 빌드한 버전을 지원하지 않습니다. 공식 버전을 사용하세요.
|
||||
server.kicked.gameover = 코어가 파괴되었습니다...
|
||||
server.kicked.gameover = 게임 오버!
|
||||
server.kicked.serverRestarting = 서버가 재시작합니다.
|
||||
server.versions = 클라이언트 버전 : [accent] {0}[]\n서버 버전 : [accent] {1}[]
|
||||
host.info = [accent]호스트[] 버튼은 현재 네트워크의 [scarlet]6567[] 포트를 사용합니다.\n[LIGHT_GRAY]같은 Wi-Fi 또는 로컬 네트워크[] 에서 서버 목록을 볼 수 있습니다.\n\n만약 플레이어들이 이 IP를 통해 어디에서나 연결할 수 있게 하고 싶다면, 공유기 설정에서 [accent]포트 포워딩[]을 하시거나 VPN을 사용하셔야 합니다.\n\n[LIGHT_GRAY]참고: LAN 게임 연결에 문제가 있는 사람이 있다면, 방화벽 설정에서 Mindustry 가 로컬 네트워크에 액세스하도록 허용했는지 확인해주세요.
|
||||
@@ -243,7 +243,7 @@ on = 활성화
|
||||
off = 비활성화
|
||||
save.autosave = 자동저장 : {0}
|
||||
save.map = 맵 : {0}
|
||||
save.wave = {0} 단계
|
||||
save.wave = {0} 웨이브
|
||||
save.mode = 게임모드 : {0}
|
||||
save.date = 마지막 저장일 : {0}
|
||||
save.playtime = 플레이타임 : {0}
|
||||
@@ -276,9 +276,9 @@ cancelbuilding = [accent][[{0}][] 를 눌러 설계도 초기화
|
||||
selectschematic = [accent][[{0}][] 를 눌러 선택+복사
|
||||
pausebuilding = [accent][[{0}][] 를 눌러 설계모드 진입
|
||||
resumebuilding = [scarlet][[{0}][] 를 눌러 건설 시작
|
||||
wave = [accent] {0} 단계
|
||||
wave.waiting = [green]{0}초[]후 다음 단계 시작
|
||||
wave.waveInProgress = [LIGHT_GRAY]단계 진행중
|
||||
wave = [accent] {0} 웨이브
|
||||
wave.waiting = [green]{0}초[]후 다음 웨이브 시작
|
||||
wave.waveInProgress = [LIGHT_GRAY]웨이브 진행중
|
||||
waiting = [LIGHT_GRAY]대기중...
|
||||
waiting.players = 다른 플레이어를 기다리는 중..
|
||||
wave.enemies = [LIGHT_GRAY]적 유닛 {0}마리 남았음
|
||||
@@ -315,18 +315,18 @@ editor.mapinfo = 맵 정보
|
||||
editor.author = 제작자 :
|
||||
editor.description = 설명 :
|
||||
editor.nodescription = 맵을 업로드하려면 최소 4자 이상의 설명이 있어야합니다.
|
||||
editor.waves = 단계 :
|
||||
editor.waves = 웨이브 :
|
||||
editor.rules = 규칙 :
|
||||
editor.generation = 맵 생성 설정 :
|
||||
editor.ingame = 인게임 편집
|
||||
editor.publish.workshop = 창작마당 업로드
|
||||
editor.newmap = 신규 맵
|
||||
workshop = Workshop
|
||||
waves.title = 단계
|
||||
waves.title = 웨이브
|
||||
waves.remove = 삭제
|
||||
waves.never = 여기까지 유닛생성
|
||||
waves.every = 매
|
||||
waves.waves = 단계마다
|
||||
waves.waves = 웨이브마다
|
||||
waves.perspawn = 생성
|
||||
waves.to = 부터
|
||||
waves.boss = 이 유닛을 보스로 설정
|
||||
@@ -334,9 +334,9 @@ waves.preview = 미리보기
|
||||
waves.edit = 편집
|
||||
waves.copy = 클립보드로 복사
|
||||
waves.load = 클립보드에서 불러오기
|
||||
waves.invalid = 클립보드의 잘못된 단계 데이터
|
||||
waves.copied = 단계 코드 복사됨
|
||||
waves.none = 적 단계가 설정되지 않았습니다.\n비어있을 시 자동으로 기본 적 단계로 설정됩니다.
|
||||
waves.invalid = 클립보드의 잘못된 웨이브 데이터
|
||||
waves.copied = 웨이브 코드 복사됨
|
||||
waves.none = 적 웨이브가 설정되지 않았습니다.\n비어있을 시 자동으로 기본 적 웨이브로 설정됩니다.
|
||||
editor.default = [LIGHT_GRAY]<기본값>
|
||||
details = 설명
|
||||
edit = 편집
|
||||
@@ -451,17 +451,17 @@ abandon = 지역 포기
|
||||
abandon.text = 이 구역의 모든 자원이 적에게 빼앗길 것입니다.
|
||||
locked = 잠김
|
||||
complete = [LIGHT_GRAY]지역 해금 조건 :
|
||||
requirement.wave = {1}지역에서 {0}단계 달성
|
||||
requirement.wave = {1}지역에서 {0}웨이브 달성
|
||||
requirement.core = {0}지역에서 적 코어를 파괴
|
||||
requirement.unlock = {0}지역 해금
|
||||
resume = 현재 진행 중인 지역\n[LIGHT_GRAY]{0}
|
||||
bestwave = [LIGHT_GRAY]달성한 최고 단계 : {0}
|
||||
bestwave = [LIGHT_GRAY]달성한 최고 웨이브 : {0}
|
||||
launch = < 출격 >
|
||||
launch.title = 출격 성공
|
||||
launch.next = [LIGHT_GRAY]다음 출격 기회는 {0} 단계에서 나타납니다.
|
||||
launch.next = [LIGHT_GRAY]다음 출격 기회는 {0} 웨이브에서 나타납니다.
|
||||
launch.unable2 = [scarlet]출격할 수 없습니다.[]
|
||||
launch.confirm = 출격하게 되면 코어에 저장된 모든 자원이 창고로 들어갑니다.\n또한 출격한 지역에는 아무것도 남지 않습니다.
|
||||
launch.skip.confirm = 만약 지금 출격하지 않고 스킵하신다면, 다음 출격 단계까지 기다려야 합니다.
|
||||
launch.skip.confirm = 만약 지금 출격하지 않고 스킵하신다면, 다음 출격 웨이브까지 기다려야 합니다.
|
||||
uncover = 지역 개방
|
||||
configure = 코어 시작자원 설정
|
||||
bannedblocks = 금지된 블럭들
|
||||
@@ -469,7 +469,7 @@ addall = 모두 추가
|
||||
configure.locked = [lightgray]{0}시 시작자원 설정이 해금됩니다.
|
||||
configure.invalid = 해당 값은 0 과 {0} 사이여야 합니다.
|
||||
zone.unlocked = [LIGHT_GRAY]지역 {0}이 잠금 해제되었습니다!
|
||||
zone.requirement.complete = {0} 단계 달성 성공! \n{1} 지역 요구사항이 충족되었습니다!
|
||||
zone.requirement.complete = {0} 웨이브 달성 성공! \n{1} 지역 요구사항이 충족되었습니다!
|
||||
zone.config.unlocked = 시작자원 설정 해금! : [lightgray]\n{0}
|
||||
zone.resources = 감지된 자원 목록 :
|
||||
zone.objective = [lightgray]지역 임무 : [accent]{0}
|
||||
@@ -508,7 +508,7 @@ zone.groundZero.description = 이 장소는 다시 시작하기에 최적의 환
|
||||
zone.frozenForest.description = 이 지역도 산과 가까운 지역입니다 포자들이 흩뿌려져 있으며 극한의 추위도 포자를 막을 수 있을 것 같지 않습니다.\n화력 발전소를 짓고 전력을 확보하여 채광 드론을 사용하는 법을 배우십시오.
|
||||
zone.desertWastes.description = 이 황무지는 끝을 알 수 없을 정도로 광활하고 십자가 형태의 버려진 구조물이 존재합니다.\n석탄이 존재하며 이를 화력발전에 쓰거나 흑연 정제에 쓰십시오.\n\n[lightgray]이 지역에서의 착륙장소는 확실하지 않습니다.
|
||||
zone.saltFlats.description = 이 소금 사막은 매우 척박하여 자원이 거의 없습니다.\n하지만 자원이 희소한 이곳에서도 적들의 요새가 발견되었습니다. 그들을 사막의 모래로 만들어버리십시오.
|
||||
zone.craters.description = 물이 가득한 이 크레이터에는 옛 전쟁의 유물들이 쌓여있습니다.\n이곳을 다시 점령해 강화유리를 제작하고 물을 끌어올려 포탑과 드릴에 공급하여 더 좋은 효율로 방어선을 강화하십시오.
|
||||
zone.craters.description = 물이 가득한 이 크레이터에는 옛 전쟁의 유물들이 쌓여있습니다.\n이곳을 다시 점령해 금속유리를 제작하고 물을 끌어올려 포탑과 드릴에 공급하여 더 좋은 효율로 방어선을 강화하십시오.
|
||||
zone.ruinousShores.description = 이 지역은 과거 해안방어기지로 사용되었습니다.\n그러나 지금은 기본구조물만 남아있으니 이 지역을 어서 신속히 수리하여 외부로 세력을 확장한 뒤, 잃어버린 기술을 다시 회수하십시오.
|
||||
zone.stainedMountains.description = 더 안쪽에는 포자에 오염된 산맥이 있지만, 이 곳은 포자에 오염되지 않았습니다.\n이 지역에서 티타늄을 채굴하고 이것을 어떻게 사용하는지 배우십시오.\n\n적들은 이곳에서 더 강력합니다. 더 강한 유닛들이 나올 때까지 시간을 낭비하지 마십시오.
|
||||
zone.overgrowth.description = 이 곳은 포자들의 근원과 가까이에 있는 과성장 지대입니다. 적이 이 곳에 전초기지를 설립했습니다. 디거를 생산해 적의 코어를 박살 내고 우리가 잃어버린 것들을 되돌려받으십시오!
|
||||
@@ -593,7 +593,7 @@ bar.power = 전력
|
||||
bar.progress = 생산 진행도
|
||||
bar.spawned = 최대 {1}기 중 {0}기 생산됨
|
||||
bar.input = 입력
|
||||
bar.output = Output
|
||||
bar.output = 출력
|
||||
|
||||
bullet.damage = [lightgray]피해량 : [stat]{0}[]
|
||||
bullet.splashdamage = [lightgray]범위 피해량 : [stat]{0}[] / [lightgray]피해 범위 : [stat]{1}[lightgray] 타일
|
||||
@@ -652,8 +652,8 @@ setting.difficulty.normal = 보통
|
||||
setting.difficulty.hard = 어려움
|
||||
setting.difficulty.insane = 미침
|
||||
setting.difficulty.name = 난이도 :
|
||||
setting.screenshake.name = 화면 흔들기
|
||||
setting.effects.name = 화면 효과
|
||||
setting.screenshake.name = 화면 흔들림
|
||||
setting.effects.name = 효과 보임
|
||||
setting.destroyedblocks.name = 부서진 블럭 표시
|
||||
setting.conveyorpathfinding.name = 교차기 자동 설치
|
||||
setting.coreselect.name = Schematic Cores 켜기
|
||||
@@ -687,7 +687,7 @@ public.confirm = 게임을 공개하시겠습니까?\n[lightgray]설정 - 게임
|
||||
public.beta = [accent]!정보![] 베타 버전은 공개 게임 서버를 열지 못합니다.
|
||||
uiscale.reset = UI 스케일이 변경되었습니다.\n"확인"버튼을 눌러 스케일을 확인하세요.\n[scarlet][accent] {0}[]초 후에 예전 설정으로 되돌리고 게임을 종료합니다...
|
||||
uiscale.cancel = 취소 & 나가기
|
||||
setting.bloom.name = 화려한 이펙트
|
||||
setting.bloom.name = 빛발산 켜기
|
||||
keybind.title = 조작키 설정
|
||||
keybinds.mobile = [scarlet]대부분의 키들은 모바일에서 작동하지 않습니다. 기본적인 것들만 지원됩니다.
|
||||
category.general.name = 일반
|
||||
@@ -751,9 +751,9 @@ keybind.drop_unit.name = 유닛 처치 시 자원획득
|
||||
keybind.zoom_minimap.name = 미니맵 확대
|
||||
mode.help.title = 게임모드 도움말
|
||||
mode.survival.name = 생존
|
||||
mode.survival.description = 이것은 일반 모드입니다. 제한된 자원을 가지고 자동으로 다음 단계가 시작됩니다.
|
||||
mode.survival.description = 이것은 일반 모드입니다. 제한된 자원을 가지고 자동으로 다음 웨이브가 시작됩니다.
|
||||
mode.sandbox.name = 샌드박스
|
||||
mode.sandbox.description = 무한한 자원을 가지고 자유롭게 다음 단계를 시작할 수 있습니다.
|
||||
mode.sandbox.description = 무한한 자원을 가지고 자유롭게 다음 웨이브를 시작할 수 있습니다.
|
||||
mode.editor.name = 편집기
|
||||
mode.pvp.name = PvP
|
||||
mode.pvp.description = 실제 플레이어와 PvP를 합니다. 맵에 적어도 2개의 다른 색상 코어가 있어야 합니다.
|
||||
@@ -763,8 +763,8 @@ mode.custom = 사용자 정의 규칙
|
||||
|
||||
rules.infiniteresources = 무한 자원
|
||||
rules.reactorexplosions = 원자로 폭발 허가 여부
|
||||
rules.wavetimer = 단계 대기시간
|
||||
rules.waves = 단계 활성화
|
||||
rules.wavetimer = 웨이브 대기시간
|
||||
rules.waves = 웨이브 활성화
|
||||
rules.attack = 공격 모드
|
||||
rules.enemyCheat = 무한한 적 자원
|
||||
rules.unitdrops = 유닛 처치시 자원 약탈
|
||||
@@ -776,15 +776,15 @@ rules.playerdamagemultiplier = 플레이어 공격력 배수
|
||||
rules.unitdamagemultiplier = 유닛 공격력 배수
|
||||
rules.enemycorebuildradius = 적 코어 건설 금지구역 범위 : [LIGHT_GRAY] (타일)
|
||||
rules.respawntime = 플레이어 부활 대기 시간 : [LIGHT_GRAY] (초)
|
||||
rules.wavespacing = 단계 간격 : [LIGHT_GRAY] (초)
|
||||
rules.wavespacing = 웨이브 간격 : [LIGHT_GRAY] (초)
|
||||
rules.buildcostmultiplier = 건설 소모 배수
|
||||
rules.buildspeedmultiplier = 건설 속도 배수
|
||||
rules.deconstructrefundmultiplier = Deconstruct Refund Multiplier
|
||||
rules.waitForWaveToEnd = 단계가 끝날때까지 기다리는 중
|
||||
rules.waitForWaveToEnd = 웨이브가 끝날때까지 기다리는 중
|
||||
rules.dropzoneradius = 소환 충격파 범위 : [LIGHT_GRAY] (타일)
|
||||
rules.respawns = 단계당 최대 플레이어 부활 횟수
|
||||
rules.respawns = 웨이브당 최대 플레이어 부활 횟수
|
||||
rules.limitedRespawns = 플레이어 부활 제한
|
||||
rules.title.waves = 단계
|
||||
rules.title.waves = 웨이브
|
||||
rules.title.respawns = 플레이어 부활
|
||||
rules.title.resourcesbuilding = 자원 & 건축
|
||||
rules.title.player = 플레이어들
|
||||
@@ -812,9 +812,9 @@ item.phase-fabric.name = 메타
|
||||
item.surge-alloy.name = 설금
|
||||
item.spore-pod.name = 포자 포드
|
||||
item.sand.name = 모래
|
||||
item.blast-compound.name = 폭발물
|
||||
item.pyratite.name = 파이라타이트
|
||||
item.metaglass.name = 강화유리
|
||||
item.blast-compound.name = 복합폭약
|
||||
item.pyratite.name = 피라타이트
|
||||
item.metaglass.name = 금속유리
|
||||
item.scrap.name = 고철
|
||||
liquid.water.name = 물
|
||||
liquid.slag.name = 광재
|
||||
@@ -822,7 +822,7 @@ liquid.oil.name = 석유
|
||||
liquid.cryofluid.name = 냉각수
|
||||
mech.alpha-mech.name = 알파
|
||||
mech.alpha-mech.weapon = 중무장 소총
|
||||
mech.alpha-mech.ability = 자가
|
||||
mech.alpha-mech.ability = 자가
|
||||
mech.delta-mech.name = 델타
|
||||
mech.delta-mech.weapon = 전격 충전기
|
||||
mech.delta-mech.ability = 충전
|
||||
@@ -971,7 +971,7 @@ block.separator.name = 원심 분리기
|
||||
block.coal-centrifuge.name = 석탄 원심분리기
|
||||
block.power-node.name = 전력 노드
|
||||
block.power-node-large.name = 대형 전력 노드
|
||||
block.surge-tower.name = 설금 타워
|
||||
block.surge-tower.name = 설금 전력 타워
|
||||
block.diode.name = 배터리 다이오드
|
||||
block.battery.name = 배터리
|
||||
block.battery-large.name = 대형 배터리
|
||||
@@ -1001,19 +1001,19 @@ block.power-void.name = 방전장치
|
||||
block.power-source.name = 전력 공급기
|
||||
block.unloader.name = 언로더
|
||||
block.vault.name = 창고
|
||||
block.wave.name = 파도
|
||||
block.swarmer.name = 스웜
|
||||
block.wave.name = 웨이브
|
||||
block.swarmer.name = 스워머
|
||||
block.salvo.name = 살보
|
||||
block.ripple.name = 립플
|
||||
block.phase-conveyor.name = 메타 컨베이어
|
||||
block.bridge-conveyor.name = 터널 컨베이어
|
||||
block.plastanium-compressor.name = 플라스터늄 압축기
|
||||
block.pyratite-mixer.name = 파이라타이트 혼합기
|
||||
block.blast-mixer.name = 폭발물 혼합기
|
||||
block.pyratite-mixer.name = 피라타이트 혼합기
|
||||
block.blast-mixer.name = 복합폭약 혼합기
|
||||
block.solar-panel.name = 태양 전지판
|
||||
block.solar-panel-large.name = 대형 태양 전지판
|
||||
block.oil-extractor.name = 석유 추출기
|
||||
block.command-center.name = 지휘소
|
||||
block.command-center.name = 드론 명령센터
|
||||
block.draug-factory.name = 광부 드론 공장
|
||||
block.spirit-factory.name = 수리 드론 공장
|
||||
block.phantom-factory.name = 건설 드론 공장
|
||||
@@ -1024,12 +1024,12 @@ block.crawler-factory.name = 크롤러 공장
|
||||
block.titan-factory.name = 타이탄 공장
|
||||
block.fortress-factory.name = 포트리스 공장
|
||||
block.revenant-factory.name = 망령 전함 공장
|
||||
block.repair-point.name = 수리 지점
|
||||
block.repair-point.name = 드론 수리 지점
|
||||
block.pulse-conduit.name = 펄스 파이프
|
||||
block.plated-conduit.name = 도금된 파이프
|
||||
block.phase-conduit.name = 메타 파이프
|
||||
block.liquid-router.name = 액체 분배기
|
||||
block.liquid-tank.name = 물탱크
|
||||
block.liquid-tank.name = 액체 탱크
|
||||
block.liquid-junction.name = 액체 교차기
|
||||
block.bridge-conduit.name = 다리 파이프
|
||||
block.rotary-pump.name = 동력 펌프
|
||||
@@ -1039,8 +1039,8 @@ block.blast-drill.name = 압축 공기분사 드릴
|
||||
block.thermal-pump.name = 화력 펌프
|
||||
block.thermal-generator.name = 열발전기
|
||||
block.alloy-smelter.name = 설금 제련소
|
||||
block.mender.name = 소형 수리 프로젝터
|
||||
block.mend-projector.name = 수리 프로젝터
|
||||
block.mender.name = 수리 프로젝터
|
||||
block.mend-projector.name = 대형 수리 프로젝터
|
||||
block.surge-wall.name = 설금 벽
|
||||
block.surge-wall-large.name = 큰 설금 벽
|
||||
block.cyclone.name = 사이클론
|
||||
@@ -1095,9 +1095,9 @@ tutorial.breaking = 설계를 방해하는 블록을 제거하기 위해서 [acc
|
||||
tutorial.breaking.mobile = 설계를 방해하는 블록을 제거하기 위해서 [accent]망치 버튼을 눌러 제거모드[]로 변경하신 후, 첫번째 지점을 누른 후 드래그하여 범위를 지정한뒤 V버튼을 클릭해 블럭을 제거하세요.\n\n[accent]코어 근처의 조각벽 3개[]를 제거하세요.
|
||||
tutorial.withdraw = [accent]코어나 창고, 공장[]같은 자원을 넣을 수 있는 일부 블럭에서는 직접 자원을 빼낼 수도 있습니다.\n[accent]코어를 클릭 후 자원을 눌러서 자원을 빼내세요.
|
||||
tutorial.deposit = 자원을 다시 블록에 넣을 수도 있습니다.\n\n[accent]당신의 기체에서 코어로 드래그[]하여 자원을 되돌려 넣으세요.
|
||||
tutorial.waves = [LIGHT_GRAY]적[]이 접근합니다.\n당신의 기체는 적을 클릭하여 공격할 수 있습니다. 또한, 구리를 더 캐내고 포탑을 더 지어서 방어를 강화하세요.\n\n[accent]2단계 동안 코어를 보호하세요.[]
|
||||
tutorial.waves.mobile = [LIGHT_GRAY]적[]이 접근합니다.\n당신의 기체는 적을 자동조준하지만, 원하는 적을 클릭하여 공격하고 싶은 대상을 바꿀 수 있습니다.\n구리를 더 캐내고 포탑을 더 지어서 방어를 강화하세요.\n\n[accent]2단계동안 코어를 방어하세요.[]
|
||||
tutorial.launch = 특정 단계에 도달하면 [accent]출격[]이 가능합니다.\n[accent]출격[]을 하게되면 해당 지역의 코어에 들어있는 자원들을 캠페인의 자원 창고로 보내지만, 해당 지역의 [accent]모든 것들[]은 날라가게 되니 주의하세요.
|
||||
tutorial.waves = [LIGHT_GRAY]적[]이 접근합니다.\n당신의 기체는 적을 클릭하여 공격할 수 있습니다. 또한, 구리를 더 캐내고 포탑을 더 지어서 방어를 강화하세요.\n\n[accent]2웨이브 동안 코어를 보호하세요.[]
|
||||
tutorial.waves.mobile = [LIGHT_GRAY]적[]이 접근합니다.\n당신의 기체는 적을 자동조준하지만, 원하는 적을 클릭하여 공격하고 싶은 대상을 바꿀 수 있습니다.\n구리를 더 캐내고 포탑을 더 지어서 방어를 강화하세요.\n\n[accent]2웨이브 동안 코어를 방어하세요.[]
|
||||
tutorial.launch = 특정 웨이브에 도달하면 [accent]출격[]이 가능합니다.\n[accent]출격[]을 하게되면 해당 지역의 코어에 들어있는 자원들을 캠페인의 자원 창고로 보내지만, 해당 지역의 [accent]모든 것들[]은 날라가게 되니 주의하세요.
|
||||
|
||||
item.copper.description = 모든 종류의 블록에서 광범위하게 사용되는 자원입니다.
|
||||
item.lead.description = 쉽게 구할 수 있으며, 전자 및 액체 수송 블록에서 광범위하게 사용되는 자원입니다.
|
||||
@@ -1113,7 +1113,7 @@ item.plastanium.description = 고급 항공기 및 분열 탄약에 사용되는
|
||||
item.phase-fabric.description = 최첨단 전자 제품과 자기수리 기술에 사용되는 거의 무중력에 가까운 물질입니다.\n\n[royal]메타 가속하면 범위가 늘어나는 건물들이 있습니다.
|
||||
item.surge-alloy.description = 순간적으로 전압이 증가하는 전기 특성을 가진 고급 합금입니다.
|
||||
item.spore-pod.description = 석유를 만들거나 탄약과 합성해 연료로 전환하는데 사용됩니다.
|
||||
item.blast-compound.description = 터렛 및 건설의 재료로 사용되는 휘발성 폭발물.\n연료로도 사용할 수 있지만, 별로 추천하지는 않습니다.
|
||||
item.blast-compound.description = 터렛 및 건설의 재료로 사용되는 휘발성 복합폭약.\n연료로도 사용할 수 있지만, 별로 추천하지는 않습니다.
|
||||
item.pyratite.description = 인화성을 가진 재료로, 주로 터렛의 탄약으로 사용됩니다.
|
||||
liquid.water.description = 여러 포탑을 가속하는 데 사용할 수 있고, 파도와 멜트다운의 탄약으로도 사용되며 여러 공장에서도 사용되는 무구한 가능성을 가진 액체입니다.
|
||||
liquid.slag.description = 다양한 종류의 금속들이 함께 섞여 녹아있습니다. 원심분리기를 이용해 다른 광물들로 분리하거나 탄약으로 사용해 적 부대를 향해 살포할 수 있습니다.
|
||||
@@ -1137,18 +1137,18 @@ unit.fortress.description = 중무장 포병 지상 유닛.\n높은 공격력을
|
||||
unit.eruptor.description = 지상 유닛. 광재를 넣은 파도와 같은 무기를 장착했습니다.
|
||||
unit.wraith.description = 적 핵심 건물 및 유닛을 집중적으로 공격하는 방식을 사용하는 전투기 입니다.
|
||||
unit.ghoul.description = 무겁고 튼튼한 지상 폭격기 입니다.\n주로 적 건물로 이동하여 엄청난 폭격을 가합니다.
|
||||
unit.revenant.description = 플레이어가 생산가능한 최종 공중 전투기. 폭발물을 쓰는 스웜 포탑과 같은 무기를 사용합니다.
|
||||
unit.revenant.description = 플레이어가 생산가능한 최종 공중 전투기. 복합폭약을 쓰는 스워머 포탑과 같은 무기를 사용합니다.
|
||||
block.message.description = 글을 작성할 수 있습니다. 이것을 이용하여 같은 팀과 소통을 해보세요.
|
||||
block.graphite-press.description = 석탄 덩어리를 흑연으로 압축합니다.
|
||||
block.graphite-press.description = 석탄들을 흑연으로 압축합니다.
|
||||
block.multi-press.description = 흑연 압축기의 상위 버전입니다. 물과 전력을 이용해 석탄을 빠르고 효율적으로 압축합니다.
|
||||
block.silicon-smelter.description = 석탄과 모래를 사용해 실리콘을 생산합니다.
|
||||
block.kiln.description = 모래와 납을 사용해 강화유리를 만듭니다. 소량의 전력이 필요합니다.
|
||||
block.kiln.description = 모래와 납을 사용해 금속유리를 만듭니다. 소량의 전력이 필요합니다.
|
||||
block.plastanium-compressor.description = 석유와 티타늄으로 플라스터늄을 생산합니다.
|
||||
block.phase-weaver.description = 토륨과 많은 양의 모래로 메타를 합성합니다.
|
||||
block.alloy-smelter.description = 티타늄, 납, 실리콘, 구리로 서지 합금을 생산합니다.
|
||||
block.cryofluidmixer.description = 물과 티타늄을 냉각에 훨씬 더 효과적인 냉각수로 결합시킵니다.
|
||||
block.blast-mixer.description = 포자를 사용하여 파이라타이트를 폭발성 화합물로 변환시킵니다.
|
||||
block.pyratite-mixer.description = 석탄, 납, 모래를 가연성이 높은 파이라타이트로 만듭니다.
|
||||
block.alloy-smelter.description = 티타늄, 납, 실리콘, 구리로 설금을 생산합니다.
|
||||
block.cryofluidmixer.description = 물과 티타늄을 물보다 냉각이 좋은 냉각수로 결합시킵니다.
|
||||
block.blast-mixer.description = 포자를 사용하여 피라타이트를 폭발성 화합물로 변환시킵니다.
|
||||
block.pyratite-mixer.description = 석탄, 납, 모래를 가연성이 높은 피라타이트로 만듭니다.
|
||||
block.melter.description = 고철을 녹여 파도의 탄약 혹은 원심 분리기에 사용할 수 있는 액체인 광재로 만듭니다.
|
||||
block.separator.description = 광재를 각종 자원으로 재활용 할 수 있게 해 주는 건물입니다.
|
||||
block.spore-press.description = 포자를 압축해 기름을 추출합니다.
|
||||
@@ -1174,11 +1174,11 @@ block.phase-wall-large.description = 메타 벽 4개를 뭉친 블럭입니다.
|
||||
block.surge-wall.description = 공격을 받으면 낮은 확률로 공격자에게 전격 공격을 합니다.
|
||||
block.surge-wall-large.description = 설금 벽 4개를 뭉친 블럭입니다.
|
||||
block.door.description = 눌러서 열고 닫을 수 있는 문.\n만약 문이 열리면, 적들은 총을 쏘며 문을 통과할 수 있습니다.
|
||||
block.door-large.description = 문 4개를 뭉친 블럭입니다.
|
||||
block.door-large.description = 4칸의 대형문 입니다.
|
||||
block.mender.description = 주변 블록들을 주기적으로 치료합니다.
|
||||
block.mend-projector.description = 주변 블록들을 멘더보다 더 넓은 범위, 더 많은 회복량, 더 빠른 속도로 수리합니다.
|
||||
block.mend-projector.description = 수리 프로젝터보다 더 넓은 범위, 더 많은 회복량, 더 빠른 속도를 가졌습니다.
|
||||
block.overdrive-projector.description = 드릴과 컨베이어와 같은 인근 건물의 속도를 높여줍니다.
|
||||
block.force-projector.description = 육각형 보호막을 만들고, 내구도가 다 닳기 전까지 보호막 내로 들어오는 모든 공격을 방어합니다.
|
||||
block.force-projector.description = 육각형 보호막을 만들고, 보호막의 내구도가 다 닳기 전까지 보호막 내로 들어오는 모든 공격을 방어합니다.
|
||||
block.shock-mine.description = 지뢰를 밟는 적에게 피해를 줍니다. 적에게는 거의 보이지 않습니다. 일단 설치 완료된 후에는 적 유닛이 공격하지 않습니다. 그러나 지뢰가 있는 곳은 피해가니 주의하세요.
|
||||
block.conveyor.description = 기본 자원 수송 레일. 자원을 배치된 방향을 따라 이동시켜 자동으로 건물에 넣어줍니다.
|
||||
block.titanium-conveyor.description = 고급 자원 수송 레일. 기본 컨베이어보다 자원을 더 빨리 이동시킵니다.
|
||||
@@ -1199,7 +1199,7 @@ block.conduit.description = 기본 파이프\n액체를 배치된 방향으로
|
||||
block.pulse-conduit.description = 고급 파이프\n기본 파이프보다 액체 운송 속도가 빠릅니다.
|
||||
block.plated-conduit.description = 펄스 파이프와 같은 속도로 액체를 운송시키지만, 체력이 더 많습니다. 양 옆으로는 파이프 의외의 대상에서 액체를 받지 않습니다. \n파이프 끝 부분이 블럭에 연결되지 않고 노출되었을 때 누수되는 액체의 양이 더 적습니다.
|
||||
block.liquid-router.description = 액체를 다른 방향으로 분배할 수 있게 하는 블럭입니다.
|
||||
block.liquid-tank.description = 액체를 저장할 수 있는 물탱크 입니다.
|
||||
block.liquid-tank.description = 액체를 저장할 수 있는 액체 탱크 입니다.
|
||||
block.liquid-junction.description = 교차기와 같은 기능을 하나 자원 대신에 액체를 교차시킵니다.
|
||||
block.bridge-conduit.description = 액체 수송블록\n다리와 다리 사이를 연결하여 액체가 지나갈 수 있게 해 줍니다.\n\n주로 중간에 파이프 설치를 막는 장애물이 있을 때 사용합니다.
|
||||
block.phase-conduit.description = 고급 액체 수송블록\n전기를 사용하여 같은 줄의 먼 거리에 있는 다른 위상 파이프로 액체를 전달합니다.
|
||||
@@ -1212,19 +1212,19 @@ block.battery-large.description = 일반 배터리보다 훨씬 많은 량의
|
||||
block.combustion-generator.description = 인화성 물질을 태워 소량의 전력을 생산합니다.
|
||||
block.thermal-generator.description = 열이 있는 타일 위에 건설하면 전력을 생산합니다.\n\n[ROYAL]용암 웅덩이 혹은 열기지대에서 무한정 열을 발산합니다.
|
||||
block.turbine-generator.description = 화력 발전기보다 효율적이지만, 액체가 추가적으로 필요합니다.\n\n[ROYAL]일반 타일에서 물추출기 1개로 2개가 가동가능합니다.
|
||||
block.differential-generator.description = 냉각수와 파이라타이트의 온도 차를 이용해 안정적으로 원자로에 버금가는 양의 전기를 생산합니다.
|
||||
block.differential-generator.description = 냉각수와 피라타이트의 온도 차를 이용해 안정적으로 원자로에 버금가는 양의 전기를 생산합니다.
|
||||
block.rtg-generator.description = 방사성동위원소 열전기 발전기\n토륨 또는 메타를 사용하며, 냉각이 필요 없는 발전을 하지만 토륨 원자로에 비해 발전량이 매우 적습니다.
|
||||
block.solar-panel.description = 태양광으로 극소량의 전기을 생산합니다.
|
||||
block.solar-panel-large.description = 일반 태양 전지판보다 훨씬 발전량이 많지만, 건축비도 훨씬 비쌉니다.
|
||||
block.thorium-reactor.description = 토륨을 이용해 막대한 양의 전기를 생산합니다. 지속적인 냉각이 필요하며 냉각제의 양이 부족하면 크게 폭발합니다.\n\n[royal]폭발로 인한 피해를 버틸 수 있는 건물은 없습니다.
|
||||
block.impact-reactor.description = 최첨단 발전기\n폭발물과 냉각수를 이용해 최고의 효율로 매우 많은 양의 전기를 생산할 수 있습니다. 발전을 시작하는 데 전기가 필요하며 발전기를 가동하는 데 시간이 많이 걸립니다.\n[royal]오버드라이브 프로젝터로 10000이상의 전기를 생산할 수 있으며, 가동중에 전기가 끊기면 가동을 다시 해야되기 때문에 창고, 물탱크, 배터리 등을 주위에 설치하고 나서 가동하는 것을 추천드립니다.
|
||||
block.impact-reactor.description = 최첨단 발전기\n복합폭약과 냉각수를 이용해 최고의 효율로 매우 많은 양의 전기를 생산할 수 있습니다. 발전을 시작하는 데 전기가 필요하며 발전기를 가동하는 데 시간이 많이 걸립니다.\n[royal]오버드라이브 프로젝터로 10000이상의 전기를 생산할 수 있으며, 가동중에 전기가 끊기면 가동을 다시 해야되기 때문에 창고, 물탱크, 배터리 등을 주위에 설치하고 나서 가동하는 것을 추천드립니다.
|
||||
block.mechanical-drill.description = 싸구려 드릴. 적절한 타일 위에 설치되었을 때 매우 느린 속도로 채광합니다.\n\n[ROYAL]구리와 납은 채광 드론으로 대체가 가능합니다.
|
||||
block.pneumatic-drill.description = 기압을 이용하여 보다 빠르게 단단한 물질을 채광할 수 있는 향상된 드릴.\n\n[ROYAL]전기를 사용하지 않는 드릴이라도 물과 오버드라이브를 이용하여 가속할 수 있습니다.
|
||||
block.pneumatic-drill.description = 티타늄을 채광할 수 있는 향상된 드릴입니다. \n\n[ROYAL]전기를 사용하지 않는 드릴이라도 물과 오버드라이브를 이용하여 가속할 수 있습니다.
|
||||
block.laser-drill.description = 토륨을 채광할 수 있는 고급 드릴입니다. 전력과 물을 공급하여 빠른 속도로 채광할 수 있습니다.\n\n[ROYAL]드릴 아래에 배치된 광물타일의 비율에 따라 채광량이 달라집니다.
|
||||
block.blast-drill.description = 최상위 드릴입니다. 많은 양의 전력이 필요합니다.\n\n[ROYAL]물추출기 하나면 충분합니다.
|
||||
block.water-extractor.description = 땅에서 물을 추출합니다. 근처에 호수가 없을 때 사용하세요.\n\n[ROYAL]물추출기의 효율이 달라지는 타일이 있습니다.
|
||||
block.cultivator.description = 소량의 포자를 산업용으로 사용가능한 포자로 배양하는 건물입니다.
|
||||
block.oil-extractor.description = 대량의 전력과 물을 사용하여 모래에서 석유를 추출합니다. 근처에 직접적인 석유 공급원이 없을 때 사용하세요.\n\n[royal]모래 또는 고철을 이용하여 창조경제가 가능합니다.
|
||||
block.oil-extractor.description = 대량의 전력과 물을 사용하여 모래에서 석유를 추출합니다. 근처에 직접적인 석유 공급원이 없을 때 사용하세요.
|
||||
block.core-shard.description = 코어의 1단계 형태입니다.\n이것이 파괴되면 플레이하고 있는 지역과의 연결이 끊어지니 적의 공격에 파괴되지 않도록 주의하세요.\n[ROYAL]연결이 끊긴다는 말은 게임오버와 일맥상통합니다.
|
||||
block.core-foundation.description = 코어의 2단계 형태입니다.\n첫 번째 코어보다 더 튼튼하고 더 많은 자원을 저장할 수 있습니다.\n\n[ROYAL]크기도 좀 더 큽니다.
|
||||
block.core-nucleus.description = 코어의 3단계이자 마지막 형태입니다.\n최고로 튼튼하며 막대한 양의 자원들을 저장할 수 있습니다.
|
||||
@@ -1253,7 +1253,7 @@ block.spirit-factory.description = 블록을 수리하는 수리 드론을 생
|
||||
block.phantom-factory.description = 건설을 도와주는 빌더 드론을 생산합니다.\n\n[ROYAL]당신의 환영입니다.
|
||||
block.wraith-factory.description = 빠른 뺑소니 요격기 유닛을 생산합니다.\n\n[ROYAL]체력 자체는 무척 적습니다.
|
||||
block.ghoul-factory.description = 중탄두 폭격기를 생산합니다.\n\n[ROYAL]적 위를 유령처럼 맴돕니다.
|
||||
block.revenant-factory.description = 중량의 폭발물 스웜 포대를 가진 전함을 생산합니다.\n\n[ROYAL]
|
||||
block.revenant-factory.description = 중량의 복합폭약 스워머 포대를 가진 전함을 생산합니다.\n\n[ROYAL]
|
||||
block.dagger-factory.description = 기본 지상 유닛을 생산합니다.\n\n[ROYAL]대거지만 단검으로 공격하진 않습니다.
|
||||
block.crawler-factory.description = 자폭하는 지상 유닛을 생산합니다.\n\n[ROYAL]레일만으로도 막을 수 있습니다.
|
||||
block.titan-factory.description = 화염방사기를 장착한 지상유닛를 생산합니다.\n\n[ROYAL]유닛 상대로 강력한 공격력을 보여줍니다.
|
||||
|
||||
@@ -15,7 +15,7 @@ link.wiki.description = Wiki oficial do Mindustry
|
||||
link.feathub.description = Sugira novos conteúdos
|
||||
linkfail = Falha ao abrir o link\nO Url foi copiado para a área de transferência.
|
||||
screenshot = Screenshot salvo para {0}
|
||||
screenshot.invalid = Mapa grande demais, você pode estar potencialmente sem memória suficiente para captura de tela.
|
||||
screenshot.invalid = Este mapa é grande demais, você pode estar potencialmente sem memória suficiente para captura de tela.
|
||||
gameover = O núcleo foi destruído.
|
||||
gameover.pvp = O time[accent] {0}[] ganhou!
|
||||
highscore = [YELLOW]Novo recorde!
|
||||
@@ -99,7 +99,7 @@ committingchanges = Enviando mudanças
|
||||
done = Feito
|
||||
feature.unsupported = Seu dispositivo não suporta essa função.
|
||||
|
||||
mods.alphainfo = Mantenha em mente que os mods estão em alpha, e[scarlet] talvez sejam bem bugados[].\nReporte quaisquer problemas no Discord ou GitHub do Mindustry.
|
||||
mods.alphainfo = Tenha em mente que os mods estão em alpha, e[scarlet] talvez eles contenham erros e instabilidades[].\nReporte quaisquer problemas no Discord ou GitHub do Mindustry.
|
||||
mods.alpha = [accent](Alpha)
|
||||
mods = Mods
|
||||
mods.none = [LIGHT_GRAY]Nenhum mod encontrado!
|
||||
@@ -136,7 +136,7 @@ noname = Escolha[accent] um nome[] primeiro.
|
||||
filename = Nome do arquivo:
|
||||
unlocked = Novo bloco desbloqueado!
|
||||
completed = [accent]Completado
|
||||
techtree = Árvore de tecnologia
|
||||
techtree = Árvore Tecnológica
|
||||
research.list = [LIGHT_GRAY]Pesquise:
|
||||
research = Pesquisar
|
||||
researched = [LIGHT_GRAY]{0} Pesquisado.
|
||||
|
||||
@@ -936,7 +936,7 @@ block.titanium-wall-large.name = 大型钛墙
|
||||
block.plastanium-wall.name = 塑钢墙
|
||||
block.plastanium-wall-large.name = 大型塑钢墙
|
||||
block.phase-wall.name = 相织布墙
|
||||
block.phase-wall-large.name = 大型相织布墙
|
||||
block.phase-wall-large.name = 大型相织物墙
|
||||
block.thorium-wall.name = 钍墙
|
||||
block.thorium-wall-large.name = 大型钍墙
|
||||
block.door.name = 门
|
||||
@@ -961,7 +961,7 @@ block.illuminator.description = 小型、紧凑、可配置的光源。需要能
|
||||
block.overflow-gate.name = 溢流门
|
||||
block.underflow-gate.name = 反向溢流门
|
||||
block.silicon-smelter.name = 硅冶炼厂
|
||||
block.phase-weaver.name = 相织布编织器
|
||||
block.phase-weaver.name = 相织物编织器
|
||||
block.pulverizer.name = 粉碎机
|
||||
block.cryofluidmixer.name = 冷冻液混合器
|
||||
block.melter.name = 熔炉
|
||||
@@ -971,7 +971,7 @@ block.separator.name = 分离机
|
||||
block.coal-centrifuge.name = 煤炭离心机
|
||||
block.power-node.name = 能量节点
|
||||
block.power-node-large.name = 大型能量节点
|
||||
block.surge-tower.name = 巨浪塔
|
||||
block.surge-tower.name = 波动能量塔
|
||||
block.diode.name = 二极管
|
||||
block.battery.name = 电池
|
||||
block.battery-large.name = 大型电池
|
||||
@@ -1005,7 +1005,7 @@ block.wave.name = 波浪
|
||||
block.swarmer.name = 蜂群
|
||||
block.salvo.name = 齐射炮
|
||||
block.ripple.name = 浪涌
|
||||
block.phase-conveyor.name = 相织布传送带桥
|
||||
block.phase-conveyor.name = 相织物传送带桥
|
||||
block.bridge-conveyor.name = 传送带桥
|
||||
block.plastanium-compressor.name = 塑钢压缩机
|
||||
block.pyratite-mixer.name = 硫混合器
|
||||
@@ -1015,7 +1015,7 @@ block.solar-panel-large.name = 大型太阳能板
|
||||
block.oil-extractor.name = 石油钻井
|
||||
block.command-center.name = 指挥中心
|
||||
block.draug-factory.name = 德鲁格采矿机工厂
|
||||
block.spirit-factory.name = 魂灵修理机工厂
|
||||
block.spirit-factory.name = 神魂修理机工厂
|
||||
block.phantom-factory.name = 幻影建造机工厂
|
||||
block.wraith-factory.name = 死灵战机工厂
|
||||
block.ghoul-factory.name = 食尸鬼轰炸机工厂
|
||||
@@ -1027,7 +1027,7 @@ block.revenant-factory.name = 亡魂战机工厂
|
||||
block.repair-point.name = 维修点
|
||||
block.pulse-conduit.name = 脉冲导管
|
||||
block.plated-conduit.name = 电镀导管
|
||||
block.phase-conduit.name = 相织布导管桥
|
||||
block.phase-conduit.name = 相织物导管桥
|
||||
block.liquid-router.name = 液体路由器
|
||||
block.liquid-tank.name = 储液罐
|
||||
block.liquid-junction.name = 液体交叉器
|
||||
@@ -1062,7 +1062,7 @@ team.orange.name = 橙
|
||||
team.derelict.name = 灰
|
||||
team.green.name = 绿
|
||||
team.purple.name = 紫
|
||||
unit.spirit.name = 魂灵修理机
|
||||
unit.spirit.name = 神魂修理机
|
||||
unit.draug.name = 德鲁格采矿机
|
||||
unit.phantom.name = 幻影建造机
|
||||
unit.dagger.name = 尖刀
|
||||
|
||||
|
Before Width: | Height: | Size: 711 B After Width: | Height: | Size: 717 B |
|
Before Width: | Height: | Size: 738 KiB After Width: | Height: | Size: 762 KiB |
|
Before Width: | Height: | Size: 284 KiB After Width: | Height: | Size: 279 KiB |
|
Before Width: | Height: | Size: 821 KiB After Width: | Height: | Size: 828 KiB |
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 129 KiB |
|
Before Width: | Height: | Size: 222 KiB After Width: | Height: | Size: 226 KiB |
@@ -45,7 +45,7 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
|
||||
return (Float.isNaN(result) || Float.isInfinite(result)) ? 1f : Mathf.clamp(result, 0.0001f, 60f / 10f);
|
||||
});
|
||||
|
||||
batch = new SpriteBatch();
|
||||
batch = new SortedSpriteBatch();
|
||||
assets = new AssetManager();
|
||||
assets.setLoader(Texture.class, "." + mapExtension, new MapPreviewLoader());
|
||||
|
||||
|
||||
@@ -988,7 +988,7 @@ public class Blocks implements ContentList{
|
||||
consumes.power(1.75f);
|
||||
}};
|
||||
|
||||
massConveyor = new MassConveyor("mass-conveyor"){{
|
||||
massConveyor = new PayloadConveyor("mass-conveyor"){{
|
||||
requirements(Category.distribution, ItemStack.with(Items.copper, 1));
|
||||
}};
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ public class Control implements ApplicationListener, Loadable{
|
||||
public void loadAsync(){
|
||||
Draw.scl = 1f / Core.atlas.find("scale_marker").getWidth();
|
||||
|
||||
Core.input.setCatch(KeyCode.BACK, true);
|
||||
Core.input.setCatch(KeyCode.back, true);
|
||||
|
||||
data.load();
|
||||
|
||||
@@ -400,9 +400,9 @@ public class Control implements ApplicationListener, Loadable{
|
||||
}).pad(10f).expand().center();
|
||||
|
||||
dialog.buttons.defaults().size(200f, 60f);
|
||||
dialog.buttons.addButton("$uiscale.cancel", exit);
|
||||
dialog.buttons.button("$uiscale.cancel", exit);
|
||||
|
||||
dialog.buttons.addButton("$ok", () -> {
|
||||
dialog.buttons.button("$ok", () -> {
|
||||
Core.settings.put("uiscalechanged", false);
|
||||
settings.save();
|
||||
dialog.hide();
|
||||
@@ -494,7 +494,7 @@ public class Control implements ApplicationListener, Loadable{
|
||||
Time.update();
|
||||
}
|
||||
|
||||
if(!scene.hasDialog() && !scene.root.getChildren().isEmpty() && !(scene.root.getChildren().peek() instanceof Dialog) && Core.input.keyTap(KeyCode.BACK)){
|
||||
if(!scene.hasDialog() && !scene.root.getChildren().isEmpty() && !(scene.root.getChildren().peek() instanceof Dialog) && Core.input.keyTap(KeyCode.back)){
|
||||
platform.hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class Renderer implements ApplicationListener{
|
||||
public final LightRenderer lights = new LightRenderer();
|
||||
public final Pixelator pixelator = new Pixelator();
|
||||
|
||||
public FrameBuffer effectBuffer = new FrameBuffer(2, 2);
|
||||
public FrameBuffer effectBuffer = new FrameBuffer();
|
||||
private Bloom bloom;
|
||||
private FxProcessor fx = new FxProcessor();
|
||||
private Color clearColor = new Color(0f, 0f, 0f, 1f);
|
||||
@@ -181,91 +181,56 @@ public class Renderer implements ApplicationListener{
|
||||
|
||||
graphics.clear(clearColor);
|
||||
|
||||
if(!graphics.isHidden() && (Core.settings.getBool("animatedwater") || Core.settings.getBool("animatedshields")) && (effectBuffer.getWidth() != graphics.getWidth() || effectBuffer.getHeight() != graphics.getHeight())){
|
||||
//TODO 'animated water' is a bad name for this setting
|
||||
if(Core.settings.getBool("animatedwater") || Core.settings.getBool("animatedshields")){
|
||||
effectBuffer.resize(graphics.getWidth(), graphics.getHeight());
|
||||
}
|
||||
|
||||
Draw.proj(camera);
|
||||
|
||||
beginFx();
|
||||
|
||||
drawBackground();
|
||||
|
||||
blocks.floor.checkChanges();
|
||||
blocks.floor.drawFloor();
|
||||
|
||||
Groups.drawFloor();
|
||||
Groups.drawFloorOver();
|
||||
|
||||
blocks.processBlocks();
|
||||
blocks.drawShadows();
|
||||
Draw.color();
|
||||
|
||||
blocks.floor.beginDraw();
|
||||
blocks.floor.drawLayer(CacheLayer.walls);
|
||||
blocks.floor.endDraw();
|
||||
Draw.sort(true);
|
||||
|
||||
blocks.drawBlocks(Layer.block);
|
||||
if(state.rules.drawFog){
|
||||
blocks.drawFog();
|
||||
}
|
||||
//TODO fx
|
||||
|
||||
blocks.drawDestroyed();
|
||||
Draw.draw(Layer.background, this::drawBackground);
|
||||
Draw.draw(Layer.floor, blocks.floor::drawFloor);
|
||||
Draw.draw(Layer.block - 1, blocks::drawShadows);
|
||||
Draw.draw(Layer.block, () -> {
|
||||
blocks.floor.beginDraw();
|
||||
blocks.floor.drawLayer(CacheLayer.walls);
|
||||
blocks.floor.endDraw();
|
||||
});
|
||||
|
||||
Draw.shader(Shaders.blockbuild, true);
|
||||
blocks.drawBlocks(Layer.placement);
|
||||
Draw.shader();
|
||||
|
||||
blocks.drawBlocks(Layer.overlay);
|
||||
|
||||
Groups.drawGroundShadows();
|
||||
Groups.drawGroundUnder();
|
||||
Groups.drawGround();
|
||||
|
||||
blocks.drawBlocks(Layer.turret);
|
||||
|
||||
blocks.drawBlocks(Layer.power);
|
||||
blocks.drawBlocks(Layer.lights);
|
||||
|
||||
overlays.drawBottom();
|
||||
|
||||
Groups.drawFlyingShadows();
|
||||
|
||||
Groups.drawFlying();
|
||||
|
||||
Draw.flush();
|
||||
if(bloom != null){
|
||||
bloom.capture();
|
||||
}
|
||||
|
||||
Groups.drawBullets();
|
||||
Groups.drawEffects();
|
||||
|
||||
Draw.flush();
|
||||
if(bloom != null){
|
||||
bloom.render();
|
||||
}
|
||||
|
||||
Groups.drawOverlays();
|
||||
|
||||
overlays.drawTop();
|
||||
|
||||
Groups.drawWeather();
|
||||
|
||||
endFx();
|
||||
|
||||
if(!pixelator.enabled()){
|
||||
Groups.drawNames();
|
||||
}
|
||||
Draw.drawRange(Layer.blockBuilding, () -> Draw.shader(Shaders.blockbuild, false), Draw::shader);
|
||||
|
||||
if(state.rules.lighting){
|
||||
lights.draw();
|
||||
Draw.draw(Layer.light, lights::draw);
|
||||
}
|
||||
|
||||
drawLanding();
|
||||
if(state.rules.drawDarkness){
|
||||
Draw.draw(Layer.darkness, blocks::drawDarkness);
|
||||
}
|
||||
|
||||
Draw.color();
|
||||
if(bloom != null){
|
||||
Draw.draw(Layer.bullet - 0.001f, bloom::capture);
|
||||
Draw.draw(Layer.effect + 0.001f, bloom::render);
|
||||
}
|
||||
|
||||
Draw.draw(Layer.plans, overlays::drawBottom);
|
||||
Draw.draw(Layer.overlayUI, overlays::drawTop);
|
||||
Draw.draw(Layer.space, this::drawLanding);
|
||||
|
||||
blocks.drawBlocks();
|
||||
|
||||
Groups.draw.draw(Drawc::draw);
|
||||
|
||||
Draw.reset();
|
||||
Draw.flush();
|
||||
Draw.sort(false);
|
||||
|
||||
}
|
||||
|
||||
private void drawBackground(){
|
||||
@@ -322,8 +287,6 @@ public class Renderer implements ApplicationListener{
|
||||
}
|
||||
|
||||
public void takeMapScreenshot(){
|
||||
Groups.drawGroundShadows();
|
||||
|
||||
int w = world.width() * tilesize, h = world.height() * tilesize;
|
||||
int memory = w * h * 4 / 1024 / 1024;
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ public class UI implements ApplicationListener, Loadable{
|
||||
Core.scene.act();
|
||||
Core.scene.draw();
|
||||
|
||||
if(Core.input.keyTap(KeyCode.MOUSE_LEFT) && Core.scene.getKeyboardFocus() instanceof TextField){
|
||||
if(Core.input.keyTap(KeyCode.mouseLeft) && Core.scene.getKeyboardFocus() instanceof TextField){
|
||||
Element e = Core.scene.hit(Core.input.mouseX(), Core.input.mouseY(), true);
|
||||
if(!(e instanceof TextField)){
|
||||
Core.scene.setKeyboardFocus(null);
|
||||
@@ -249,23 +249,23 @@ public class UI implements ApplicationListener, Loadable{
|
||||
new Dialog(titleText){{
|
||||
cont.margin(30).add(dtext).padRight(6f);
|
||||
TextFieldFilter filter = inumeric ? TextFieldFilter.digitsOnly : (f, c) -> true;
|
||||
TextField field = cont.addField(def, t -> {}).size(330f, 50f).get();
|
||||
TextField field = cont.field(def, t -> {}).size(330f, 50f).get();
|
||||
field.setFilter((f, c) -> field.getText().length() < textLength && filter.acceptChar(f, c));
|
||||
buttons.defaults().size(120, 54).pad(4);
|
||||
buttons.addButton("$ok", () -> {
|
||||
buttons.button("$ok", () -> {
|
||||
confirmed.get(field.getText());
|
||||
hide();
|
||||
}).disabled(b -> field.getText().isEmpty());
|
||||
buttons.addButton("$cancel", this::hide);
|
||||
keyDown(KeyCode.ENTER, () -> {
|
||||
buttons.button("$cancel", this::hide);
|
||||
keyDown(KeyCode.enter, () -> {
|
||||
String text = field.getText();
|
||||
if(!text.isEmpty()){
|
||||
confirmed.get(text);
|
||||
hide();
|
||||
}
|
||||
});
|
||||
keyDown(KeyCode.ESCAPE, this::hide);
|
||||
keyDown(KeyCode.BACK, this::hide);
|
||||
keyDown(KeyCode.escape, this::hide);
|
||||
keyDown(KeyCode.back, this::hide);
|
||||
show();
|
||||
Core.scene.setKeyboardFocus(field);
|
||||
field.setCursorPosition(def.length());
|
||||
@@ -328,6 +328,7 @@ public class UI implements ApplicationListener, Loadable{
|
||||
Vec2 v = Core.camera.project(worldx, worldy);
|
||||
t.setPosition(v.x, v.y, Align.center);
|
||||
});
|
||||
table.act(0f);
|
||||
//make sure it's at the back
|
||||
Core.scene.root.addChildAt(0, table);
|
||||
}
|
||||
@@ -336,7 +337,7 @@ public class UI implements ApplicationListener, Loadable{
|
||||
new Dialog(""){{
|
||||
getCell(cont).growX();
|
||||
cont.margin(15).add(info).width(400f).wrap().get().setAlignment(Align.center, Align.center);
|
||||
buttons.addButton("$ok", this::hide).size(110, 50).pad(4);
|
||||
buttons.button("$ok", this::hide).size(110, 50).pad(4);
|
||||
}}.show();
|
||||
}
|
||||
|
||||
@@ -346,11 +347,11 @@ public class UI implements ApplicationListener, Loadable{
|
||||
cont.margin(15f);
|
||||
cont.add("$error.title");
|
||||
cont.row();
|
||||
cont.addImage().width(300f).pad(2).height(4f).color(Color.scarlet);
|
||||
cont.image().width(300f).pad(2).height(4f).color(Color.scarlet);
|
||||
cont.row();
|
||||
cont.add(text).pad(2f).growX().wrap().get().setAlignment(Align.center);
|
||||
cont.row();
|
||||
cont.addButton("$ok", this::hide).size(120, 50).pad(4);
|
||||
cont.button("$ok", this::hide).size(120, 50).pad(4);
|
||||
}}.show();
|
||||
}
|
||||
|
||||
@@ -367,15 +368,15 @@ public class UI implements ApplicationListener, Loadable{
|
||||
cont.margin(15);
|
||||
cont.add("$error.title").colspan(2);
|
||||
cont.row();
|
||||
cont.addImage().width(300f).pad(2).colspan(2).height(4f).color(Color.scarlet);
|
||||
cont.image().width(300f).pad(2).colspan(2).height(4f).color(Color.scarlet);
|
||||
cont.row();
|
||||
cont.add((text.startsWith("$") ? Core.bundle.get(text.substring(1)) : text) + (message == null ? "" : "\n[lightgray](" + message + ")")).colspan(2).wrap().growX().center().get().setAlignment(Align.center);
|
||||
cont.row();
|
||||
|
||||
Collapser col = new Collapser(base -> base.pane(t -> t.margin(14f).add(Strings.parseException(exc, true)).color(Color.lightGray).left()), true);
|
||||
|
||||
cont.addButton("$details", Styles.togglet, col::toggle).size(180f, 50f).checked(b -> !col.isCollapsed()).fillX().right();
|
||||
cont.addButton("$ok", this::hide).size(110, 50).fillX().left();
|
||||
cont.button("$details", Styles.togglet, col::toggle).size(180f, 50f).checked(b -> !col.isCollapsed()).fillX().right();
|
||||
cont.button("$ok", this::hide).size(110, 50).fillX().left();
|
||||
cont.row();
|
||||
cont.add(col).colspan(2).pad(2);
|
||||
}}.show();
|
||||
@@ -389,7 +390,7 @@ public class UI implements ApplicationListener, Loadable{
|
||||
cont.margin(15);
|
||||
cont.add("$error.title").colspan(2);
|
||||
cont.row();
|
||||
cont.addImage().width(300f).pad(2).colspan(2).height(4f).color(Color.scarlet);
|
||||
cont.image().width(300f).pad(2).colspan(2).height(4f).color(Color.scarlet);
|
||||
cont.row();
|
||||
cont.add(text).colspan(2).wrap().growX().center().get().setAlignment(Align.center);
|
||||
cont.row();
|
||||
@@ -401,14 +402,14 @@ public class UI implements ApplicationListener, Loadable{
|
||||
Collapser col = new Collapser(base -> base.pane(t -> t.margin(14f).add(details).color(Color.lightGray).left()), true);
|
||||
|
||||
cont.add(btext).right();
|
||||
cont.addButton("$details", Styles.togglet, col::toggle).size(180f, 50f).checked(b -> !col.isCollapsed()).fillX().left();
|
||||
cont.button("$details", Styles.togglet, col::toggle).size(180f, 50f).checked(b -> !col.isCollapsed()).fillX().left();
|
||||
cont.row();
|
||||
cont.add(col).colspan(2).pad(2);
|
||||
cont.row();
|
||||
}
|
||||
//}).colspan(2);
|
||||
|
||||
cont.addButton("$ok", this::hide).size(300, 50).fillX().colspan(2);
|
||||
cont.button("$ok", this::hide).size(300, 50).fillX().colspan(2);
|
||||
}}.show();
|
||||
}
|
||||
|
||||
@@ -419,18 +420,18 @@ public class UI implements ApplicationListener, Loadable{
|
||||
public void showText(String titleText, String text, int align){
|
||||
new Dialog(titleText){{
|
||||
cont.row();
|
||||
cont.addImage().width(400f).pad(2).colspan(2).height(4f).color(Pal.accent);
|
||||
cont.image().width(400f).pad(2).colspan(2).height(4f).color(Pal.accent);
|
||||
cont.row();
|
||||
cont.add(text).width(400f).wrap().get().setAlignment(align, align);
|
||||
cont.row();
|
||||
buttons.addButton("$ok", this::hide).size(110, 50).pad(4);
|
||||
buttons.button("$ok", this::hide).size(110, 50).pad(4);
|
||||
}}.show();
|
||||
}
|
||||
|
||||
public void showInfoText(String titleText, String text){
|
||||
new Dialog(titleText){{
|
||||
cont.margin(15).add(text).width(400f).wrap().left().get().setAlignment(Align.left, Align.left);
|
||||
buttons.addButton("$ok", this::hide).size(110, 50).pad(4);
|
||||
buttons.button("$ok", this::hide).size(110, 50).pad(4);
|
||||
}}.show();
|
||||
}
|
||||
|
||||
@@ -438,8 +439,8 @@ public class UI implements ApplicationListener, Loadable{
|
||||
new Dialog(titleText){{
|
||||
cont.margin(10).add(text);
|
||||
titleTable.row();
|
||||
titleTable.addImage().color(Pal.accent).height(3f).growX().pad(2f);
|
||||
buttons.addButton("$ok", this::hide).size(110, 50).pad(4);
|
||||
titleTable.image().color(Pal.accent).height(3f).growX().pad(2f);
|
||||
buttons.button("$ok", this::hide).size(110, 50).pad(4);
|
||||
}}.show();
|
||||
}
|
||||
|
||||
@@ -452,8 +453,8 @@ public class UI implements ApplicationListener, Loadable{
|
||||
dialog.cont.add(text).width(mobile ? 400f : 500f).wrap().pad(4f).get().setAlignment(Align.center, Align.center);
|
||||
dialog.buttons.defaults().size(200f, 54f).pad(2f);
|
||||
dialog.setFillParent(false);
|
||||
dialog.buttons.addButton("$cancel", dialog::hide);
|
||||
dialog.buttons.addButton("$ok", () -> {
|
||||
dialog.buttons.button("$cancel", dialog::hide);
|
||||
dialog.buttons.button("$ok", () -> {
|
||||
dialog.hide();
|
||||
confirmed.run();
|
||||
});
|
||||
@@ -464,8 +465,12 @@ public class UI implements ApplicationListener, Loadable{
|
||||
}
|
||||
});
|
||||
}
|
||||
dialog.keyDown(KeyCode.ESCAPE, dialog::hide);
|
||||
dialog.keyDown(KeyCode.BACK, dialog::hide);
|
||||
dialog.keyDown(KeyCode.enter, () -> {
|
||||
dialog.hide();
|
||||
confirmed.run();
|
||||
});
|
||||
dialog.keyDown(KeyCode.escape, dialog::hide);
|
||||
dialog.keyDown(KeyCode.back, dialog::hide);
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
@@ -474,16 +479,16 @@ public class UI implements ApplicationListener, Loadable{
|
||||
dialog.cont.add(text).width(mobile ? 400f : 500f).wrap().pad(4f).get().setAlignment(Align.center, Align.center);
|
||||
dialog.buttons.defaults().size(200f, 54f).pad(2f);
|
||||
dialog.setFillParent(false);
|
||||
dialog.buttons.addButton(no, () -> {
|
||||
dialog.buttons.button(no, () -> {
|
||||
dialog.hide();
|
||||
denied.run();
|
||||
});
|
||||
dialog.buttons.addButton(yes, () -> {
|
||||
dialog.buttons.button(yes, () -> {
|
||||
dialog.hide();
|
||||
confirmed.run();
|
||||
});
|
||||
dialog.keyDown(KeyCode.ESCAPE, dialog::hide);
|
||||
dialog.keyDown(KeyCode.BACK, dialog::hide);
|
||||
dialog.keyDown(KeyCode.escape, dialog::hide);
|
||||
dialog.keyDown(KeyCode.back, dialog::hide);
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
@@ -492,7 +497,7 @@ public class UI implements ApplicationListener, Loadable{
|
||||
dialog.cont.add(text).width(500f).wrap().pad(4f).get().setAlignment(Align.center, Align.center);
|
||||
dialog.buttons.defaults().size(200f, 54f).pad(2f);
|
||||
dialog.setFillParent(false);
|
||||
dialog.buttons.addButton("$ok", () -> {
|
||||
dialog.buttons.button("$ok", () -> {
|
||||
dialog.hide();
|
||||
confirmed.run();
|
||||
});
|
||||
|
||||
@@ -66,28 +66,28 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
menu.cont.table(t -> {
|
||||
t.defaults().size(swidth, 60f).padBottom(5).padRight(5).padLeft(5);
|
||||
|
||||
t.addImageTextButton("$editor.savemap", Icon.save, this::save);
|
||||
t.button("$editor.savemap", Icon.save, this::save);
|
||||
|
||||
t.addImageTextButton("$editor.mapinfo", Icon.pencil, () -> {
|
||||
t.button("$editor.mapinfo", Icon.pencil, () -> {
|
||||
infoDialog.show();
|
||||
menu.hide();
|
||||
});
|
||||
|
||||
t.row();
|
||||
|
||||
t.addImageTextButton("$editor.generate", Icon.terrain, () -> {
|
||||
t.button("$editor.generate", Icon.terrain, () -> {
|
||||
generateDialog.show(generateDialog::applyToEditor);
|
||||
menu.hide();
|
||||
});
|
||||
|
||||
t.addImageTextButton("$editor.resize", Icon.resize, () -> {
|
||||
t.button("$editor.resize", Icon.resize, () -> {
|
||||
resizeDialog.show();
|
||||
menu.hide();
|
||||
});
|
||||
|
||||
t.row();
|
||||
|
||||
t.addImageTextButton("$editor.import", Icon.download, () -> createDialog("$editor.import",
|
||||
t.button("$editor.import", Icon.download, () -> createDialog("$editor.import",
|
||||
"$editor.importmap", "$editor.importmap.description", Icon.download, (Runnable)loadDialog::show,
|
||||
"$editor.importfile", "$editor.importfile.description", Icon.file, (Runnable)() ->
|
||||
platform.showFileChooser(true, mapExtension, file -> ui.loadAnd(() -> {
|
||||
@@ -114,7 +114,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
})))
|
||||
);
|
||||
|
||||
t.addImageTextButton("$editor.export", Icon.upload, () -> createDialog("$editor.export",
|
||||
t.button("$editor.export", Icon.upload, () -> createDialog("$editor.export",
|
||||
"$editor.exportfile", "$editor.exportfile.description", Icon.file,
|
||||
(Runnable)() -> platform.export(editor.getTags().get("name", "unknown"), mapExtension, file -> MapIO.writeMap(file, editor.createMap(file))),
|
||||
"$editor.exportimage", "$editor.exportimage.description", Icon.fileImage,
|
||||
@@ -128,7 +128,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
menu.cont.row();
|
||||
|
||||
if(steam){
|
||||
menu.cont.addImageTextButton("$editor.publish.workshop", Icon.link, () -> {
|
||||
menu.cont.button("$editor.publish.workshop", Icon.link, () -> {
|
||||
Map builtin = maps.all().find(m -> m.name().equals(editor.getTags().get("name", "").trim()));
|
||||
|
||||
if(editor.getTags().containsKey("steamid") && builtin != null && !builtin.custom){
|
||||
@@ -161,11 +161,11 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
menu.cont.row();
|
||||
}
|
||||
|
||||
menu.cont.addImageTextButton("$editor.ingame", Icon.right, this::playtest).padTop(!steam ? -3 : 1).size(swidth * 2f + 10, 60f);
|
||||
menu.cont.button("$editor.ingame", Icon.right, this::playtest).padTop(!steam ? -3 : 1).size(swidth * 2f + 10, 60f);
|
||||
|
||||
menu.cont.row();
|
||||
|
||||
menu.cont.addImageTextButton("$quit", Icon.exit, () -> {
|
||||
menu.cont.button("$quit", Icon.exit, () -> {
|
||||
tryExit();
|
||||
menu.hide();
|
||||
}).size(swidth * 2f + 10, 60f);
|
||||
@@ -321,14 +321,14 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
Drawable iconname = (Drawable)arguments[i + 2];
|
||||
Runnable listenable = (Runnable)arguments[i + 3];
|
||||
|
||||
TextButton button = dialog.cont.addButton(name, () -> {
|
||||
TextButton button = dialog.cont.button(name, () -> {
|
||||
listenable.run();
|
||||
dialog.hide();
|
||||
menu.hide();
|
||||
}).left().margin(0).get();
|
||||
|
||||
button.clearChildren();
|
||||
button.addImage(iconname).padLeft(10);
|
||||
button.image(iconname).padLeft(10);
|
||||
button.table(t -> {
|
||||
t.add(name).growX().wrap();
|
||||
t.row();
|
||||
@@ -419,7 +419,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
button.clicked(l -> {
|
||||
if(!mobile){
|
||||
//desktop: rightclick
|
||||
l.setButton(KeyCode.MOUSE_RIGHT);
|
||||
l.setButton(KeyCode.mouseRight);
|
||||
}
|
||||
}, e -> {
|
||||
//need to double tap
|
||||
@@ -438,7 +438,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
int mode = i;
|
||||
String name = tool.altModes[i];
|
||||
|
||||
table.addButton(b -> {
|
||||
table.button(b -> {
|
||||
b.left();
|
||||
b.marginLeft(6);
|
||||
b.setStyle(Styles.clearTogglet);
|
||||
@@ -481,16 +481,16 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
|
||||
tools.defaults().size(size, size);
|
||||
|
||||
tools.addImageButton(Icon.menu, Styles.cleari, menu::show);
|
||||
tools.button(Icon.menu, Styles.cleari, menu::show);
|
||||
|
||||
ImageButton grid = tools.addImageButton(Icon.grid, Styles.clearTogglei, () -> view.setGrid(!view.isGrid())).get();
|
||||
ImageButton grid = tools.button(Icon.grid, Styles.clearTogglei, () -> view.setGrid(!view.isGrid())).get();
|
||||
|
||||
addTool.get(EditorTool.zoom);
|
||||
|
||||
tools.row();
|
||||
|
||||
ImageButton undo = tools.addImageButton(Icon.undo, Styles.cleari, editor::undo).get();
|
||||
ImageButton redo = tools.addImageButton(Icon.redo, Styles.cleari, editor::redo).get();
|
||||
ImageButton undo = tools.button(Icon.undo, Styles.cleari, editor::undo).get();
|
||||
ImageButton redo = tools.button(Icon.redo, Styles.cleari, editor::redo).get();
|
||||
|
||||
addTool.get(EditorTool.pick);
|
||||
|
||||
@@ -512,7 +512,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
addTool.get(EditorTool.fill);
|
||||
addTool.get(EditorTool.spray);
|
||||
|
||||
ImageButton rotate = tools.addImageButton(Icon.right, Styles.cleari, () -> editor.rotation = (editor.rotation + 1) % 4).get();
|
||||
ImageButton rotate = tools.button(Icon.right, Styles.cleari, () -> editor.rotation = (editor.rotation + 1) % 4).get();
|
||||
rotate.getImage().update(() -> {
|
||||
rotate.getImage().setRotation(editor.rotation * 90);
|
||||
rotate.getImage().setOrigin(Align.center);
|
||||
@@ -576,14 +576,14 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
if(Core.input.ctrl()){
|
||||
//alt mode select
|
||||
for(int i = 0; i < view.getTool().altModes.length + 1; i++){
|
||||
if(Core.input.keyTap(KeyCode.valueOf("NUM_" + (i + 1)))){
|
||||
if(Core.input.keyTap(KeyCode.valueOf("num" + (i + 1)))){
|
||||
view.getTool().mode = i - 1;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
//tool select
|
||||
for(int i = 0; i < EditorTool.values().length; i++){
|
||||
if(Core.input.keyTap(KeyCode.valueOf("NUM_" + (i + 1)))){
|
||||
if(Core.input.keyTap(KeyCode.valueOf("num" + (i + 1)))){
|
||||
view.setTool(EditorTool.values()[i]);
|
||||
break;
|
||||
}
|
||||
@@ -591,28 +591,28 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
}
|
||||
|
||||
|
||||
if(Core.input.keyTap(KeyCode.ESCAPE)){
|
||||
if(Core.input.keyTap(KeyCode.escape)){
|
||||
if(!menu.isShown()){
|
||||
menu.show();
|
||||
}
|
||||
}
|
||||
|
||||
if(Core.input.keyTap(KeyCode.R)){
|
||||
if(Core.input.keyTap(KeyCode.r)){
|
||||
editor.rotation = Mathf.mod(editor.rotation + 1, 4);
|
||||
}
|
||||
|
||||
if(Core.input.keyTap(KeyCode.E)){
|
||||
if(Core.input.keyTap(KeyCode.e)){
|
||||
editor.rotation = Mathf.mod(editor.rotation - 1, 4);
|
||||
}
|
||||
|
||||
//ctrl keys (undo, redo, save)
|
||||
if(Core.input.ctrl()){
|
||||
if(Core.input.keyTap(KeyCode.Z)){
|
||||
if(Core.input.keyTap(KeyCode.z)){
|
||||
editor.undo();
|
||||
}
|
||||
|
||||
//more undocumented features, fantastic
|
||||
if(Core.input.keyTap(KeyCode.T)){
|
||||
if(Core.input.keyTap(KeyCode.t)){
|
||||
|
||||
//clears all 'decoration' from the map
|
||||
for(int x = 0; x < editor.width(); x++){
|
||||
@@ -633,15 +633,15 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
editor.flushOp();
|
||||
}
|
||||
|
||||
if(Core.input.keyTap(KeyCode.Y)){
|
||||
if(Core.input.keyTap(KeyCode.y)){
|
||||
editor.redo();
|
||||
}
|
||||
|
||||
if(Core.input.keyTap(KeyCode.S)){
|
||||
if(Core.input.keyTap(KeyCode.s)){
|
||||
save();
|
||||
}
|
||||
|
||||
if(Core.input.keyTap(KeyCode.G)){
|
||||
if(Core.input.keyTap(KeyCode.g)){
|
||||
view.setGrid(!view.isGrid());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,27 +66,27 @@ public class MapGenerateDialog extends FloatingDialog{
|
||||
shown(this::setup);
|
||||
addCloseButton();
|
||||
if(applied){
|
||||
buttons.addButton("$editor.apply", () -> {
|
||||
buttons.button("$editor.apply", () -> {
|
||||
ui.loadAnd(() -> {
|
||||
apply();
|
||||
hide();
|
||||
});
|
||||
}).size(160f, 64f);
|
||||
}else{
|
||||
buttons.addButton("$settings.reset", () -> {
|
||||
buttons.button("$settings.reset", () -> {
|
||||
filters.set(maps.readFilters(""));
|
||||
rebuildFilters();
|
||||
update();
|
||||
}).size(160f, 64f);
|
||||
}
|
||||
buttons.addButton("$editor.randomize", () -> {
|
||||
buttons.button("$editor.randomize", () -> {
|
||||
for(GenerateFilter filter : filters){
|
||||
filter.randomize();
|
||||
}
|
||||
update();
|
||||
}).size(160f, 64f);
|
||||
|
||||
buttons.addImageTextButton("$add", Icon.add, this::showAdd).height(64f).width(140f);
|
||||
buttons.button("$add", Icon.add, this::showAdd).height(64f).width(140f);
|
||||
|
||||
if(!applied){
|
||||
hidden(this::apply);
|
||||
@@ -234,24 +234,24 @@ public class MapGenerateDialog extends FloatingDialog{
|
||||
t.table(b -> {
|
||||
ImageButtonStyle style = Styles.cleari;
|
||||
b.defaults().size(50f);
|
||||
b.addImageButton(Icon.refresh, style, () -> {
|
||||
b.button(Icon.refresh, style, () -> {
|
||||
filter.randomize();
|
||||
update();
|
||||
});
|
||||
|
||||
b.addImageButton(Icon.upOpen, style, () -> {
|
||||
b.button(Icon.upOpen, style, () -> {
|
||||
int idx = filters.indexOf(filter);
|
||||
filters.swap(idx, Math.max(0, idx - 1));
|
||||
rebuildFilters();
|
||||
update();
|
||||
});
|
||||
b.addImageButton(Icon.downOpen, style, () -> {
|
||||
b.button(Icon.downOpen, style, () -> {
|
||||
int idx = filters.indexOf(filter);
|
||||
filters.swap(idx, Math.min(filters.size - 1, idx + 1));
|
||||
rebuildFilters();
|
||||
update();
|
||||
});
|
||||
b.addImageButton(Icon.trash, style, () -> {
|
||||
b.button(Icon.trash, style, () -> {
|
||||
filters.remove(filter);
|
||||
rebuildFilters();
|
||||
update();
|
||||
@@ -293,7 +293,7 @@ public class MapGenerateDialog extends FloatingDialog{
|
||||
|
||||
if((!applied && filter.isBuffered()) || (filter.isPost() && applied)) continue;
|
||||
|
||||
selection.cont.addButton(filter.name(), () -> {
|
||||
selection.cont.button(filter.name(), () -> {
|
||||
filters.add(filter);
|
||||
rebuildFilters();
|
||||
update();
|
||||
@@ -302,7 +302,7 @@ public class MapGenerateDialog extends FloatingDialog{
|
||||
if(++i % 2 == 0) selection.cont.row();
|
||||
}
|
||||
|
||||
selection.cont.addButton("$filter.defaultores", () -> {
|
||||
selection.cont.button("$filter.defaultores", () -> {
|
||||
maps.addDefaultOres(filters);
|
||||
rebuildFilters();
|
||||
update();
|
||||
|
||||
@@ -35,7 +35,7 @@ public class MapInfoDialog extends FloatingDialog{
|
||||
t.add("$editor.mapname").padRight(8).left();
|
||||
t.defaults().padTop(15);
|
||||
|
||||
TextField name = t.addField(tags.get("name", ""), text -> {
|
||||
TextField name = t.field(tags.get("name", ""), text -> {
|
||||
tags.put("name", text);
|
||||
}).size(400, 55f).get();
|
||||
name.setMessageText("$unknown");
|
||||
@@ -43,14 +43,14 @@ public class MapInfoDialog extends FloatingDialog{
|
||||
t.row();
|
||||
t.add("$editor.description").padRight(8).left();
|
||||
|
||||
TextArea description = t.addArea(tags.get("description", ""), Styles.areaField, text -> {
|
||||
TextArea description = t.area(tags.get("description", ""), Styles.areaField, text -> {
|
||||
tags.put("description", text);
|
||||
}).size(400f, 140f).get();
|
||||
|
||||
t.row();
|
||||
t.add("$editor.author").padRight(8).left();
|
||||
|
||||
TextField author = t.addField(tags.get("author", Core.settings.getString("mapAuthor", "")), text -> {
|
||||
TextField author = t.field(tags.get("author", Core.settings.getString("mapAuthor", "")), text -> {
|
||||
tags.put("author", text);
|
||||
Core.settings.put("mapAuthor", text);
|
||||
Core.settings.save();
|
||||
@@ -59,21 +59,21 @@ public class MapInfoDialog extends FloatingDialog{
|
||||
|
||||
t.row();
|
||||
t.add("$editor.rules").padRight(8).left();
|
||||
t.addButton("$edit", () -> {
|
||||
t.button("$edit", () -> {
|
||||
ruleInfo.show(Vars.state.rules, () -> Vars.state.rules = new Rules());
|
||||
hide();
|
||||
}).left().width(200f);
|
||||
|
||||
t.row();
|
||||
t.add("$editor.waves").padRight(8).left();
|
||||
t.addButton("$edit", () -> {
|
||||
t.button("$edit", () -> {
|
||||
waveInfo.show();
|
||||
hide();
|
||||
}).left().width(200f);
|
||||
|
||||
t.row();
|
||||
t.add("$editor.generation").padRight(8).left();
|
||||
t.addButton("$edit", () -> {
|
||||
t.button("$edit", () -> {
|
||||
generate.show(Vars.maps.readFilters(editor.getTags().get("genfilters", "")),
|
||||
filters -> editor.getTags().put("genfilters", JsonIO.write(filters)));
|
||||
hide();
|
||||
|
||||
@@ -28,7 +28,7 @@ public class MapLoadDialog extends FloatingDialog{
|
||||
});
|
||||
|
||||
buttons.defaults().size(200f, 50f);
|
||||
buttons.addButton("$cancel", this::hide);
|
||||
buttons.button("$cancel", this::hide);
|
||||
buttons.add(button);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ public class MapResizeDialog extends FloatingDialog{
|
||||
for(boolean w : Mathf.booleans){
|
||||
table.add(w ? "$width" : "$height").padRight(8f);
|
||||
table.defaults().height(60f).padTop(8);
|
||||
table.addButton("<", () -> {
|
||||
table.button("<", () -> {
|
||||
if(w)
|
||||
width = move(width, -1);
|
||||
else
|
||||
@@ -31,7 +31,7 @@ public class MapResizeDialog extends FloatingDialog{
|
||||
|
||||
table.table(Tex.button, t -> t.label(() -> (w ? width : height) + "")).width(200);
|
||||
|
||||
table.addButton(">", () -> {
|
||||
table.button(">", () -> {
|
||||
if(w)
|
||||
width = move(width, 1);
|
||||
else
|
||||
@@ -45,8 +45,8 @@ public class MapResizeDialog extends FloatingDialog{
|
||||
});
|
||||
|
||||
buttons.defaults().size(200f, 50f);
|
||||
buttons.addButton("$cancel", this::hide);
|
||||
buttons.addButton("$ok", () -> {
|
||||
buttons.button("$cancel", this::hide);
|
||||
buttons.button("$ok", () -> {
|
||||
cons.get(width, height);
|
||||
hide();
|
||||
});
|
||||
|
||||
@@ -38,7 +38,7 @@ public class MapSaveDialog extends FloatingDialog{
|
||||
});
|
||||
|
||||
buttons.defaults().size(200f, 50f).pad(2f);
|
||||
buttons.addButton("$cancel", this::hide);
|
||||
buttons.button("$cancel", this::hide);
|
||||
|
||||
TextButton button = new TextButton("$save");
|
||||
button.clicked(() -> {
|
||||
|
||||
@@ -72,11 +72,11 @@ public class MapView extends Element implements GestureListener{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!mobile && button != KeyCode.MOUSE_LEFT && button != KeyCode.MOUSE_MIDDLE){
|
||||
if(!mobile && button != KeyCode.mouseLeft && button != KeyCode.mouseMiddle){
|
||||
return true;
|
||||
}
|
||||
|
||||
if(button == KeyCode.MOUSE_MIDDLE){
|
||||
if(button == KeyCode.mouseMiddle){
|
||||
lastTool = tool;
|
||||
tool = EditorTool.zoom;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public class MapView extends Element implements GestureListener{
|
||||
|
||||
@Override
|
||||
public void touchUp(InputEvent event, float x, float y, int pointer, KeyCode button){
|
||||
if(!mobile && button != KeyCode.MOUSE_LEFT && button != KeyCode.MOUSE_MIDDLE){
|
||||
if(!mobile && button != KeyCode.mouseLeft && button != KeyCode.mouseMiddle){
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ public class MapView extends Element implements GestureListener{
|
||||
|
||||
editor.flushOp();
|
||||
|
||||
if(button == KeyCode.MOUSE_MIDDLE && lastTool != null){
|
||||
if(button == KeyCode.mouseMiddle && lastTool != null){
|
||||
tool = lastTool;
|
||||
lastTool = null;
|
||||
}
|
||||
@@ -172,26 +172,26 @@ public class MapView extends Element implements GestureListener{
|
||||
public void act(float delta){
|
||||
super.act(delta);
|
||||
|
||||
if(Core.scene.getKeyboardFocus() == null || !(Core.scene.getKeyboardFocus() instanceof TextField) && !Core.input.keyDown(KeyCode.CONTROL_LEFT)){
|
||||
if(Core.scene.getKeyboardFocus() == null || !(Core.scene.getKeyboardFocus() instanceof TextField) && !Core.input.keyDown(KeyCode.controlLeft)){
|
||||
float ax = Core.input.axis(Binding.move_x);
|
||||
float ay = Core.input.axis(Binding.move_y);
|
||||
offsetx -= ax * 15f / zoom;
|
||||
offsety -= ay * 15f / zoom;
|
||||
}
|
||||
|
||||
if(Core.input.keyTap(KeyCode.SHIFT_LEFT)){
|
||||
if(Core.input.keyTap(KeyCode.shiftLeft)){
|
||||
lastTool = tool;
|
||||
tool = EditorTool.pick;
|
||||
}
|
||||
|
||||
if(Core.input.keyRelease(KeyCode.SHIFT_LEFT) && lastTool != null){
|
||||
if(Core.input.keyRelease(KeyCode.shiftLeft) && lastTool != null){
|
||||
tool = lastTool;
|
||||
lastTool = null;
|
||||
}
|
||||
|
||||
if(Core.scene.getScrollFocus() != this) return;
|
||||
|
||||
zoom += Core.input.axis(KeyCode.SCROLL) / 10f * zoom;
|
||||
zoom += Core.input.axis(KeyCode.scroll) / 10f * zoom;
|
||||
clampZoom();
|
||||
}
|
||||
|
||||
|
||||
@@ -42,24 +42,24 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
});
|
||||
|
||||
keyDown(key -> {
|
||||
if(key == KeyCode.ESCAPE || key == KeyCode.BACK){
|
||||
if(key == KeyCode.escape || key == KeyCode.back){
|
||||
Core.app.post(this::hide);
|
||||
}
|
||||
});
|
||||
|
||||
addCloseButton();
|
||||
buttons.addButton("$waves.edit", () -> {
|
||||
buttons.button("$waves.edit", () -> {
|
||||
FloatingDialog dialog = new FloatingDialog("$waves.edit");
|
||||
dialog.addCloseButton();
|
||||
dialog.setFillParent(false);
|
||||
dialog.cont.defaults().size(210f, 64f);
|
||||
dialog.cont.addButton("$waves.copy", () -> {
|
||||
dialog.cont.button("$waves.copy", () -> {
|
||||
ui.showInfoFade("$waves.copied");
|
||||
Core.app.setClipboardText(maps.writeWaves(groups));
|
||||
dialog.hide();
|
||||
}).disabled(b -> groups == null);
|
||||
dialog.cont.row();
|
||||
dialog.cont.addButton("$waves.load", () -> {
|
||||
dialog.cont.button("$waves.load", () -> {
|
||||
try{
|
||||
groups = maps.readWaves(Core.app.getClipboardText());
|
||||
buildGroups();
|
||||
@@ -70,7 +70,7 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
dialog.hide();
|
||||
}).disabled(b -> Core.app.getClipboardText() == null || Core.app.getClipboardText().isEmpty());
|
||||
dialog.cont.row();
|
||||
dialog.cont.addButton("$settings.reset", () -> ui.showConfirm("$confirm", "$settings.clear.confirm", () -> {
|
||||
dialog.cont.button("$settings.reset", () -> ui.showConfirm("$confirm", "$settings.clear.confirm", () -> {
|
||||
groups = JsonIO.copy(defaultWaves.get());
|
||||
buildGroups();
|
||||
dialog.hide();
|
||||
@@ -86,7 +86,7 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
cont.stack(new Table(Tex.clear, main -> {
|
||||
main.pane(t -> table = t).growX().growY().padRight(8f).get().setScrollingDisabled(true, false);
|
||||
main.row();
|
||||
main.addButton("$add", () -> {
|
||||
main.button("$add", () -> {
|
||||
if(groups == null) groups = new Array<>();
|
||||
groups.add(new SpawnGroup(lastType));
|
||||
buildGroups();
|
||||
@@ -101,7 +101,7 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
cont.table(Tex.clear, m -> {
|
||||
m.add("$waves.preview").color(Color.lightGray).growX().center().get().setAlignment(Align.center, Align.center);
|
||||
m.row();
|
||||
m.addButton("-", () -> {
|
||||
m.button("-", () -> {
|
||||
}).update(t -> {
|
||||
if(t.getClickListener().isPressed()){
|
||||
updateTimer += Time.delta();
|
||||
@@ -115,7 +115,7 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
m.row();
|
||||
m.pane(t -> preview = t).grow().get().setScrollingDisabled(true, true);
|
||||
m.row();
|
||||
m.addButton("+", () -> {
|
||||
m.button("+", () -> {
|
||||
}).update(t -> {
|
||||
if(t.getClickListener().isPressed()){
|
||||
updateTimer += Time.delta();
|
||||
@@ -140,22 +140,22 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
for(SpawnGroup group : groups){
|
||||
table.table(Tex.button, t -> {
|
||||
t.margin(0).defaults().pad(3).padLeft(5f).growX().left();
|
||||
t.addButton(b -> {
|
||||
t.button(b -> {
|
||||
b.left();
|
||||
b.addImage(group.type.icon(mindustry.ui.Cicon.medium)).size(32f).padRight(3);
|
||||
b.image(group.type.icon(mindustry.ui.Cicon.medium)).size(32f).padRight(3);
|
||||
b.add(group.type.localizedName).color(Pal.accent);
|
||||
}, () -> showUpdate(group)).pad(-6f).padBottom(0f);
|
||||
|
||||
t.row();
|
||||
t.table(spawns -> {
|
||||
spawns.addField("" + (group.begin + 1), TextFieldFilter.digitsOnly, text -> {
|
||||
spawns.field("" + (group.begin + 1), TextFieldFilter.digitsOnly, text -> {
|
||||
if(Strings.canParsePostiveInt(text)){
|
||||
group.begin = Strings.parseInt(text) - 1;
|
||||
updateWaves();
|
||||
}
|
||||
}).width(100f);
|
||||
spawns.add("$waves.to").padLeft(4).padRight(4);
|
||||
spawns.addField(group.end == never ? "" : (group.end + 1) + "", TextFieldFilter.digitsOnly, text -> {
|
||||
spawns.field(group.end == never ? "" : (group.end + 1) + "", TextFieldFilter.digitsOnly, text -> {
|
||||
if(Strings.canParsePostiveInt(text)){
|
||||
group.end = Strings.parseInt(text) - 1;
|
||||
updateWaves();
|
||||
@@ -168,7 +168,7 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
t.row();
|
||||
t.table(p -> {
|
||||
p.add("$waves.every").padRight(4);
|
||||
p.addField(group.spacing + "", TextFieldFilter.digitsOnly, text -> {
|
||||
p.field(group.spacing + "", TextFieldFilter.digitsOnly, text -> {
|
||||
if(Strings.canParsePostiveInt(text) && Strings.parseInt(text) > 0){
|
||||
group.spacing = Strings.parseInt(text);
|
||||
updateWaves();
|
||||
@@ -179,7 +179,7 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
|
||||
t.row();
|
||||
t.table(a -> {
|
||||
a.addField(group.unitAmount + "", TextFieldFilter.digitsOnly, text -> {
|
||||
a.field(group.unitAmount + "", TextFieldFilter.digitsOnly, text -> {
|
||||
if(Strings.canParsePostiveInt(text)){
|
||||
group.unitAmount = Strings.parseInt(text);
|
||||
updateWaves();
|
||||
@@ -187,7 +187,7 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
}).width(80f);
|
||||
|
||||
a.add(" + ");
|
||||
a.addField(Strings.fixed(Math.max((Mathf.zero(group.unitScaling) ? 0 : 1f / group.unitScaling), 0), 2), TextFieldFilter.floatsOnly, text -> {
|
||||
a.field(Strings.fixed(Math.max((Mathf.zero(group.unitScaling) ? 0 : 1f / group.unitScaling), 0), 2), TextFieldFilter.floatsOnly, text -> {
|
||||
if(Strings.canParsePositiveFloat(text)){
|
||||
group.unitScaling = 1f / Strings.parseFloat(text);
|
||||
updateWaves();
|
||||
@@ -197,10 +197,10 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
});
|
||||
|
||||
t.row();
|
||||
t.addCheck("$waves.boss", b -> group.effect = (b ? StatusEffects.boss : null)).padTop(4).update(b -> b.setChecked(group.effect == StatusEffects.boss));
|
||||
t.check("$waves.boss", b -> group.effect = (b ? StatusEffects.boss : null)).padTop(4).update(b -> b.setChecked(group.effect == StatusEffects.boss));
|
||||
|
||||
t.row();
|
||||
t.addButton("$waves.remove", () -> {
|
||||
t.button("$waves.remove", () -> {
|
||||
groups.remove(group);
|
||||
table.getCell(t).pad(0f);
|
||||
t.remove();
|
||||
@@ -222,9 +222,9 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
dialog.cont.pane(p -> {
|
||||
int i = 0;
|
||||
for(UnitType type : content.units()){
|
||||
p.addButton(t -> {
|
||||
p.button(t -> {
|
||||
t.left();
|
||||
t.addImage(type.icon(mindustry.ui.Cicon.medium)).size(40f).padRight(2f);
|
||||
t.image(type.icon(mindustry.ui.Cicon.medium)).size(40f).padRight(2f);
|
||||
t.add(type.localizedName);
|
||||
}, () -> {
|
||||
lastType = type;
|
||||
@@ -257,7 +257,7 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
for(int j = 0; j < spawned.length; j++){
|
||||
if(spawned[j] > 0){
|
||||
UnitType type = content.getByID(ContentType.unit, j);
|
||||
table.addImage(type.icon(Cicon.medium)).size(8f * 4f).padRight(4);
|
||||
table.image(type.icon(Cicon.medium)).size(8f * 4f).padRight(4);
|
||||
table.add(spawned[j] + "x").color(Color.lightGray).padRight(6);
|
||||
table.row();
|
||||
}
|
||||
|
||||
@@ -34,4 +34,9 @@ class AllDefs{
|
||||
class sync{
|
||||
|
||||
}
|
||||
|
||||
@GroupDef(Drawc.class)
|
||||
class draw{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class Effects{
|
||||
Rect pos = Tmp.r2.setSize(effect.size).setCenter(x, y);
|
||||
|
||||
if(view.overlaps(pos)){
|
||||
Effectc entity = effect.ground ? GroundEffectEntity.create() : StandardEffectEntity.create();
|
||||
Effectc entity = EffectEntity.create();
|
||||
entity.effect(effect);
|
||||
entity.rotation(rotation);
|
||||
entity.data(data);
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
@Component
|
||||
abstract class BuilderComp implements Unitc, DrawLayerFlyingc{
|
||||
abstract class BuilderComp implements Unitc{
|
||||
static final Vec2[] vecs = new Vec2[]{new Vec2(), new Vec2(), new Vec2(), new Vec2()};
|
||||
|
||||
@Import float x, y, rotation;
|
||||
@@ -197,8 +197,12 @@ abstract class BuilderComp implements Unitc, DrawLayerFlyingc{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFlying(){
|
||||
public void draw(){
|
||||
if(!isBuilding()) return;
|
||||
|
||||
//TODO check correctness
|
||||
Draw.z(Layer.flyingUnit);
|
||||
|
||||
BuildRequest request = buildRequest();
|
||||
Tile tile = world.tile(request.x, request.y);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package mindustry.entities.def;
|
||||
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import arc.util.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
@@ -11,7 +12,7 @@ import static mindustry.Vars.*;
|
||||
|
||||
@EntityDef(value = {Bulletc.class}, pooled = true)
|
||||
@Component
|
||||
abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Drawc, Shielderc, Ownerc, Velc, Bulletc, Timerc, DrawLayerBulletsc{
|
||||
abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Drawc, Shielderc, Ownerc, Velc, Bulletc, Timerc{
|
||||
Object data;
|
||||
BulletType type;
|
||||
float damage;
|
||||
@@ -109,6 +110,8 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
|
||||
|
||||
@Override
|
||||
public void draw(){
|
||||
Draw.z(Layer.bullet);
|
||||
|
||||
type.draw(this);
|
||||
//TODO refactor
|
||||
renderer.lights.add(x(), y(), 16f, Pal.powerLight, 0.3f);
|
||||
|
||||
@@ -8,14 +8,14 @@ import mindustry.gen.*;
|
||||
|
||||
@EntityDef(value = {Decalc.class}, pooled = true)
|
||||
@Component
|
||||
abstract class DecalComp implements Drawc, Timedc, Rotc, Posc, DrawLayerFloorc{
|
||||
abstract class DecalComp implements Drawc, Timedc, Rotc, Posc{
|
||||
@Import float x, y, rotation;
|
||||
|
||||
Color color = new Color(1, 1, 1, 1);
|
||||
TextureRegion region;
|
||||
|
||||
@Override
|
||||
public void drawFloor(){
|
||||
public void draw(){
|
||||
Draw.color(color);
|
||||
Draw.alpha(1f - Mathf.curve(fin(), 0.98f));
|
||||
Draw.rect(region, x, y, rotation);
|
||||
|
||||
@@ -6,4 +6,8 @@ import mindustry.gen.*;
|
||||
@Component
|
||||
abstract class DrawComp implements Posc{
|
||||
abstract float clipSize();
|
||||
|
||||
void draw(){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
package mindustry.entities.def;
|
||||
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
|
||||
@EntityDef(value = {Effectc.class, Childc.class}, pooled = true)
|
||||
@Component
|
||||
abstract class EffectComp implements Posc, Drawc, Timedc, Rotc, Childc{
|
||||
Color color = new Color(Color.white);
|
||||
Effect effect;
|
||||
Object data;
|
||||
|
||||
void draw(){
|
||||
@Override
|
||||
public void draw(){
|
||||
Draw.z(Layer.effect);
|
||||
effect.render(id(), color, time(), rotation(), x(), y(), data);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package mindustry.entities.def;
|
||||
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.gen.*;
|
||||
|
||||
@EntityDef(value = {GroundEffectc.class, Childc.class}, pooled = true)
|
||||
@Component
|
||||
abstract class GroundEffectComp implements Effectc, DrawLayerFloorOverc{
|
||||
|
||||
@Override
|
||||
public void drawFloorOver(){
|
||||
draw();
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import mindustry.annotations.Annotations.*;
|
||||
import mindustry.gen.*;
|
||||
|
||||
@Component
|
||||
abstract class LegsComp implements Posc, Flyingc, Hitboxc, DrawLayerGroundUnderc, Unitc, Legsc, ElevationMovec{
|
||||
abstract class LegsComp implements Posc, Flyingc, Hitboxc, Unitc, Legsc, ElevationMovec{
|
||||
@Import float x, y;
|
||||
|
||||
float baseRotation;
|
||||
@@ -18,9 +18,4 @@ abstract class LegsComp implements Posc, Flyingc, Hitboxc, DrawLayerGroundUnderc
|
||||
baseRotation = Angles.moveToward(baseRotation, vel().angle(), type().baseRotateSpeed * Mathf.clamp(len / type().speed));
|
||||
walkTime += Time.delta()*len/1f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawGroundUnder(){
|
||||
type().drawLegs(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import mindustry.world.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
@Component
|
||||
abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, DrawLayerGroundc{
|
||||
abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{
|
||||
@Import float x, y, rotation;
|
||||
|
||||
transient float mineTimer;
|
||||
@@ -80,7 +80,7 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, DrawLayerGroundc{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawGround(){
|
||||
public void draw(){
|
||||
if(!mining()) return;
|
||||
float focusLen = 4f + Mathf.absin(Time.time(), 1.1f, 0.5f);
|
||||
float swingScl = 12f, swingMag = tilesize / 8f;
|
||||
|
||||
@@ -13,6 +13,7 @@ import mindustry.core.*;
|
||||
import mindustry.entities.units.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.net.Administration.*;
|
||||
import mindustry.net.*;
|
||||
import mindustry.net.Packets.*;
|
||||
@@ -23,7 +24,7 @@ import static mindustry.Vars.*;
|
||||
|
||||
@EntityDef(value = {Playerc.class}, serialize = false)
|
||||
@Component
|
||||
abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc{
|
||||
abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Drawc{
|
||||
@NonNull @ReadOnly Unitc unit = Nulls.unit;
|
||||
|
||||
@ReadOnly Team team = Team.sharded;
|
||||
@@ -58,6 +59,12 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float clipSize(){
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(){
|
||||
if(unit.dead()){
|
||||
clearUnit();
|
||||
@@ -130,7 +137,10 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc{
|
||||
con.kick(reason);
|
||||
}
|
||||
|
||||
void drawName(){
|
||||
@Override
|
||||
public void draw(){
|
||||
Draw.z(Layer.playerName);
|
||||
|
||||
BitmapFont font = Fonts.def;
|
||||
GlyphLayout layout = Pools.obtain(GlyphLayout.class, GlyphLayout::new);
|
||||
final float nameHeight = 11;
|
||||
|
||||
@@ -10,6 +10,7 @@ import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.world.*;
|
||||
|
||||
@@ -18,7 +19,7 @@ import static mindustry.entities.Puddles.maxLiquid;
|
||||
|
||||
@EntityDef(value = {Puddlec.class}, pooled = true)
|
||||
@Component
|
||||
abstract class PuddleComp implements Posc, DrawLayerFloorOverc, Puddlec{
|
||||
abstract class PuddleComp implements Posc, Puddlec{
|
||||
private static final int maxGeneration = 2;
|
||||
private static final Color tmp = new Color();
|
||||
private static final Rect rect = new Rect();
|
||||
@@ -89,7 +90,9 @@ abstract class PuddleComp implements Posc, DrawLayerFloorOverc, Puddlec{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFloorOver(){
|
||||
public void draw(){
|
||||
Draw.z(Layer.debris - 1);
|
||||
|
||||
seeds = id();
|
||||
boolean onLiquid = tile.floor().isLiquid;
|
||||
float f = Mathf.clamp(amount / (maxLiquid / 1.5f));
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package mindustry.entities.def;
|
||||
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.gen.*;
|
||||
|
||||
@EntityDef(value = {StandardEffectc.class, Childc.class}, pooled = true)
|
||||
@Component
|
||||
abstract class StandardEffectComp implements Effectc, DrawLayerEffectsc{
|
||||
|
||||
@Override
|
||||
public void drawEffects(){
|
||||
draw();
|
||||
}
|
||||
}
|
||||
@@ -615,12 +615,6 @@ abstract class TileComp implements Posc, Teamc, Healthc, Tilec, Timerc, QuadTree
|
||||
}
|
||||
}
|
||||
|
||||
public void drawLayer(){
|
||||
}
|
||||
|
||||
public void drawLayer2(){
|
||||
}
|
||||
|
||||
public void drawCracks(){
|
||||
if(!damaged() || block.size > Block.maxCrackSize) return;
|
||||
int id = pos();
|
||||
@@ -824,7 +818,7 @@ abstract class TileComp implements Posc, Teamc, Healthc, Tilec, Timerc, QuadTree
|
||||
l.clearChildren();
|
||||
for(Item item : content.items()){
|
||||
if(items.flownBits() != null && items.flownBits().get(item.id)){
|
||||
l.addImage(item.icon(Cicon.small)).padRight(3f);
|
||||
l.image(item.icon(Cicon.small)).padRight(3f);
|
||||
l.label(() -> items.getFlowRate(item) < 0 ? "..." : Strings.fixed(items.getFlowRate(item), 1) + ps).color(Color.lightGray);
|
||||
l.row();
|
||||
}
|
||||
@@ -845,7 +839,7 @@ abstract class TileComp implements Posc, Teamc, Healthc, Tilec, Timerc, QuadTree
|
||||
table.row();
|
||||
table.table(l -> {
|
||||
l.left();
|
||||
l.addImage(() -> liquids.current().icon(Cicon.small)).padRight(3f);
|
||||
l.image(() -> liquids.current().icon(Cicon.small)).padRight(3f);
|
||||
l.label(() -> liquids.getFlowRate() < 0 ? "..." : Strings.fixed(liquids.getFlowRate(), 2) + ps).color(Color.lightGray);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -18,8 +18,7 @@ import mindustry.world.blocks.environment.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
@Component
|
||||
abstract class UnitComp implements Healthc, Velc, Statusc, Teamc, Itemsc, Hitboxc, Rotc, Massc, Unitc, Weaponsc, Drawc, Boundedc,
|
||||
DrawLayerGroundc, DrawLayerFlyingc, DrawLayerGroundShadowsc, DrawLayerFlyingShadowsc, Syncc{
|
||||
abstract class UnitComp implements Healthc, Velc, Statusc, Teamc, Itemsc, Hitboxc, Rotc, Massc, Unitc, Weaponsc, Drawc, Boundedc, Syncc{
|
||||
@Import float x, y, rotation, elevation;
|
||||
|
||||
private UnitController controller;
|
||||
@@ -172,32 +171,7 @@ abstract class UnitComp implements Healthc, Velc, Statusc, Teamc, Itemsc, Hitbox
|
||||
|
||||
@Override
|
||||
public void draw(){
|
||||
type.drawEngine(this);
|
||||
type.drawBody(this);
|
||||
type.drawWeapons(this);
|
||||
if(type.drawCell) type.drawCell(this);
|
||||
if(type.drawItems) type.drawItems(this);
|
||||
type.drawLight(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFlyingShadows(){
|
||||
if(isFlying()) type.drawShadow(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawGroundShadows(){
|
||||
type.drawOcclusion(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFlying(){
|
||||
if(isFlying()) draw();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawGround(){
|
||||
if(isGrounded()) draw();
|
||||
type.draw(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -81,7 +81,7 @@ public class Rules{
|
||||
public boolean canGameOver = true;
|
||||
/** Whether to draw shadows of blocks at map edges and static blocks.
|
||||
* Do not change unless you know exactly what you are doing.*/
|
||||
public boolean drawFog = true;
|
||||
public boolean drawDarkness = true;
|
||||
/** Starting items put in cores */
|
||||
public Array<ItemStack> loadout = Array.with(ItemStack.with(Items.copper, 100));
|
||||
/** Blocks that cannot be placed. */
|
||||
|
||||
@@ -51,7 +51,9 @@ public class Schematics implements Loadable{
|
||||
private OptimizedByteArrayOutputStream out = new OptimizedByteArrayOutputStream(1024);
|
||||
private Array<Schematic> all = new Array<>();
|
||||
private OrderedMap<Schematic, FrameBuffer> previews = new OrderedMap<>();
|
||||
private ObjectSet<Schematic> errored = new ObjectSet<>();
|
||||
private FrameBuffer shadowBuffer;
|
||||
private Texture errorTexture;
|
||||
private long lastClearTime;
|
||||
|
||||
public Schematics(){
|
||||
@@ -59,6 +61,9 @@ public class Schematics implements Loadable{
|
||||
previews.each((schem, m) -> m.dispose());
|
||||
previews.clear();
|
||||
shadowBuffer.dispose();
|
||||
if(errorTexture != null){
|
||||
errorTexture.dispose();
|
||||
}
|
||||
});
|
||||
|
||||
Events.on(ContentReloadEvent.class, event -> {
|
||||
@@ -66,6 +71,12 @@ public class Schematics implements Loadable{
|
||||
previews.clear();
|
||||
load();
|
||||
});
|
||||
|
||||
Events.on(ClientLoadEvent.class, event -> {
|
||||
Pixmap pixmap = Core.atlas.getPixmap("error").crop();
|
||||
errorTexture = new Texture(pixmap);
|
||||
pixmap.dispose();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -163,7 +174,15 @@ public class Schematics implements Loadable{
|
||||
}
|
||||
|
||||
public Texture getPreview(Schematic schematic){
|
||||
return getBuffer(schematic).getTexture();
|
||||
if(errored.contains(schematic)) return errorTexture;
|
||||
|
||||
try{
|
||||
return getBuffer(schematic).getTexture();
|
||||
}catch(Throwable t){
|
||||
Log.err(t);
|
||||
errored.add(schematic);
|
||||
return errorTexture;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasPreview(Schematic schematic){
|
||||
|
||||
@@ -14,6 +14,7 @@ import mindustry.game.Teams.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.ui.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.blocks.power.*;
|
||||
|
||||
import static arc.Core.camera;
|
||||
import static mindustry.Vars.*;
|
||||
@@ -25,23 +26,18 @@ public class BlockRenderer implements Disposable{
|
||||
|
||||
public final FloorRenderer floor = new FloorRenderer();
|
||||
|
||||
private Array<BlockRequest> requests = new Array<>(true, initialRequests, BlockRequest.class);
|
||||
private Array<Tile> requests = new Array<>(false, initialRequests, Tile.class);
|
||||
|
||||
private int lastCamX, lastCamY, lastRangeX, lastRangeY;
|
||||
private int requestidx = 0;
|
||||
private int iterateidx = 0;
|
||||
private float brokenFade = 0f;
|
||||
private FrameBuffer shadows = new FrameBuffer(2, 2);
|
||||
private FrameBuffer fog = new FrameBuffer(2, 2);
|
||||
private FrameBuffer shadows = new FrameBuffer();
|
||||
private FrameBuffer fog = new FrameBuffer();
|
||||
private Array<Tilec> outArray2 = new Array<>();
|
||||
private Array<Tile> shadowEvents = new Array<>();
|
||||
private boolean displayStatus = false;
|
||||
|
||||
public BlockRenderer(){
|
||||
|
||||
for(int i = 0; i < requests.size; i++){
|
||||
requests.set(i, new BlockRequest());
|
||||
}
|
||||
|
||||
Events.on(WorldLoadEvent.class, event -> {
|
||||
shadowEvents.clear();
|
||||
lastCamY = lastCamX = -99; //invalidate camera position so blocks get updated
|
||||
@@ -98,7 +94,7 @@ public class BlockRenderer implements Disposable{
|
||||
});
|
||||
}
|
||||
|
||||
public void drawFog(){
|
||||
public void drawDarkness(){
|
||||
float ww = world.width() * tilesize, wh = world.height() * tilesize;
|
||||
float x = camera.position.x + tilesize / 2f, y = camera.position.y + tilesize / 2f;
|
||||
float u = (x - camera.width / 2f) / ww,
|
||||
@@ -178,7 +174,6 @@ public class BlockRenderer implements Disposable{
|
||||
/** Process all blocks to draw. */
|
||||
public void processBlocks(){
|
||||
displayStatus = Core.settings.getBool("blockstatus");
|
||||
iterateidx = 0;
|
||||
|
||||
int avgx = (int)(camera.position.x / tilesize);
|
||||
int avgy = (int)(camera.position.y / tilesize);
|
||||
@@ -190,7 +185,7 @@ public class BlockRenderer implements Disposable{
|
||||
return;
|
||||
}
|
||||
|
||||
requestidx = 0;
|
||||
requests.clear();
|
||||
|
||||
int minx = Math.max(avgx - rangex - expandr, 0);
|
||||
int miny = Math.max(avgy - rangey - expandr, 0);
|
||||
@@ -204,29 +199,14 @@ public class BlockRenderer implements Disposable{
|
||||
Block block = tile.block();
|
||||
|
||||
if(block != Blocks.air && tile.isCenter() && block.cacheLayer == CacheLayer.normal){
|
||||
if(!expanded){
|
||||
addRequest(tile, Layer.block);
|
||||
}
|
||||
|
||||
if(state.rules.lighting && tile.block().synthetic()){
|
||||
addRequest(tile, Layer.lights);
|
||||
}
|
||||
|
||||
if(block.expanded || !expanded){
|
||||
requests.add(tile);
|
||||
}
|
||||
|
||||
if(block.layer != null){
|
||||
addRequest(tile, block.layer);
|
||||
}
|
||||
|
||||
if(block.layer2 != null){
|
||||
addRequest(tile, block.layer2);
|
||||
}
|
||||
|
||||
if(tile.entity != null && tile.entity.power() != null && tile.entity.power().links.size > 0){
|
||||
for(Tilec other : tile.entity.getPowerConnections(outArray2)){
|
||||
if(other.block().layer == Layer.power){
|
||||
addRequest(other.tile(), Layer.power);
|
||||
}
|
||||
if(tile.entity != null && tile.entity.power() != null && tile.entity.power().links.size > 0){
|
||||
for(Tilec other : tile.entity.getPowerConnections(outArray2)){
|
||||
if(other.block() instanceof PowerNode){ //TODO need a generic way to render connections!
|
||||
requests.add(other.tile());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -234,68 +214,44 @@ public class BlockRenderer implements Disposable{
|
||||
}
|
||||
}
|
||||
|
||||
Sort.instance().sort(requests.items, 0, requestidx);
|
||||
|
||||
lastCamX = avgx;
|
||||
lastCamY = avgy;
|
||||
lastRangeX = rangex;
|
||||
lastRangeY = rangey;
|
||||
}
|
||||
|
||||
public void drawBlocks(Layer stopAt){
|
||||
int startIdx = iterateidx;
|
||||
for(; iterateidx < requestidx; iterateidx++){
|
||||
BlockRequest request = requests.get(iterateidx);
|
||||
public void drawBlocks(){
|
||||
drawDestroyed();
|
||||
|
||||
if(request.layer.ordinal() > stopAt.ordinal()){
|
||||
break;
|
||||
}
|
||||
for(int i = 0; i < requests.size; i++){
|
||||
Tile tile = requests.items[i];
|
||||
Block block = tile.block();
|
||||
Tilec entity = tile.entity;
|
||||
|
||||
if(request.layer == Layer.power){
|
||||
if(iterateidx - startIdx > 0 && request.tile.pos() == requests.get(iterateidx - 1).tile.pos()){
|
||||
continue;
|
||||
Draw.z(Layer.block);
|
||||
|
||||
if(block != Blocks.air){
|
||||
block.drawBase(tile);
|
||||
|
||||
if(entity != null){
|
||||
if(entity.damaged()){
|
||||
entity.drawCracks();
|
||||
}
|
||||
|
||||
if(entity.team() != player.team()){
|
||||
entity.drawTeam();
|
||||
}
|
||||
|
||||
entity.drawLight();
|
||||
|
||||
if(displayStatus && block.consumes.any()){
|
||||
entity.drawStatus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Block block = request.tile.block();
|
||||
boolean isEnd = (request.layer == Layer.block && block.layer == null) || request.layer == block.layer;
|
||||
|
||||
if(request.layer == Layer.block){
|
||||
block.drawBase(request.tile);
|
||||
if(request.tile.entity != null && request.tile.entity.damaged()){
|
||||
request.tile.entity.drawCracks();
|
||||
}
|
||||
if(block.synthetic() && request.tile.entity != null && request.tile.team() != player.team()){
|
||||
request.tile.entity.drawTeam();
|
||||
}
|
||||
|
||||
}else if(request.layer == Layer.lights && request.tile.entity != null){
|
||||
request.tile.entity.drawLight();
|
||||
}else if(request.layer == block.layer){
|
||||
block.drawLayer(request.tile);
|
||||
}else if(request.layer == block.layer2){
|
||||
block.drawLayer2(request.tile);
|
||||
}
|
||||
|
||||
if(isEnd && request.tile.entity != null && displayStatus && block.consumes.any()){
|
||||
request.tile.entity.drawStatus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void addRequest(Tile tile, Layer layer){
|
||||
if(requestidx >= requests.size){
|
||||
requests.add(new BlockRequest());
|
||||
}
|
||||
BlockRequest r = requests.get(requestidx);
|
||||
if(r == null){
|
||||
requests.set(requestidx, r = new BlockRequest());
|
||||
}
|
||||
r.tile = tile;
|
||||
r.layer = layer;
|
||||
requestidx++;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose(){
|
||||
shadows.dispose();
|
||||
@@ -303,21 +259,4 @@ public class BlockRenderer implements Disposable{
|
||||
shadows = fog = null;
|
||||
floor.dispose();
|
||||
}
|
||||
|
||||
private class BlockRequest implements Comparable<BlockRequest>{
|
||||
Tile tile;
|
||||
Layer layer;
|
||||
|
||||
@Override
|
||||
public int compareTo(BlockRequest other){
|
||||
int compare = layer.compareTo(other.layer);
|
||||
|
||||
return (compare != 0) ? compare : Integer.compare(tile.pos(), other.tile.pos());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return tile.block().name + ":" + layer.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package mindustry.graphics;
|
||||
|
||||
import arc.Core;
|
||||
import arc.graphics.Color;
|
||||
import arc.graphics.g2d.Draw;
|
||||
import arc.graphics.gl.Shader;
|
||||
import arc.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.graphics.gl.*;
|
||||
|
||||
import static arc.Core.camera;
|
||||
import static mindustry.Vars.renderer;
|
||||
|
||||
public enum CacheLayer{
|
||||
//TODO water animation breaks when tar/slag is present
|
||||
water{
|
||||
@Override
|
||||
public void begin(){
|
||||
@@ -81,7 +81,7 @@ public enum CacheLayer{
|
||||
renderer.effectBuffer.end();
|
||||
|
||||
Draw.shader(shader);
|
||||
Draw.rect(Draw.wrap(renderer.effectBuffer.getTexture()), camera.position.x, camera.position.y, camera.width, -camera.height);
|
||||
Draw.rect(renderer.effectBuffer);
|
||||
Draw.shader();
|
||||
|
||||
renderer.blocks.floor.beginc();
|
||||
|
||||
@@ -1,16 +1,69 @@
|
||||
package mindustry.graphics;
|
||||
|
||||
public enum Layer{
|
||||
/** Base block layer. */
|
||||
block,
|
||||
/** for placement */
|
||||
placement,
|
||||
/** First overlay. Stuff like conveyor items. */
|
||||
overlay,
|
||||
/** "High" blocks, like turrets. */
|
||||
turret,
|
||||
/** Power lasers. */
|
||||
power,
|
||||
/** Extra layer that's always on top.*/
|
||||
lights
|
||||
/** Stores constants for sorting layers. Values should be stored in increments of 10. */
|
||||
public class Layer{
|
||||
|
||||
public static final float
|
||||
|
||||
//background, which may be planets or an image or nothing at all
|
||||
background = -10,
|
||||
|
||||
//floor tiles
|
||||
floor = 0,
|
||||
|
||||
//scorch marks on the floor
|
||||
scorch = 10,
|
||||
|
||||
//things such as spent casings or rubble
|
||||
debris = 20,
|
||||
|
||||
//base block layer - most blocks go here
|
||||
block = 30,
|
||||
|
||||
//things drawn over blocks (intermediate layer)
|
||||
blockOver = 35,
|
||||
|
||||
//blocks currently in progress *shaders used* TODO perhaps put shaders into their own category
|
||||
blockBuilding = 40,
|
||||
|
||||
//ground units
|
||||
groundUnit = 50,
|
||||
|
||||
//turrets
|
||||
turret = 60,
|
||||
|
||||
//power lines
|
||||
power = 70,
|
||||
|
||||
//darkness over block clusters
|
||||
darkness = 80,
|
||||
|
||||
//building plans
|
||||
plans = 85,
|
||||
|
||||
//flying units
|
||||
flyingUnit = 90,
|
||||
|
||||
//bullets *bloom begin*
|
||||
bullet = 100,
|
||||
|
||||
//effects *bloom end*
|
||||
effect = 110,
|
||||
|
||||
//overlaied UI, like block config guides
|
||||
overlayUI = 120,
|
||||
|
||||
//weather effects, e.g. rain and snow TODO draw before overlay UI?
|
||||
weather = 130,
|
||||
|
||||
//light rendering *shaders used*
|
||||
light = 140,
|
||||
|
||||
//names of players in the game
|
||||
playerName = 150,
|
||||
|
||||
//space effects, currently only the land and launch effects
|
||||
space = 160
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ public class LightRenderer{
|
||||
private static final int scaling = 4;
|
||||
|
||||
private float[] vertices = new float[24];
|
||||
private FrameBuffer buffer = new FrameBuffer(2, 2);
|
||||
private FrameBuffer buffer = new FrameBuffer();
|
||||
private Array<Runnable> lights = new Array<>();
|
||||
|
||||
public void add(Runnable run){
|
||||
@@ -185,9 +185,7 @@ public class LightRenderer{
|
||||
return;
|
||||
}
|
||||
|
||||
if(buffer.getWidth() != Core.graphics.getWidth()/scaling || buffer.getHeight() != Core.graphics.getHeight()/scaling){
|
||||
buffer.resize(Core.graphics.getWidth()/scaling, Core.graphics.getHeight()/scaling);
|
||||
}
|
||||
buffer.resize(Core.graphics.getWidth()/scaling, Core.graphics.getHeight()/scaling);
|
||||
|
||||
Draw.color();
|
||||
buffer.begin(Color.clear);
|
||||
@@ -203,7 +201,7 @@ public class LightRenderer{
|
||||
Draw.color();
|
||||
Shaders.light.ambient.set(state.rules.ambientLight);
|
||||
Draw.shader(Shaders.light);
|
||||
Draw.rect(Draw.wrap(buffer.getTexture()), Core.camera.position.x, Core.camera.position.y, Core.camera.width, -Core.camera.height);
|
||||
Draw.rect(buffer);
|
||||
Draw.shader();
|
||||
|
||||
lights.clear();
|
||||
|
||||
@@ -6,13 +6,12 @@ import arc.graphics.Texture.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.graphics.gl.*;
|
||||
import arc.util.*;
|
||||
import mindustry.gen.*;
|
||||
|
||||
import static arc.Core.*;
|
||||
import static mindustry.Vars.renderer;
|
||||
|
||||
public class Pixelator implements Disposable{
|
||||
private FrameBuffer buffer = new FrameBuffer(2, 2);
|
||||
private FrameBuffer buffer = new FrameBuffer();
|
||||
|
||||
{
|
||||
buffer.getTexture().setFilter(TextureFilter.Nearest, TextureFilter.Nearest);
|
||||
@@ -34,19 +33,18 @@ public class Pixelator implements Disposable{
|
||||
int w = (int)(Core.camera.width * renderer.landScale());
|
||||
int h = (int)(Core.camera.height * renderer.landScale());
|
||||
|
||||
if(!graphics.isHidden() && (buffer.getWidth() != w || buffer.getHeight() != h)){
|
||||
buffer.resize(w, h);
|
||||
}
|
||||
buffer.resize(w, h);
|
||||
|
||||
buffer.begin();
|
||||
renderer.draw();
|
||||
buffer.end();
|
||||
|
||||
Draw.blend(Blending.disabled);
|
||||
Draw.rect(Draw.wrap(buffer.getTexture()), Core.camera.position.x, Core.camera.position.y, Core.camera.width, -Core.camera.height);
|
||||
Draw.rect(buffer);
|
||||
Draw.blend();
|
||||
|
||||
Groups.drawNames();
|
||||
//TODO set all of this up
|
||||
//Groups.drawNames();
|
||||
|
||||
Core.camera.position.set(px, py);
|
||||
renderer.setScale(pre);
|
||||
|
||||
@@ -7,55 +7,55 @@ import arc.input.InputDevice.DeviceType;
|
||||
import arc.input.KeyCode;
|
||||
|
||||
public enum Binding implements KeyBind{
|
||||
move_x(new Axis(KeyCode.A, KeyCode.D), "general"),
|
||||
move_y(new Axis(KeyCode.S, KeyCode.W)),
|
||||
mouse_move(KeyCode.MOUSE_BACK),
|
||||
dash(KeyCode.SHIFT_LEFT),
|
||||
control(KeyCode.SHIFT_LEFT),
|
||||
select(KeyCode.MOUSE_LEFT),
|
||||
deselect(KeyCode.MOUSE_RIGHT),
|
||||
break_block(KeyCode.MOUSE_RIGHT),
|
||||
clear_building(KeyCode.Q),
|
||||
pause_building(KeyCode.E),
|
||||
rotate(new Axis(KeyCode.SCROLL)),
|
||||
rotateplaced(KeyCode.R),
|
||||
diagonal_placement(KeyCode.CONTROL_LEFT),
|
||||
pick(KeyCode.MOUSE_MIDDLE),
|
||||
schematic_select(KeyCode.F),
|
||||
schematic_flip_x(KeyCode.Z),
|
||||
schematic_flip_y(KeyCode.X),
|
||||
schematic_menu(KeyCode.T),
|
||||
category_prev(KeyCode.COMMA),
|
||||
category_next(KeyCode.PERIOD),
|
||||
block_select_left(KeyCode.LEFT),
|
||||
block_select_right(KeyCode.RIGHT),
|
||||
block_select_up(KeyCode.UP),
|
||||
block_select_down(KeyCode.DOWN),
|
||||
block_select_01(KeyCode.NUM_1),
|
||||
block_select_02(KeyCode.NUM_2),
|
||||
block_select_03(KeyCode.NUM_3),
|
||||
block_select_04(KeyCode.NUM_4),
|
||||
block_select_05(KeyCode.NUM_5),
|
||||
block_select_06(KeyCode.NUM_6),
|
||||
block_select_07(KeyCode.NUM_7),
|
||||
block_select_08(KeyCode.NUM_8),
|
||||
block_select_09(KeyCode.NUM_9),
|
||||
block_select_10(KeyCode.NUM_0),
|
||||
zoom(new Axis(KeyCode.SCROLL), "view"),
|
||||
menu(Core.app.getType() == ApplicationType.Android ? KeyCode.BACK : KeyCode.ESCAPE),
|
||||
fullscreen(KeyCode.F11),
|
||||
pause(KeyCode.SPACE),
|
||||
minimap(KeyCode.M),
|
||||
toggle_menus(KeyCode.C),
|
||||
screenshot(KeyCode.P),
|
||||
toggle_power_lines(KeyCode.F5),
|
||||
toggle_block_status(KeyCode.F6),
|
||||
player_list(KeyCode.TAB, "multiplayer"),
|
||||
chat(KeyCode.ENTER),
|
||||
chat_history_prev(KeyCode.UP),
|
||||
chat_history_next(KeyCode.DOWN),
|
||||
chat_scroll(new Axis(KeyCode.SCROLL)),
|
||||
console(KeyCode.F8),
|
||||
move_x(new Axis(KeyCode.a, KeyCode.d), "general"),
|
||||
move_y(new Axis(KeyCode.s, KeyCode.w)),
|
||||
mouse_move(KeyCode.mouseBack),
|
||||
dash(KeyCode.shiftLeft),
|
||||
control(KeyCode.shiftLeft),
|
||||
select(KeyCode.mouseLeft),
|
||||
deselect(KeyCode.mouseRight),
|
||||
break_block(KeyCode.mouseRight),
|
||||
clear_building(KeyCode.q),
|
||||
pause_building(KeyCode.e),
|
||||
rotate(new Axis(KeyCode.scroll)),
|
||||
rotateplaced(KeyCode.r),
|
||||
diagonal_placement(KeyCode.controlLeft),
|
||||
pick(KeyCode.mouseMiddle),
|
||||
schematic_select(KeyCode.f),
|
||||
schematic_flip_x(KeyCode.z),
|
||||
schematic_flip_y(KeyCode.x),
|
||||
schematic_menu(KeyCode.t),
|
||||
category_prev(KeyCode.comma),
|
||||
category_next(KeyCode.period),
|
||||
block_select_left(KeyCode.left),
|
||||
block_select_right(KeyCode.right),
|
||||
block_select_up(KeyCode.up),
|
||||
block_select_down(KeyCode.down),
|
||||
block_select_01(KeyCode.num1),
|
||||
block_select_02(KeyCode.num2),
|
||||
block_select_03(KeyCode.num3),
|
||||
block_select_04(KeyCode.num4),
|
||||
block_select_05(KeyCode.num5),
|
||||
block_select_06(KeyCode.num6),
|
||||
block_select_07(KeyCode.num7),
|
||||
block_select_08(KeyCode.num8),
|
||||
block_select_09(KeyCode.num9),
|
||||
block_select_10(KeyCode.num0),
|
||||
zoom(new Axis(KeyCode.scroll), "view"),
|
||||
menu(Core.app.getType() == ApplicationType.Android ? KeyCode.back : KeyCode.escape),
|
||||
fullscreen(KeyCode.f11),
|
||||
pause(KeyCode.space),
|
||||
minimap(KeyCode.m),
|
||||
toggle_menus(KeyCode.c),
|
||||
screenshot(KeyCode.p),
|
||||
toggle_power_lines(KeyCode.f5),
|
||||
toggle_block_status(KeyCode.f6),
|
||||
player_list(KeyCode.tab, "multiplayer"),
|
||||
chat(KeyCode.enter),
|
||||
chat_history_prev(KeyCode.up),
|
||||
chat_history_next(KeyCode.down),
|
||||
chat_scroll(new Axis(KeyCode.scroll)),
|
||||
console(KeyCode.f8),
|
||||
;
|
||||
|
||||
private final KeybindValue defaultValue;
|
||||
|
||||
@@ -72,7 +72,7 @@ public class DesktopInput extends InputHandler{
|
||||
Core.keybinds.get(Binding.schematic_flip_y).key.toString())).style(Styles.outlineLabel);
|
||||
b.row();
|
||||
b.table(a -> {
|
||||
a.addImageTextButton("$schematic.add", Icon.save, this::showSchematicSave).colspan(2).size(250f, 50f).disabled(f -> lastSchematic == null || lastSchematic.file != null);
|
||||
a.button("$schematic.add", Icon.save, this::showSchematicSave).colspan(2).size(250f, 50f).disabled(f -> lastSchematic == null || lastSchematic.file != null);
|
||||
});
|
||||
}).margin(6f);
|
||||
});
|
||||
@@ -182,7 +182,7 @@ public class DesktopInput extends InputHandler{
|
||||
}
|
||||
|
||||
//TODO this is for debugging, remove later
|
||||
if(Core.input.keyTap(KeyCode.Q) && !player.dead()){
|
||||
if(Core.input.keyTap(KeyCode.q) && !player.dead()){
|
||||
Fx.commandSend.at(player);
|
||||
Units.nearby(player.team(), player.x(), player.y(), 200f, u -> {
|
||||
if(u.isAI()){
|
||||
@@ -302,11 +302,11 @@ public class DesktopInput extends InputHandler{
|
||||
|
||||
@Override
|
||||
public void buildPlacementUI(Table table){
|
||||
table.addImage().color(Pal.gray).height(4f).colspan(4).growX();
|
||||
table.image().color(Pal.gray).height(4f).colspan(4).growX();
|
||||
table.row();
|
||||
table.left().margin(0f).defaults().size(48f).left();
|
||||
|
||||
table.addImageButton(Icon.paste, Styles.clearPartiali, () -> {
|
||||
table.button(Icon.paste, Styles.clearPartiali, () -> {
|
||||
ui.schematics.show();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ import arc.scene.ui.layout.*;
|
||||
import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.GameState.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.entities.units.*;
|
||||
@@ -175,23 +174,23 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
|
||||
@Override
|
||||
public void buildPlacementUI(Table table){
|
||||
table.addImage().color(Pal.gray).height(4f).colspan(4).growX();
|
||||
table.image().color(Pal.gray).height(4f).colspan(4).growX();
|
||||
table.row();
|
||||
table.left().margin(0f).defaults().size(48f);
|
||||
|
||||
table.addImageButton(Icon.hammer, Styles.clearTogglePartiali, () -> {
|
||||
table.button(Icon.hammer, Styles.clearTogglePartiali, () -> {
|
||||
mode = mode == breaking ? block == null ? none : placing : breaking;
|
||||
lastBlock = block;
|
||||
}).update(l -> l.setChecked(mode == breaking)).name("breakmode");
|
||||
|
||||
//diagonal swap button
|
||||
table.addImageButton(Icon.diagonal, Styles.clearTogglePartiali, () -> {
|
||||
table.button(Icon.diagonal, Styles.clearTogglePartiali, () -> {
|
||||
Core.settings.put("swapdiagonal", !Core.settings.getBool("swapdiagonal"));
|
||||
Core.settings.save();
|
||||
}).update(l -> l.setChecked(Core.settings.getBool("swapdiagonal")));
|
||||
|
||||
//rotate button
|
||||
table.addImageButton(Icon.right, Styles.clearTogglePartiali, () -> {
|
||||
table.button(Icon.right, Styles.clearTogglePartiali, () -> {
|
||||
if(block != null && block.rotate){
|
||||
rotation = Mathf.mod(rotation + 1, 4);
|
||||
}else{
|
||||
@@ -210,7 +209,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
});
|
||||
|
||||
//confirm button
|
||||
table.addImageButton(Icon.ok, Styles.clearPartiali, () -> {
|
||||
table.button(Icon.ok, Styles.clearPartiali, () -> {
|
||||
for(BuildRequest request : selectRequests){
|
||||
Tile tile = request.tile();
|
||||
|
||||
@@ -249,7 +248,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
|
||||
group.fill(t -> {
|
||||
t.bottom().left().visible(() -> (player.builder().isBuilding() || block != null || mode == breaking || !selectRequests.isEmpty()) && !schem.get());
|
||||
t.addImageTextButton("$cancel", Icon.cancel, () -> {
|
||||
t.button("$cancel", Icon.cancel, () -> {
|
||||
player.builder().clearBuilding();
|
||||
selectRequests.clear();
|
||||
mode = none;
|
||||
@@ -265,15 +264,15 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
|
||||
ImageButtonStyle style = Styles.clearPartiali;
|
||||
|
||||
b.addImageButton(Icon.save, style, this::showSchematicSave).disabled(f -> lastSchematic == null || lastSchematic.file != null);
|
||||
b.addImageButton(Icon.cancel, style, () -> {
|
||||
b.button(Icon.save, style, this::showSchematicSave).disabled(f -> lastSchematic == null || lastSchematic.file != null);
|
||||
b.button(Icon.cancel, style, () -> {
|
||||
selectRequests.clear();
|
||||
});
|
||||
b.row();
|
||||
b.addImageButton(Icon.flipX, style, () -> flipRequests(selectRequests, true));
|
||||
b.addImageButton(Icon.flipY, style, () -> flipRequests(selectRequests, false));
|
||||
b.button(Icon.flipX, style, () -> flipRequests(selectRequests, true));
|
||||
b.button(Icon.flipY, style, () -> flipRequests(selectRequests, false));
|
||||
b.row();
|
||||
b.addImageButton(Icon.rotate, style, () -> rotateRequests(selectRequests, 1));
|
||||
b.button(Icon.rotate, style, () -> rotateRequests(selectRequests, 1));
|
||||
|
||||
}).margin(4f);
|
||||
});
|
||||
|
||||
@@ -63,7 +63,7 @@ public abstract class FilterOption{
|
||||
table.label(() -> Core.bundle.get("filter.option." + name) + ": " + (int)getter.get());
|
||||
}
|
||||
table.row();
|
||||
Slider slider = table.addSlider(min, max, step, setter).growX().get();
|
||||
Slider slider = table.slider(min, max, step, setter).growX().get();
|
||||
slider.setValue(getter.get());
|
||||
if(updateEditorOnChange){
|
||||
slider.changed(changed);
|
||||
@@ -88,7 +88,7 @@ public abstract class FilterOption{
|
||||
|
||||
@Override
|
||||
public void build(Table table){
|
||||
table.addButton(b -> b.addImage(supplier.get().icon(Cicon.small)).update(i -> ((TextureRegionDrawable)i.getDrawable())
|
||||
table.button(b -> b.image(supplier.get().icon(Cicon.small)).update(i -> ((TextureRegionDrawable)i.getDrawable())
|
||||
.setRegion(supplier.get() == Blocks.air ? Icon.block.getRegion() : supplier.get().icon(Cicon.small))).size(8 * 3), () -> {
|
||||
FloatingDialog dialog = new FloatingDialog("");
|
||||
dialog.setFillParent(false);
|
||||
@@ -96,7 +96,7 @@ public abstract class FilterOption{
|
||||
for(Block block : Vars.content.blocks()){
|
||||
if(!filter.get(block)) continue;
|
||||
|
||||
dialog.cont.addImage(block == Blocks.air ? Icon.block.getRegion() : block.icon(Cicon.medium)).size(8 * 4).pad(3).get().clicked(() -> {
|
||||
dialog.cont.image(block == Blocks.air ? Icon.block.getRegion() : block.icon(Cicon.medium)).size(8 * 4).pad(3).get().clicked(() -> {
|
||||
consumer.get(block);
|
||||
dialog.hide();
|
||||
changed.run();
|
||||
|
||||
@@ -386,7 +386,7 @@ public class Mods implements Loadable{
|
||||
cont.margin(15);
|
||||
cont.add("$error.title");
|
||||
cont.row();
|
||||
cont.addImage().width(300f).pad(2).colspan(2).height(4f).color(Color.scarlet);
|
||||
cont.image().width(300f).pad(2).colspan(2).height(4f).color(Color.scarlet);
|
||||
cont.row();
|
||||
cont.add("$mod.errors").wrap().growX().center().get().setAlignment(Align.center);
|
||||
cont.row();
|
||||
@@ -394,18 +394,18 @@ public class Mods implements Loadable{
|
||||
mods.each(m -> m.enabled() && m.hasContentErrors(), m -> {
|
||||
p.add(m.name).color(Pal.accent).left();
|
||||
p.row();
|
||||
p.addImage().fillX().pad(4).color(Pal.accent);
|
||||
p.image().fillX().pad(4).color(Pal.accent);
|
||||
p.row();
|
||||
p.table(d -> {
|
||||
d.left().marginLeft(15f);
|
||||
for(Content c : m.erroredContent){
|
||||
d.add(c.minfo.sourceFile.nameWithoutExtension()).left().padRight(10);
|
||||
d.addImageTextButton("$details", Icon.downOpen, Styles.transt, () -> {
|
||||
d.button("$details", Icon.downOpen, Styles.transt, () -> {
|
||||
new Dialog(""){{
|
||||
setFillParent(true);
|
||||
cont.pane(e -> e.add(c.minfo.error)).grow();
|
||||
cont.row();
|
||||
cont.addImageTextButton("$ok", Icon.left, this::hide).size(240f, 60f);
|
||||
cont.button("$ok", Icon.left, this::hide).size(240f, 60f);
|
||||
}}.show();
|
||||
}).size(190f, 50f).left().marginLeft(6);
|
||||
d.row();
|
||||
@@ -416,7 +416,7 @@ public class Mods implements Loadable{
|
||||
});
|
||||
|
||||
cont.row();
|
||||
cont.addButton("$ok", this::hide).size(300, 50);
|
||||
cont.button("$ok", this::hide).size(300, 50);
|
||||
}}.show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public class BeControl{
|
||||
});
|
||||
|
||||
dialog.cont.add(new Bar(() -> length[0] == 0 ? Core.bundle.get("be.updating") : (int)(progress[0] * length[0]) / 1024/ 1024 + "/" + length[0]/1024/1024 + " MB", () -> Pal.accent, () -> progress[0])).width(400f).height(70f);
|
||||
dialog.buttons.addImageTextButton("$cancel", Icon.cancel, () -> {
|
||||
dialog.buttons.button("$cancel", Icon.cancel, () -> {
|
||||
cancel[0] = true;
|
||||
dialog.hide();
|
||||
}).size(210f, 64f);
|
||||
|
||||
@@ -114,6 +114,27 @@ public class UnitType extends UnlockableContent{
|
||||
|
||||
//region drawing
|
||||
|
||||
public void draw(Unitc unit){
|
||||
if(unit.isFlying()){
|
||||
Draw.z(Layer.darkness);
|
||||
drawShadow(unit);
|
||||
}
|
||||
|
||||
Draw.z(Mathf.lerp(Layer.groundUnit, Layer.flyingUnit, unit.elevation()));
|
||||
|
||||
if(unit instanceof Legsc){
|
||||
drawLegs((Legsc)unit);
|
||||
}
|
||||
|
||||
drawOcclusion(unit);
|
||||
drawEngine(unit);
|
||||
drawBody(unit);
|
||||
drawWeapons(unit);
|
||||
if(drawCell) drawCell(unit);
|
||||
if(drawItems) drawItems(unit);
|
||||
drawLight(unit);
|
||||
}
|
||||
|
||||
public void drawShadow(Unitc unit){
|
||||
Draw.color(shadowColor);
|
||||
Draw.rect(region, unit.x() + shadowTX * unit.elevation(), unit.y() + shadowTY * unit.elevation(), unit.rotation() - 90);
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package mindustry.type;
|
||||
|
||||
import arc.func.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
|
||||
public abstract class Weather extends MappableContent{
|
||||
protected float duration = 100f;
|
||||
@@ -39,7 +41,7 @@ public abstract class Weather extends MappableContent{
|
||||
|
||||
@EntityDef(value = {Weatherc.class}, pooled = true, isFinal = false)
|
||||
@Component
|
||||
abstract class WeatherComp implements Posc, DrawLayerWeatherc{
|
||||
abstract class WeatherComp implements Posc, Drawc{
|
||||
Weather weather;
|
||||
|
||||
void init(Weather weather){
|
||||
@@ -47,7 +49,8 @@ public abstract class Weather extends MappableContent{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawWeather(){
|
||||
public void draw(){
|
||||
Draw.z(Layer.weather);
|
||||
weather.draw();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,13 +17,13 @@ public class ContentDisplay{
|
||||
table.table(title -> {
|
||||
int size = 8 * 6;
|
||||
|
||||
title.addImage(block.icon(Cicon.xlarge)).size(size);
|
||||
title.image(block.icon(Cicon.xlarge)).size(size);
|
||||
title.add("[accent]" + block.localizedName).padLeft(5);
|
||||
});
|
||||
|
||||
table.row();
|
||||
|
||||
table.addImage().height(3).color(Color.lightGray).pad(8).padLeft(0).padRight(0).fillX();
|
||||
table.image().height(3).color(Color.lightGray).pad(8).padLeft(0).padRight(0).fillX();
|
||||
|
||||
table.row();
|
||||
|
||||
@@ -31,7 +31,7 @@ public class ContentDisplay{
|
||||
table.add(block.displayDescription()).padLeft(5).padRight(5).width(400f).wrap().fillX();
|
||||
table.row();
|
||||
|
||||
table.addImage().height(3).color(Color.lightGray).pad(8).padLeft(0).padRight(0).fillX();
|
||||
table.image().height(3).color(Color.lightGray).pad(8).padLeft(0).padRight(0).fillX();
|
||||
table.row();
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class ContentDisplay{
|
||||
public static void displayItem(Table table, Item item){
|
||||
|
||||
table.table(title -> {
|
||||
title.addImage(item.icon(Cicon.xlarge)).size(8 * 6);
|
||||
title.image(item.icon(Cicon.xlarge)).size(8 * 6);
|
||||
title.add("[accent]" + item.localizedName).padLeft(5);
|
||||
});
|
||||
|
||||
table.row();
|
||||
|
||||
table.addImage().height(3).color(Color.lightGray).pad(15).padLeft(0).padRight(0).fillX();
|
||||
table.image().height(3).color(Color.lightGray).pad(15).padLeft(0).padRight(0).fillX();
|
||||
|
||||
table.row();
|
||||
|
||||
@@ -79,7 +79,7 @@ public class ContentDisplay{
|
||||
table.add(item.displayDescription()).padLeft(5).padRight(5).width(400f).wrap().fillX();
|
||||
table.row();
|
||||
|
||||
table.addImage().height(3).color(Color.lightGray).pad(15).padLeft(0).padRight(0).fillX();
|
||||
table.image().height(3).color(Color.lightGray).pad(15).padLeft(0).padRight(0).fillX();
|
||||
table.row();
|
||||
}
|
||||
|
||||
@@ -99,13 +99,13 @@ public class ContentDisplay{
|
||||
public static void displayLiquid(Table table, Liquid liquid){
|
||||
|
||||
table.table(title -> {
|
||||
title.addImage(liquid.icon(Cicon.xlarge)).size(8 * 6);
|
||||
title.image(liquid.icon(Cicon.xlarge)).size(8 * 6);
|
||||
title.add("[accent]" + liquid.localizedName).padLeft(5);
|
||||
});
|
||||
|
||||
table.row();
|
||||
|
||||
table.addImage().height(3).color(Color.lightGray).pad(15).padLeft(0).padRight(0).fillX();
|
||||
table.image().height(3).color(Color.lightGray).pad(15).padLeft(0).padRight(0).fillX();
|
||||
|
||||
table.row();
|
||||
|
||||
@@ -113,7 +113,7 @@ public class ContentDisplay{
|
||||
table.add(liquid.displayDescription()).padLeft(5).padRight(5).width(400f).wrap().fillX();
|
||||
table.row();
|
||||
|
||||
table.addImage().height(3).color(Color.lightGray).pad(15).padLeft(0).padRight(0).fillX();
|
||||
table.image().height(3).color(Color.lightGray).pad(15).padLeft(0).padRight(0).fillX();
|
||||
table.row();
|
||||
}
|
||||
|
||||
@@ -133,13 +133,13 @@ public class ContentDisplay{
|
||||
|
||||
public static void displayUnit(Table table, UnitType unit){
|
||||
table.table(title -> {
|
||||
title.addImage(unit.icon(Cicon.xlarge)).size(8 * 6);
|
||||
title.image(unit.icon(Cicon.xlarge)).size(8 * 6);
|
||||
title.add("[accent]" + unit.localizedName).padLeft(5);
|
||||
});
|
||||
|
||||
table.row();
|
||||
|
||||
table.addImage().height(3).color(Color.lightGray).pad(15).padLeft(0).padRight(0).fillX();
|
||||
table.image().height(3).color(Color.lightGray).pad(15).padLeft(0).padRight(0).fillX();
|
||||
|
||||
table.row();
|
||||
|
||||
@@ -147,7 +147,7 @@ public class ContentDisplay{
|
||||
table.add(unit.displayDescription()).padLeft(5).padRight(5).width(400f).wrap().fillX();
|
||||
table.row();
|
||||
|
||||
table.addImage().height(3).color(Color.lightGray).pad(15).padLeft(0).padRight(0).fillX();
|
||||
table.image().height(3).color(Color.lightGray).pad(15).padLeft(0).padRight(0).fillX();
|
||||
table.row();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package mindustry.ui;
|
||||
import arc.graphics.*;
|
||||
import arc.scene.ui.*;
|
||||
import arc.scene.ui.layout.*;
|
||||
import mindustry.core.GameState.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.type.*;
|
||||
|
||||
@@ -33,14 +32,14 @@ public class ItemsDisplay extends Table{
|
||||
for(Item item : content.items()){
|
||||
if(item.type == ItemType.material && data.isUnlocked(item)){
|
||||
t.label(() -> format(item)).left();
|
||||
t.addImage(item.icon(Cicon.small)).size(8 * 3).padLeft(4).padRight(4);
|
||||
t.image(item.icon(Cicon.small)).size(8 * 3).padLeft(4).padRight(4);
|
||||
t.add(item.localizedName).color(Color.lightGray).left();
|
||||
t.row();
|
||||
}
|
||||
}
|
||||
}).get().setScrollingDisabled(true, false), false).setDuration(0.3f);
|
||||
|
||||
c.addImageTextButton("$launcheditems", Icon.downOpen, Styles.clearTogglet, col::toggle).update(t -> {
|
||||
c.button("$launcheditems", Icon.downOpen, Styles.clearTogglet, col::toggle).update(t -> {
|
||||
t.setText(state.isMenu() ? "$launcheditems" : "$launchinfo");
|
||||
t.setChecked(col.isCollapsed());
|
||||
((Image)t.getChildren().get(1)).setDrawable(col.isCollapsed() ? Icon.upOpen : Icon.downOpen);
|
||||
|
||||
@@ -48,14 +48,14 @@ public class AboutDialog extends FloatingDialog{
|
||||
Table table = new Table(Tex.underline);
|
||||
table.margin(0);
|
||||
table.table(img -> {
|
||||
img.addImage().height(h - 5).width(40f).color(link.color);
|
||||
img.image().height(h - 5).width(40f).color(link.color);
|
||||
img.row();
|
||||
img.addImage().height(5).width(40f).color(link.color.cpy().mul(0.8f, 0.8f, 0.8f, 1f));
|
||||
img.image().height(5).width(40f).color(link.color.cpy().mul(0.8f, 0.8f, 0.8f, 1f));
|
||||
}).expandY();
|
||||
|
||||
table.table(i -> {
|
||||
i.background(Tex.buttonEdge3);
|
||||
i.addImage(link.icon);
|
||||
i.image(link.icon);
|
||||
}).size(h - 5, h);
|
||||
|
||||
table.table(inset -> {
|
||||
@@ -64,7 +64,7 @@ public class AboutDialog extends FloatingDialog{
|
||||
inset.labelWrap(link.description).width(w - 100f).color(Color.lightGray).growX();
|
||||
}).padLeft(8);
|
||||
|
||||
table.addImageButton(Icon.link, () -> {
|
||||
table.button(Icon.link, () -> {
|
||||
if(link.name.equals("wiki")) Events.fire(Trigger.openWiki);
|
||||
|
||||
if(!Core.net.openURI(link.link)){
|
||||
@@ -82,7 +82,7 @@ public class AboutDialog extends FloatingDialog{
|
||||
|
||||
addCloseButton();
|
||||
|
||||
buttons.addButton("$credits", this::showCredits).size(200f, 64f);
|
||||
buttons.button("$credits", this::showCredits).size(200f, 64f);
|
||||
|
||||
if(Core.graphics.isPortrait()){
|
||||
for(Cell<?> cell : buttons.getCells()){
|
||||
@@ -98,7 +98,7 @@ public class AboutDialog extends FloatingDialog{
|
||||
dialog.cont.add("$credits.text").fillX().wrap().get().setAlignment(Align.center);
|
||||
dialog.cont.row();
|
||||
if(!contributors.isEmpty()){
|
||||
dialog.cont.addImage().color(Pal.accent).fillX().height(3f).pad(3f);
|
||||
dialog.cont.image().color(Pal.accent).fillX().height(3f).pad(3f);
|
||||
dialog.cont.row();
|
||||
dialog.cont.add("$contributors");
|
||||
dialog.cont.row();
|
||||
|
||||
@@ -38,7 +38,7 @@ public class AdminsDialog extends FloatingDialog{
|
||||
|
||||
res.labelWrap("[LIGHT_GRAY]" + info.lastName).width(w - h - 24f);
|
||||
res.add().growX();
|
||||
res.addImageButton(Icon.cancel, () -> {
|
||||
res.button(Icon.cancel, () -> {
|
||||
ui.showConfirm("$confirm", "$confirmunadmin", () -> {
|
||||
netServer.admins.unAdminPlayer(info.id);
|
||||
Groups.player.each(player -> {
|
||||
|
||||
@@ -39,7 +39,7 @@ public class BansDialog extends FloatingDialog{
|
||||
|
||||
res.labelWrap("IP: [LIGHT_GRAY]" + info.lastIP + "\n[]Name: [LIGHT_GRAY]" + info.lastName).width(w - h - 24f);
|
||||
res.add().growX();
|
||||
res.addImageButton(Icon.cancel, () -> {
|
||||
res.button(Icon.cancel, () -> {
|
||||
ui.showConfirm("$confirm", "$confirmunban", () -> {
|
||||
netServer.admins.unbanPlayerID(info.id);
|
||||
setup();
|
||||
|
||||
@@ -38,24 +38,24 @@ public class ColorPicker extends FloatingDialog{
|
||||
|
||||
t.defaults().padBottom(4);
|
||||
t.add("R").color(Pal.remove);
|
||||
t.addSlider(0f, 1f, 0.01f, current.r, current::r).width(w);
|
||||
t.slider(0f, 1f, 0.01f, current.r, current::r).width(w);
|
||||
t.row();
|
||||
t.add("G").color(Color.lime);
|
||||
t.addSlider(0f, 1f, 0.01f, current.g, current::g).width(w);
|
||||
t.slider(0f, 1f, 0.01f, current.g, current::g).width(w);
|
||||
t.row();
|
||||
t.add("B").color(Color.royal);
|
||||
t.addSlider(0f, 1f, 0.01f, current.b, current::b).width(w);
|
||||
t.slider(0f, 1f, 0.01f, current.b, current::b).width(w);
|
||||
t.row();
|
||||
if(alpha){
|
||||
t.add("A");
|
||||
t.addSlider(0f, 1f, 0.01f, current.a, current::a).width(w);
|
||||
t.slider(0f, 1f, 0.01f, current.a, current::a).width(w);
|
||||
t.row();
|
||||
}
|
||||
});
|
||||
|
||||
buttons.clear();
|
||||
addCloseButton();
|
||||
buttons.addImageTextButton("$ok", Icon.ok, () -> {
|
||||
buttons.button("$ok", Icon.ok, () -> {
|
||||
cons.get(current);
|
||||
hide();
|
||||
});
|
||||
|
||||
@@ -17,10 +17,10 @@ public class ControlsDialog extends KeybindDialog{
|
||||
|
||||
@Override
|
||||
public void addCloseButton(){
|
||||
buttons.addImageTextButton("$back", Icon.left, this::hide).size(230f, 64f);
|
||||
buttons.button("$back", Icon.left, this::hide).size(230f, 64f);
|
||||
|
||||
keyDown(key -> {
|
||||
if(key == KeyCode.ESCAPE || key == KeyCode.BACK)
|
||||
if(key == KeyCode.escape || key == KeyCode.back)
|
||||
hide();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -62,14 +62,14 @@ public class CustomGameDialog extends FloatingDialog{
|
||||
for(Gamemode mode : Gamemode.all){
|
||||
TextureRegionDrawable icon = Vars.ui.getIcon("mode" + Strings.capitalize(mode.name()) + "Small");
|
||||
if(mode.valid(map) && Core.atlas.isFound(icon.getRegion())){
|
||||
t.addImage(icon).size(16f).pad(4f);
|
||||
t.image(icon).size(16f).pad(4f);
|
||||
}
|
||||
}
|
||||
}).left();
|
||||
image.row();
|
||||
image.add(map.name()).pad(1f).growX().wrap().left().get().setEllipsis(true);
|
||||
image.row();
|
||||
image.addImage(Tex.whiteui, Pal.gray).growX().pad(3).height(4f);
|
||||
image.image(Tex.whiteui, Pal.gray).growX().pad(3).height(4f);
|
||||
image.row();
|
||||
image.add(img).size(images);
|
||||
|
||||
|
||||
@@ -35,12 +35,12 @@ public class CustomRulesDialog extends FloatingDialog{
|
||||
banDialog.addCloseButton();
|
||||
|
||||
banDialog.shown(this::rebuildBanned);
|
||||
banDialog.buttons.addImageTextButton("$addall", Icon.add, () -> {
|
||||
banDialog.buttons.button("$addall", Icon.add, () -> {
|
||||
rules.bannedBlocks.addAll(content.blocks().select(Block::isBuildable));
|
||||
rebuildBanned();
|
||||
}).size(180, 64f);
|
||||
|
||||
banDialog.buttons.addImageTextButton("$clear", Icon.trash, () -> {
|
||||
banDialog.buttons.button("$clear", Icon.trash, () -> {
|
||||
rules.bannedBlocks.clear();
|
||||
rebuildBanned();
|
||||
}).size(180, 64f);
|
||||
@@ -69,10 +69,10 @@ public class CustomRulesDialog extends FloatingDialog{
|
||||
for(Block block : array){
|
||||
t.table(Tex.underline, b -> {
|
||||
b.left().margin(4f);
|
||||
b.addImage(block.icon(Cicon.medium)).size(Cicon.medium.size).padRight(3);
|
||||
b.image(block.icon(Cicon.medium)).size(Cicon.medium.size).padRight(3);
|
||||
b.add(block.localizedName).color(Color.lightGray).padLeft(3).growX().left().wrap();
|
||||
|
||||
b.addImageButton(Icon.cancel, Styles.clearPartiali, () -> {
|
||||
b.button(Icon.cancel, Styles.clearPartiali, () -> {
|
||||
rules.bannedBlocks.remove(block);
|
||||
rebuildBanned();
|
||||
}).size(70f).pad(-4f).padLeft(0f);
|
||||
@@ -84,14 +84,14 @@ public class CustomRulesDialog extends FloatingDialog{
|
||||
}
|
||||
}).get().setScrollYForce(previousScroll);
|
||||
banDialog.cont.row();
|
||||
banDialog.cont.addImageTextButton("$add", Icon.add, () -> {
|
||||
banDialog.cont.button("$add", Icon.add, () -> {
|
||||
FloatingDialog dialog = new FloatingDialog("$add");
|
||||
dialog.cont.pane(t -> {
|
||||
t.left().margin(14f);
|
||||
int[] i = {0};
|
||||
content.blocks().each(b -> !rules.bannedBlocks.contains(b) && b.isBuildable(), b -> {
|
||||
int cols = mobile && Core.graphics.isPortrait() ? 4 : 12;
|
||||
t.addImageButton(new TextureRegionDrawable(b.icon(Cicon.medium)), Styles.cleari, () -> {
|
||||
t.button(new TextureRegionDrawable(b.icon(Cicon.medium)), Styles.cleari, () -> {
|
||||
rules.bannedBlocks.add(b);
|
||||
rebuildBanned();
|
||||
dialog.hide();
|
||||
@@ -118,7 +118,7 @@ public class CustomRulesDialog extends FloatingDialog{
|
||||
cont.clear();
|
||||
cont.pane(m -> main = m).get().setScrollingDisabled(true, false);
|
||||
main.margin(10f);
|
||||
main.addButton("$settings.reset", () -> {
|
||||
main.button("$settings.reset", () -> {
|
||||
rules = resetter.get();
|
||||
setup();
|
||||
requestKeyboard();
|
||||
@@ -145,7 +145,7 @@ public class CustomRulesDialog extends FloatingDialog{
|
||||
number("$rules.deconstructrefundmultiplier", false, f -> rules.deconstructRefundMultiplier = f, () -> rules.deconstructRefundMultiplier, () -> !rules.infiniteResources);
|
||||
number("$rules.blockhealthmultiplier", f -> rules.blockHealthMultiplier = f, () -> rules.blockHealthMultiplier);
|
||||
|
||||
main.addButton("$configure",
|
||||
main.button("$configure",
|
||||
() -> loadoutDialog.show(Blocks.coreShard.itemCapacity, rules.loadout,
|
||||
() -> {
|
||||
rules.loadout.clear();
|
||||
@@ -154,7 +154,7 @@ public class CustomRulesDialog extends FloatingDialog{
|
||||
)).left().width(300f);
|
||||
main.row();
|
||||
|
||||
main.addButton("$bannedblocks", banDialog::show).left().width(300f);
|
||||
main.button("$bannedblocks", banDialog::show).left().width(300f);
|
||||
main.row();
|
||||
|
||||
title("$rules.title.player");
|
||||
@@ -176,7 +176,7 @@ public class CustomRulesDialog extends FloatingDialog{
|
||||
number("$rules.solarpowermultiplier", f -> rules.solarPowerMultiplier = f, () -> rules.solarPowerMultiplier);
|
||||
check("$rules.lighting", b -> rules.lighting = b, () -> rules.lighting);
|
||||
|
||||
main.addButton(b -> {
|
||||
main.button(b -> {
|
||||
b.left();
|
||||
b.table(Tex.pane, in -> {
|
||||
in.stack(new Image(Tex.alphaBg), new Image(Tex.whiteui){{
|
||||
@@ -197,7 +197,7 @@ public class CustomRulesDialog extends FloatingDialog{
|
||||
t.left();
|
||||
t.add(text).left().padRight(5)
|
||||
.update(a -> a.setColor(condition.get() ? Color.white : Color.gray));
|
||||
Vars.platform.addDialog(t.addField((integer ? (int)prov.get() : prov.get()) + "", s -> cons.get(Strings.parseFloat(s)))
|
||||
Vars.platform.addDialog(t.field((integer ? (int)prov.get() : prov.get()) + "", s -> cons.get(Strings.parseFloat(s)))
|
||||
.padRight(100f)
|
||||
.update(a -> a.setDisabled(!condition.get()))
|
||||
.valid(Strings::canParsePositiveFloat).width(120f).left().get());
|
||||
@@ -210,14 +210,14 @@ public class CustomRulesDialog extends FloatingDialog{
|
||||
}
|
||||
|
||||
void check(String text, Boolc cons, Boolp prov, Boolp condition){
|
||||
main.addCheck(text, cons).checked(prov.get()).update(a -> a.setDisabled(!condition.get())).padRight(100f).get().left();
|
||||
main.check(text, cons).checked(prov.get()).update(a -> a.setDisabled(!condition.get())).padRight(100f).get().left();
|
||||
main.row();
|
||||
}
|
||||
|
||||
void title(String text){
|
||||
main.add(text).color(Pal.accent).padTop(20).padRight(100f).padBottom(-3);
|
||||
main.row();
|
||||
main.addImage().color(Pal.accent).height(3f).padRight(100f).padBottom(20);
|
||||
main.image().color(Pal.accent).height(3f).padRight(100f).padBottom(20);
|
||||
main.row();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import arc.scene.ui.*;
|
||||
import arc.scene.ui.layout.*;
|
||||
import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.core.GameState.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.ctype.ContentType;
|
||||
import mindustry.gen.*;
|
||||
@@ -46,7 +45,7 @@ public class DatabaseDialog extends FloatingDialog{
|
||||
|
||||
table.add("$content." + type.name() + ".name").growX().left().color(Pal.accent);
|
||||
table.row();
|
||||
table.addImage().growX().pad(5).padLeft(0).padRight(0).height(3).color(Pal.accent);
|
||||
table.image().growX().pad(5).padLeft(0).padRight(0).height(3).color(Pal.accent);
|
||||
table.row();
|
||||
table.table(list -> {
|
||||
list.left();
|
||||
@@ -69,7 +68,7 @@ public class DatabaseDialog extends FloatingDialog{
|
||||
|
||||
if(unlocked(unlock)){
|
||||
image.clicked(() -> {
|
||||
if(Core.input.keyDown(KeyCode.SHIFT_LEFT) && Fonts.getUnicode(unlock.name) != 0){
|
||||
if(Core.input.keyDown(KeyCode.shiftLeft) && Fonts.getUnicode(unlock.name) != 0){
|
||||
Core.app.setClipboardText((char)Fonts.getUnicode(unlock.name) + "");
|
||||
ui.showInfoFade("$copied");
|
||||
}else{
|
||||
|
||||
@@ -23,14 +23,14 @@ public class DiscordDialog extends Dialog{
|
||||
t.background(Tex.button).margin(0);
|
||||
|
||||
t.table(img -> {
|
||||
img.addImage().height(h - 5).width(40f).color(color);
|
||||
img.image().height(h - 5).width(40f).color(color);
|
||||
img.row();
|
||||
img.addImage().height(5).width(40f).color(color.cpy().mul(0.8f, 0.8f, 0.8f, 1f));
|
||||
img.image().height(5).width(40f).color(color.cpy().mul(0.8f, 0.8f, 0.8f, 1f));
|
||||
}).expandY();
|
||||
|
||||
t.table(i -> {
|
||||
i.background(Tex.button);
|
||||
i.addImage(Icon.discord);
|
||||
i.image(Icon.discord);
|
||||
}).size(h).left();
|
||||
|
||||
t.add("$discord").color(Pal.accent).growX().padLeft(10f);
|
||||
@@ -38,11 +38,11 @@ public class DiscordDialog extends Dialog{
|
||||
|
||||
buttons.defaults().size(150f, 50);
|
||||
|
||||
buttons.addButton("$back", this::hide);
|
||||
buttons.addButton("$copylink", () -> {
|
||||
buttons.button("$back", this::hide);
|
||||
buttons.button("$copylink", () -> {
|
||||
Core.app.setClipboardText(discordURL);
|
||||
});
|
||||
buttons.addButton("$openlink", () -> {
|
||||
buttons.button("$openlink", () -> {
|
||||
if(!Core.net.openURI(discordURL)){
|
||||
ui.showErrorMessage("$linkfail");
|
||||
Core.app.setClipboardText(discordURL);
|
||||
|
||||
@@ -20,7 +20,7 @@ public class FloatingDialog extends Dialog{
|
||||
setFillParent(true);
|
||||
this.title.setAlignment(Align.center);
|
||||
titleTable.row();
|
||||
titleTable.addImage(Tex.whiteui, Pal.accent)
|
||||
titleTable.image(Tex.whiteui, Pal.accent)
|
||||
.growX().height(3f).pad(4f);
|
||||
|
||||
hidden(() -> {
|
||||
@@ -56,10 +56,10 @@ public class FloatingDialog extends Dialog{
|
||||
@Override
|
||||
public void addCloseButton(){
|
||||
buttons.defaults().size(210f, 64f);
|
||||
buttons.addImageTextButton("$back", Icon.left, this::hide).size(210f, 64f);
|
||||
buttons.button("$back", Icon.left, this::hide).size(210f, 64f);
|
||||
|
||||
keyDown(key -> {
|
||||
if(key == KeyCode.ESCAPE || key == KeyCode.BACK){
|
||||
if(key == KeyCode.escape || key == KeyCode.back){
|
||||
Core.app.post(this::hide);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -37,7 +37,7 @@ public class GameOverDialog extends FloatingDialog{
|
||||
|
||||
if(state.rules.pvp){
|
||||
cont.add(Core.bundle.format("gameover.pvp", winner.localized())).pad(6);
|
||||
buttons.addButton("$menu", () -> {
|
||||
buttons.button("$menu", () -> {
|
||||
hide();
|
||||
logic.reset();
|
||||
}).size(130f, 60f);
|
||||
@@ -71,7 +71,7 @@ public class GameOverDialog extends FloatingDialog{
|
||||
if(state.stats.itemsDelivered.get(item, 0) > 0){
|
||||
t.table(items -> {
|
||||
items.add(" [LIGHT_GRAY]" + state.stats.itemsDelivered.get(item, 0));
|
||||
items.addImage(item.icon(Cicon.small)).size(8 * 3).pad(4);
|
||||
items.image(item.icon(Cicon.small)).size(8 * 3).pad(4);
|
||||
}).left();
|
||||
t.row();
|
||||
}
|
||||
@@ -86,13 +86,13 @@ public class GameOverDialog extends FloatingDialog{
|
||||
}).pad(12);
|
||||
|
||||
if(state.isCampaign()){
|
||||
buttons.addButton("$continue", () -> {
|
||||
buttons.button("$continue", () -> {
|
||||
hide();
|
||||
logic.reset();
|
||||
ui.planet.show();
|
||||
}).size(130f, 60f);
|
||||
}else{
|
||||
buttons.addButton("$menu", () -> {
|
||||
buttons.button("$menu", () -> {
|
||||
hide();
|
||||
logic.reset();
|
||||
}).size(130f, 60f);
|
||||
|
||||
@@ -22,14 +22,14 @@ public class HostDialog extends FloatingDialog{
|
||||
|
||||
cont.table(t -> {
|
||||
t.add("$name").padRight(10);
|
||||
t.addField(Core.settings.getString("name"), text -> {
|
||||
t.field(Core.settings.getString("name"), text -> {
|
||||
player.name(text);
|
||||
Core.settings.put("name", text);
|
||||
Core.settings.save();
|
||||
ui.listfrag.rebuild();
|
||||
}).grow().pad(8).get().setMaxLength(40);
|
||||
|
||||
ImageButton button = t.addImageButton(Tex.whiteui, Styles.clearFulli, 40, () -> {
|
||||
ImageButton button = t.button(Tex.whiteui, Styles.clearFulli, 40, () -> {
|
||||
new PaletteDialog().show(color -> {
|
||||
player.color().set(color);
|
||||
Core.settings.put("color-0", color.rgba());
|
||||
@@ -43,7 +43,7 @@ public class HostDialog extends FloatingDialog{
|
||||
|
||||
cont.add().width(65f);
|
||||
|
||||
cont.addButton("$host", () -> {
|
||||
cont.button("$host", () -> {
|
||||
if(Core.settings.getString("name").trim().isEmpty()){
|
||||
ui.showInfo("$noname");
|
||||
return;
|
||||
@@ -52,7 +52,7 @@ public class HostDialog extends FloatingDialog{
|
||||
runHost();
|
||||
}).width(w).height(70f);
|
||||
|
||||
cont.addButton("?", () -> ui.showInfo("$host.info")).size(65f, 70f).padLeft(6f);
|
||||
cont.button("?", () -> ui.showInfo("$host.info")).size(65f, 70f).padLeft(6f);
|
||||
|
||||
shown(() -> {
|
||||
if(!steam){
|
||||
|
||||
@@ -41,13 +41,13 @@ public class JoinDialog extends FloatingDialog{
|
||||
|
||||
buttons.add().growX().width(-1);
|
||||
if(!steam){
|
||||
buttons.addButton("?", () -> ui.showInfo("$join.info")).size(60f, 64f).width(-1);
|
||||
buttons.button("?", () -> ui.showInfo("$join.info")).size(60f, 64f).width(-1);
|
||||
}
|
||||
|
||||
add = new FloatingDialog("$joingame.title");
|
||||
add.cont.add("$joingame.ip").padRight(5f).left();
|
||||
|
||||
TextField field = add.cont.addField(Core.settings.getString("ip"), text -> {
|
||||
TextField field = add.cont.field(Core.settings.getString("ip"), text -> {
|
||||
Core.settings.put("ip", text);
|
||||
Core.settings.save();
|
||||
}).size(320f, 54f).get();
|
||||
@@ -56,8 +56,8 @@ public class JoinDialog extends FloatingDialog{
|
||||
|
||||
add.cont.row();
|
||||
add.buttons.defaults().size(140f, 60f).pad(4f);
|
||||
add.buttons.addButton("$cancel", add::hide);
|
||||
add.buttons.addButton("$ok", () -> {
|
||||
add.buttons.button("$cancel", add::hide);
|
||||
add.buttons.button("$ok", () -> {
|
||||
if(renaming == null){
|
||||
Server server = new Server();
|
||||
server.setIP(Core.settings.getString("ip"));
|
||||
@@ -81,7 +81,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
}
|
||||
});
|
||||
|
||||
keyDown(KeyCode.F5, this::refreshAll);
|
||||
keyDown(KeyCode.f5, this::refreshAll);
|
||||
|
||||
shown(() -> {
|
||||
setup();
|
||||
@@ -111,7 +111,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
//why are java lambdas this bad
|
||||
TextButton[] buttons = {null};
|
||||
|
||||
TextButton button = buttons[0] = remote.addButton("[accent]" + server.displayIP(), Styles.cleart, () -> {
|
||||
TextButton button = buttons[0] = remote.button("[accent]" + server.displayIP(), Styles.cleart, () -> {
|
||||
if(!buttons[0].childrenPressed()){
|
||||
if(server.lastHost != null){
|
||||
safeConnect(server.ip, server.port, server.lastHost.version);
|
||||
@@ -129,26 +129,26 @@ public class JoinDialog extends FloatingDialog{
|
||||
|
||||
inner.add(button.getLabel()).growX();
|
||||
|
||||
inner.addImageButton(Icon.upOpen, Styles.emptyi, () -> {
|
||||
inner.button(Icon.upOpen, Styles.emptyi, () -> {
|
||||
moveRemote(server, -1);
|
||||
|
||||
}).margin(3f).padTop(6f).top().right();
|
||||
|
||||
inner.addImageButton(Icon.downOpen, Styles.emptyi, () -> {
|
||||
inner.button(Icon.downOpen, Styles.emptyi, () -> {
|
||||
moveRemote(server, +1);
|
||||
|
||||
}).margin(3f).pad(2).padTop(6f).top().right();
|
||||
|
||||
inner.addImageButton(Icon.refresh, Styles.emptyi, () -> {
|
||||
inner.button(Icon.refresh, Styles.emptyi, () -> {
|
||||
refreshServer(server);
|
||||
}).margin(3f).pad(2).padTop(6f).top().right();
|
||||
|
||||
inner.addImageButton(Icon.pencil, Styles.emptyi, () -> {
|
||||
inner.button(Icon.pencil, Styles.emptyi, () -> {
|
||||
renaming = server;
|
||||
add.show();
|
||||
}).margin(3f).pad(2).padTop(6f).top().right();
|
||||
|
||||
inner.addImageButton(Icon.trash, Styles.emptyi, () -> {
|
||||
inner.button(Icon.trash, Styles.emptyi, () -> {
|
||||
ui.showConfirm("$confirm", "$server.delete", () -> {
|
||||
servers.remove(server, true);
|
||||
saveServers();
|
||||
@@ -262,7 +262,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
cont.table(t -> {
|
||||
t.add("$name").padRight(10);
|
||||
if(!steam){
|
||||
t.addField(Core.settings.getString("name"), text -> {
|
||||
t.field(Core.settings.getString("name"), text -> {
|
||||
player.name(text);
|
||||
Core.settings.put("name", text);
|
||||
Core.settings.save();
|
||||
@@ -271,7 +271,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
t.add(player.name()).update(l -> l.setColor(player.color())).grow().pad(8);
|
||||
}
|
||||
|
||||
ImageButton button = t.addImageButton(Tex.whiteui, Styles.clearFulli, 40, () -> {
|
||||
ImageButton button = t.button(Tex.whiteui, Styles.clearFulli, 40, () -> {
|
||||
new PaletteDialog().show(color -> {
|
||||
player.color().set(color);
|
||||
Core.settings.put("color-0", color.rgba8888());
|
||||
@@ -283,7 +283,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
cont.row();
|
||||
cont.add(pane).width(w + 38).pad(0);
|
||||
cont.row();
|
||||
cont.addCenteredImageTextButton("$server.add", Icon.add, () -> {
|
||||
cont.buttonCenter("$server.add", Icon.add, () -> {
|
||||
renaming = null;
|
||||
add.show();
|
||||
}).marginLeft(10).width(w).height(80f).update(button -> {
|
||||
@@ -310,13 +310,13 @@ public class JoinDialog extends FloatingDialog{
|
||||
|
||||
hosts.table(name -> {
|
||||
name.add(label).pad(10).growX().left().color(Pal.accent);
|
||||
name.addImageButton(Icon.downOpen, Styles.emptyi, () -> {
|
||||
name.button(Icon.downOpen, Styles.emptyi, () -> {
|
||||
coll.toggle(false);
|
||||
Core.settings.putSave("collapsed-" + label, coll.isCollapsed());
|
||||
}).update(i -> i.getStyle().imageUp = (!coll.isCollapsed() ? Icon.upOpen : Icon.downOpen)).size(40f).right().padRight(10f);
|
||||
}).growX();
|
||||
hosts.row();
|
||||
hosts.addImage().growX().pad(5).padLeft(10).padRight(10).height(3).color(Pal.accent);
|
||||
hosts.image().growX().pad(5).padLeft(10).padRight(10).height(3).color(Pal.accent);
|
||||
hosts.row();
|
||||
hosts.add(coll).width(targetWidth());
|
||||
hosts.row();
|
||||
@@ -350,7 +350,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
local.background(Tex.button);
|
||||
local.add("$hosts.none").pad(10f);
|
||||
local.add().growX();
|
||||
local.addImageButton(Icon.refresh, this::refreshLocal).pad(-12f).padLeft(0).size(70f);
|
||||
local.button(Icon.refresh, this::refreshLocal).pad(-12f).padLeft(0).size(70f);
|
||||
}else{
|
||||
local.background(null);
|
||||
}
|
||||
@@ -366,7 +366,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
|
||||
local.row();
|
||||
|
||||
TextButton button = local.addButton("", Styles.cleart, () -> safeConnect(host.address, host.port, host.version))
|
||||
TextButton button = local.button("", Styles.cleart, () -> safeConnect(host.address, host.port, host.version))
|
||||
.width(w).pad(5f).get();
|
||||
button.clearChildren();
|
||||
buildServer(host, button);
|
||||
@@ -378,7 +378,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
|
||||
global.row();
|
||||
|
||||
TextButton button = global.addButton("", Styles.cleart, () -> safeConnect(host.address, host.port, host.version))
|
||||
TextButton button = global.button("", Styles.cleart, () -> safeConnect(host.address, host.port, host.version))
|
||||
.width(w).pad(5f).get();
|
||||
button.clearChildren();
|
||||
buildServer(host, button);
|
||||
|
||||
@@ -70,25 +70,25 @@ public class LoadDialog extends FloatingDialog{
|
||||
t.right();
|
||||
t.defaults().size(40f);
|
||||
|
||||
t.addImageButton(Icon.save, Styles.emptytogglei, () -> {
|
||||
t.button(Icon.save, Styles.emptytogglei, () -> {
|
||||
slot.setAutosave(!slot.isAutosave());
|
||||
}).checked(slot.isAutosave()).right();
|
||||
|
||||
t.addImageButton(Icon.trash, Styles.emptyi, () -> {
|
||||
t.button(Icon.trash, Styles.emptyi, () -> {
|
||||
ui.showConfirm("$confirm", "$save.delete.confirm", () -> {
|
||||
slot.delete();
|
||||
setup();
|
||||
});
|
||||
}).right();
|
||||
|
||||
t.addImageButton(Icon.pencil, Styles.emptyi, () -> {
|
||||
t.button(Icon.pencil, Styles.emptyi, () -> {
|
||||
ui.showTextInput("$save.rename", "$save.rename.text", slot.getName(), text -> {
|
||||
slot.setName(text);
|
||||
setup();
|
||||
});
|
||||
}).right();
|
||||
|
||||
t.addImageButton(Icon.export, Styles.emptyi, () -> platform.export("save-" + slot.getName(), saveExtension, slot::exportFile)).right();
|
||||
t.button(Icon.export, Styles.emptyi, () -> platform.export("save-" + slot.getName(), saveExtension, slot::exportFile)).right();
|
||||
|
||||
}).padRight(-10).growX();
|
||||
}).growX().colspan(2);
|
||||
@@ -142,13 +142,13 @@ public class LoadDialog extends FloatingDialog{
|
||||
|
||||
if(!valids){
|
||||
slots.row();
|
||||
slots.addButton("$save.none", () -> {
|
||||
slots.button("$save.none", () -> {
|
||||
}).disabled(true).fillX().margin(20f).minWidth(340f).height(80f).pad(4f);
|
||||
}
|
||||
|
||||
slots.row();
|
||||
|
||||
slots.addImageTextButton("$save.import", Icon.add, () -> {
|
||||
slots.button("$save.import", Icon.add, () -> {
|
||||
platform.showFileChooser(true, saveExtension, file -> {
|
||||
if(SaveIO.isSaveValid(file)){
|
||||
try{
|
||||
|
||||
@@ -26,7 +26,7 @@ public class LoadoutDialog extends FloatingDialog{
|
||||
setFillParent(true);
|
||||
|
||||
keyDown(key -> {
|
||||
if(key == KeyCode.ESCAPE || key == KeyCode.BACK){
|
||||
if(key == KeyCode.escape || key == KeyCode.back){
|
||||
Core.app.post(this::hide);
|
||||
}
|
||||
});
|
||||
@@ -42,9 +42,9 @@ public class LoadoutDialog extends FloatingDialog{
|
||||
}
|
||||
});
|
||||
|
||||
buttons.addImageTextButton("$back", Icon.left, this::hide).size(210f, 64f);
|
||||
buttons.button("$back", Icon.left, this::hide).size(210f, 64f);
|
||||
|
||||
buttons.addImageTextButton("$settings.reset", Icon.refresh, () -> {
|
||||
buttons.button("$settings.reset", Icon.refresh, () -> {
|
||||
resetter.run();
|
||||
reseed();
|
||||
updater.run();
|
||||
@@ -73,17 +73,17 @@ public class LoadoutDialog extends FloatingDialog{
|
||||
for(ItemStack stack : stacks){
|
||||
items.table(Tex.pane, t -> {
|
||||
t.margin(4).marginRight(8).left();
|
||||
t.addButton("-", Styles.cleart, () -> {
|
||||
t.button("-", Styles.cleart, () -> {
|
||||
stack.amount = Math.max(stack.amount - step(stack.amount), 0);
|
||||
updater.run();
|
||||
}).size(bsize);
|
||||
|
||||
t.addButton("+", Styles.cleart, () -> {
|
||||
t.button("+", Styles.cleart, () -> {
|
||||
stack.amount = Math.min(stack.amount + step(stack.amount), capacity);
|
||||
updater.run();
|
||||
}).size(bsize);
|
||||
|
||||
t.addImageButton(Icon.pencil, Styles.cleari, () -> ui.showTextInput("$configure", stack.item.localizedName, 10, stack.amount + "", true, str -> {
|
||||
t.button(Icon.pencil, Styles.cleari, () -> ui.showTextInput("$configure", stack.item.localizedName, 10, stack.amount + "", true, str -> {
|
||||
if(Strings.canParsePostiveInt(str)){
|
||||
int amount = Strings.parseInt(str);
|
||||
if(amount >= 0 && amount <= capacity){
|
||||
@@ -95,7 +95,7 @@ public class LoadoutDialog extends FloatingDialog{
|
||||
ui.showInfo(Core.bundle.format("configure.invalid", capacity));
|
||||
})).size(bsize);
|
||||
|
||||
t.addImage(stack.item.icon(Cicon.small)).size(8 * 3).padRight(4).padLeft(4);
|
||||
t.image(stack.item.icon(Cicon.small)).size(8 * 3).padRight(4).padLeft(4);
|
||||
t.label(() -> stack.amount + "").left().width(90f);
|
||||
}).pad(2).left().fillX();
|
||||
|
||||
|
||||
@@ -56,18 +56,18 @@ public class MapPlayDialog extends FloatingDialog{
|
||||
for(Gamemode mode : Gamemode.values()){
|
||||
if(mode.hidden) continue;
|
||||
|
||||
modes.addButton(mode.toString(), Styles.togglet, () -> {
|
||||
modes.button(mode.toString(), Styles.togglet, () -> {
|
||||
selectedGamemode = mode;
|
||||
rules = map.applyRules(mode);
|
||||
}).update(b -> b.setChecked(selectedGamemode == mode)).size(140f, 54f).disabled(!mode.valid(map));
|
||||
if(i++ % 2 == 1) modes.row();
|
||||
}
|
||||
selmode.add(modes);
|
||||
selmode.addButton("?", this::displayGameModeHelp).width(50f).fillY().padLeft(18f);
|
||||
selmode.button("?", this::displayGameModeHelp).width(50f).fillY().padLeft(18f);
|
||||
|
||||
cont.add(selmode);
|
||||
cont.row();
|
||||
cont.addImageTextButton("$customize", Icon.settings, () -> dialog.show(rules, () -> rules = map.applyRules(selectedGamemode))).width(230);
|
||||
cont.button("$customize", Icon.settings, () -> dialog.show(rules, () -> rules = map.applyRules(selectedGamemode))).width(230);
|
||||
cont.row();
|
||||
cont.add(new BorderImage(map.safeTexture(), 3f)).size(mobile && !Core.graphics.isPortrait() ? 150f : 250f).get().setScaling(Scaling.fit);
|
||||
//only maps with survival are valid for high scores
|
||||
@@ -79,7 +79,7 @@ public class MapPlayDialog extends FloatingDialog{
|
||||
buttons.clearChildren();
|
||||
addCloseButton();
|
||||
|
||||
buttons.addImageTextButton("$play", Icon.play, () -> {
|
||||
buttons.button("$play", Icon.play, () -> {
|
||||
control.playMap(map, rules);
|
||||
hide();
|
||||
ui.custom.hide();
|
||||
@@ -103,7 +103,7 @@ public class MapPlayDialog extends FloatingDialog{
|
||||
}
|
||||
|
||||
d.cont.add(pane);
|
||||
d.buttons.addButton("$ok", d::hide).size(110, 50).pad(10f);
|
||||
d.buttons.button("$ok", d::hide).size(110, 50).pad(10f);
|
||||
d.show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class MapsDialog extends FloatingDialog{
|
||||
buttons.remove();
|
||||
|
||||
keyDown(key -> {
|
||||
if(key == KeyCode.ESCAPE || key == KeyCode.BACK){
|
||||
if(key == KeyCode.escape || key == KeyCode.back){
|
||||
Core.app.post(this::hide);
|
||||
}
|
||||
});
|
||||
@@ -44,13 +44,13 @@ public class MapsDialog extends FloatingDialog{
|
||||
buttons.clearChildren();
|
||||
|
||||
if(Core.graphics.isPortrait()){
|
||||
buttons.addImageTextButton("$back", Icon.left, this::hide).size(210f*2f, 64f).colspan(2);
|
||||
buttons.button("$back", Icon.left, this::hide).size(210f*2f, 64f).colspan(2);
|
||||
buttons.row();
|
||||
}else{
|
||||
buttons.addImageTextButton("$back", Icon.left, this::hide).size(210f, 64f);
|
||||
buttons.button("$back", Icon.left, this::hide).size(210f, 64f);
|
||||
}
|
||||
|
||||
buttons.addImageTextButton("$editor.newmap", Icon.add, () -> {
|
||||
buttons.button("$editor.newmap", Icon.add, () -> {
|
||||
ui.showTextInput("$editor.newmap", "$editor.mapname", "", text -> {
|
||||
Runnable show = () -> ui.loadAnd(() -> {
|
||||
hide();
|
||||
@@ -67,7 +67,7 @@ public class MapsDialog extends FloatingDialog{
|
||||
});
|
||||
}).size(210f, 64f);
|
||||
|
||||
buttons.addImageTextButton("$editor.importmap", Icon.upload, () -> {
|
||||
buttons.button("$editor.importmap", Icon.upload, () -> {
|
||||
platform.showFileChooser(true, mapExtension, file -> {
|
||||
ui.loadAnd(() -> {
|
||||
maps.tryCatchMapError(() -> {
|
||||
@@ -134,12 +134,12 @@ public class MapsDialog extends FloatingDialog{
|
||||
maps.row();
|
||||
}
|
||||
|
||||
TextButton button = maps.addButton("", Styles.cleart, () -> showMapInfo(map)).width(mapsize).pad(8).get();
|
||||
TextButton button = maps.button("", Styles.cleart, () -> showMapInfo(map)).width(mapsize).pad(8).get();
|
||||
button.clearChildren();
|
||||
button.margin(9);
|
||||
button.add(map.name()).width(mapsize - 18f).center().get().setEllipsis(true);
|
||||
button.row();
|
||||
button.addImage().growX().pad(4).color(Pal.gray);
|
||||
button.image().growX().pad(4).color(Pal.gray);
|
||||
button.row();
|
||||
button.stack(new Image(map.safeTexture()).setScaling(Scaling.fit), new BorderImage(map.safeTexture()).setScaling(Scaling.fit)).size(mapsize - 20f);
|
||||
button.row();
|
||||
@@ -192,7 +192,7 @@ public class MapsDialog extends FloatingDialog{
|
||||
|
||||
table.row();
|
||||
|
||||
table.addImageTextButton("$editor.openin", Icon.export, () -> {
|
||||
table.button("$editor.openin", Icon.export, () -> {
|
||||
try{
|
||||
Vars.ui.editor.beginEditMap(map.file);
|
||||
dialog.hide();
|
||||
@@ -203,7 +203,7 @@ public class MapsDialog extends FloatingDialog{
|
||||
}
|
||||
}).fillX().height(54f).marginLeft(10);
|
||||
|
||||
table.addImageTextButton(map.workshop && steam ? "$view.workshop" : "$delete", map.workshop && steam ? Icon.link : Icon.trash, () -> {
|
||||
table.button(map.workshop && steam ? "$view.workshop" : "$delete", map.workshop && steam ? Icon.link : Icon.trash, () -> {
|
||||
if(map.workshop && steam){
|
||||
platform.viewListing(map);
|
||||
}else{
|
||||
|
||||
@@ -28,7 +28,7 @@ public class MinimapDialog extends FloatingDialog{
|
||||
cont.clear();
|
||||
|
||||
cont.table(Tex.pane,t -> {
|
||||
t.addRect((x, y, width, height) -> {
|
||||
t.rect((x, y, width, height) -> {
|
||||
if(renderer.minimap.getRegion() == null) return;
|
||||
Draw.color(Color.white);
|
||||
Draw.alpha(parentAlpha);
|
||||
|
||||
@@ -23,7 +23,7 @@ public class ModsDialog extends FloatingDialog{
|
||||
super("$mods");
|
||||
addCloseButton();
|
||||
|
||||
buttons.addImageTextButton("$mods.guide", Icon.link, () -> Core.net.openURI(modGuideURL)).size(210, 64f);
|
||||
buttons.button("$mods.guide", Icon.link, () -> Core.net.openURI(modGuideURL)).size(210, 64f);
|
||||
|
||||
|
||||
shown(this::setup);
|
||||
@@ -66,7 +66,7 @@ public class ModsDialog extends FloatingDialog{
|
||||
TextButtonStyle style = Styles.clearPartialt;
|
||||
float margin = 12f;
|
||||
|
||||
buttons.addImageTextButton("$mod.import", Icon.add, style, () -> {
|
||||
buttons.button("$mod.import", Icon.add, style, () -> {
|
||||
FloatingDialog dialog = new FloatingDialog("$mod.import");
|
||||
|
||||
TextButtonStyle bstyle = Styles.cleart;
|
||||
@@ -75,7 +75,7 @@ public class ModsDialog extends FloatingDialog{
|
||||
t.defaults().size(300f, 70f);
|
||||
t.margin(12f);
|
||||
|
||||
t.addImageTextButton("$mod.import.file", Icon.file, bstyle, () -> {
|
||||
t.button("$mod.import.file", Icon.file, bstyle, () -> {
|
||||
dialog.hide();
|
||||
|
||||
platform.showFileChooser(true, "zip", file -> {
|
||||
@@ -91,7 +91,7 @@ public class ModsDialog extends FloatingDialog{
|
||||
|
||||
t.row();
|
||||
|
||||
t.addImageTextButton("$mod.import.github", Icon.github, bstyle, () -> {
|
||||
t.button("$mod.import.github", Icon.github, bstyle, () -> {
|
||||
dialog.hide();
|
||||
|
||||
ui.showTextInput("$mod.import.github", "", 64, "Anuken/ExampleMod", text -> {
|
||||
@@ -131,10 +131,10 @@ public class ModsDialog extends FloatingDialog{
|
||||
dialog.show();
|
||||
}).margin(margin);
|
||||
|
||||
buttons.addImageTextButton("$mods.reload", Icon.refresh, style, this::reload).margin(margin);
|
||||
buttons.button("$mods.reload", Icon.refresh, style, this::reload).margin(margin);
|
||||
|
||||
if(!mobile){
|
||||
buttons.addImageTextButton("$mods.openfolder", Icon.link, style, () -> Core.app.openFolder(modDirectory.absolutePath())).margin(margin);
|
||||
buttons.button("$mods.openfolder", Icon.link, style, () -> Core.app.openFolder(modDirectory.absolutePath())).margin(margin);
|
||||
}
|
||||
}).width(w);
|
||||
|
||||
@@ -151,11 +151,11 @@ public class ModsDialog extends FloatingDialog{
|
||||
if(!mod.enabled() && !anyDisabled && mods.list().size > 0){
|
||||
anyDisabled = true;
|
||||
table.row();
|
||||
table.addImage().growX().height(4f).pad(6f).color(Pal.gray);
|
||||
table.image().growX().height(4f).pad(6f).color(Pal.gray);
|
||||
table.row();
|
||||
}
|
||||
|
||||
table.addButton(t -> {
|
||||
table.button(t -> {
|
||||
t.top().left();
|
||||
t.margin(12f);
|
||||
|
||||
@@ -176,26 +176,26 @@ public class ModsDialog extends FloatingDialog{
|
||||
Fonts.def.draw(letter, x + width/2f, y + height/2f, Align.center);
|
||||
}
|
||||
}
|
||||
}.border(Pal.accent)).size(h - 8f).padTop(-8f).padLeft(-8f).padRight(6f);
|
||||
}.border(Pal.accent)).size(h - 8f).padTop(-8f).padLeft(-8f).padRight(2f);
|
||||
|
||||
t.defaults().left().top();
|
||||
t.table(title -> {
|
||||
title.left();
|
||||
title.add("" + mod.meta.displayName() + "\n[lightgray]v" + mod.meta.version + (mod.enabled() ? "" : "\n" + Core.bundle.get("mod.disabled") + "")).growX();
|
||||
title.add("" + mod.meta.displayName() + "\n[lightgray]v" + mod.meta.version + (mod.enabled() ? "" : "\n" + Core.bundle.get("mod.disabled") + "")).wrap().width(170f).growX();
|
||||
title.add().growX();
|
||||
|
||||
title.addImageTextButton(mod.enabled() ? "$mod.disable" : "$mod.enable", mod.enabled() ? Icon.downOpen : Icon.upOpen, Styles.transt, () -> {
|
||||
title.button(mod.enabled() ? "$mod.disable" : "$mod.enable", mod.enabled() ? Icon.downOpen : Icon.upOpen, Styles.transt, () -> {
|
||||
mods.setEnabled(mod, !mod.enabled());
|
||||
setup();
|
||||
}).height(50f).margin(8f).width(130f).disabled(!mod.isSupported());
|
||||
|
||||
if(steam && !mod.hasSteamID()){
|
||||
title.addImageButton(Icon.download, Styles.clearTransi, () -> {
|
||||
title.button(Icon.download, Styles.clearTransi, () -> {
|
||||
platform.publish(mod);
|
||||
}).size(50f);
|
||||
}
|
||||
|
||||
title.addImageButton(mod.hasSteamID() ? Icon.link : Icon.trash, Styles.clearPartiali, () -> {
|
||||
title.button(mod.hasSteamID() ? Icon.link : Icon.trash, Styles.clearPartiali, () -> {
|
||||
if(!mod.hasSteamID()){
|
||||
ui.showConfirm("$confirm", "$mod.remove.confirm", () -> {
|
||||
mods.removeMod(mod);
|
||||
@@ -250,7 +250,7 @@ public class ModsDialog extends FloatingDialog{
|
||||
dialog.addCloseButton();
|
||||
|
||||
if(!mobile){
|
||||
dialog.buttons.addImageTextButton("$mods.openfolder", Icon.link, () -> Core.app.openFolder(mod.file.absolutePath()));
|
||||
dialog.buttons.button("$mods.openfolder", Icon.link, () -> Core.app.openFolder(mod.file.absolutePath()));
|
||||
}
|
||||
|
||||
//TODO improve this menu later
|
||||
|
||||
@@ -25,7 +25,7 @@ public class PaletteDialog extends Dialog{
|
||||
for(int i = 0; i < playerColors.length; i++){
|
||||
Color color = playerColors[i];
|
||||
|
||||
ImageButton button = table.addImageButton(Tex.whiteui, Styles.clearTogglei, 34, () -> {
|
||||
ImageButton button = table.button(Tex.whiteui, Styles.clearTogglei, 34, () -> {
|
||||
cons.get(color);
|
||||
hide();
|
||||
}).size(48).get();
|
||||
@@ -38,7 +38,7 @@ public class PaletteDialog extends Dialog{
|
||||
}
|
||||
|
||||
keyDown(key -> {
|
||||
if(key == KeyCode.ESCAPE || key == KeyCode.BACK)
|
||||
if(key == KeyCode.escape || key == KeyCode.back)
|
||||
hide();
|
||||
});
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ public class PausedDialog extends FloatingDialog{
|
||||
shown(this::rebuild);
|
||||
|
||||
keyDown(key -> {
|
||||
if(key == KeyCode.ESCAPE || key == KeyCode.BACK){
|
||||
if(key == KeyCode.escape || key == KeyCode.back){
|
||||
hide();
|
||||
}
|
||||
});
|
||||
@@ -37,26 +37,26 @@ public class PausedDialog extends FloatingDialog{
|
||||
float dw = 220f;
|
||||
cont.defaults().width(dw).height(55).pad(5f);
|
||||
|
||||
cont.addImageTextButton("$back", Icon.left, this::hide).colspan(2).width(dw * 2 + 20f);
|
||||
cont.button("$back", Icon.left, this::hide).colspan(2).width(dw * 2 + 20f);
|
||||
|
||||
cont.row();
|
||||
if(state.isCampaign()){
|
||||
cont.addImageTextButton("$techtree", Icon.tree, ui.tech::show);
|
||||
cont.button("$techtree", Icon.tree, ui.tech::show);
|
||||
}else{
|
||||
cont.addImageTextButton("$database", Icon.book, ui.database::show);
|
||||
cont.button("$database", Icon.book, ui.database::show);
|
||||
}
|
||||
cont.addImageTextButton("$settings", Icon.settings, ui.settings::show);
|
||||
cont.button("$settings", Icon.settings, ui.settings::show);
|
||||
|
||||
if(!state.rules.tutorial){
|
||||
if(!state.isCampaign() && !state.isEditor()){
|
||||
cont.row();
|
||||
cont.addImageTextButton("$savegame", Icon.save, save::show);
|
||||
cont.addImageTextButton("$loadgame", Icon.upload, load::show).disabled(b -> net.active());
|
||||
cont.button("$savegame", Icon.save, save::show);
|
||||
cont.button("$loadgame", Icon.upload, load::show).disabled(b -> net.active());
|
||||
}
|
||||
|
||||
cont.row();
|
||||
|
||||
cont.addImageTextButton("$hostserver", Icon.host, () -> {
|
||||
cont.button("$hostserver", Icon.host, () -> {
|
||||
if(net.server() && steam){
|
||||
platform.inviteFriends();
|
||||
}else{
|
||||
@@ -71,26 +71,26 @@ public class PausedDialog extends FloatingDialog{
|
||||
|
||||
cont.row();
|
||||
|
||||
cont.addImageTextButton("$quit", Icon.exit, this::showQuitConfirm).colspan(2).width(dw + 20f).update(s -> s.setText(control.saves.getCurrent() != null && control.saves.getCurrent().isAutosave() ? "$save.quit" : "$quit"));
|
||||
cont.button("$quit", Icon.exit, this::showQuitConfirm).colspan(2).width(dw + 20f).update(s -> s.setText(control.saves.getCurrent() != null && control.saves.getCurrent().isAutosave() ? "$save.quit" : "$quit"));
|
||||
|
||||
}else{
|
||||
cont.defaults().size(130f).pad(5);
|
||||
cont.addRowImageTextButton("$back", Icon.play, this::hide);
|
||||
cont.addRowImageTextButton("$settings", Icon.settings, ui.settings::show);
|
||||
cont.buttonRow("$back", Icon.play, this::hide);
|
||||
cont.buttonRow("$settings", Icon.settings, ui.settings::show);
|
||||
|
||||
if(!state.isCampaign() && !state.isEditor()){
|
||||
cont.addRowImageTextButton("$save", Icon.save, save::show);
|
||||
cont.buttonRow("$save", Icon.save, save::show);
|
||||
|
||||
cont.row();
|
||||
|
||||
cont.addRowImageTextButton("$load", Icon.download, load::show).disabled(b -> net.active());
|
||||
cont.buttonRow("$load", Icon.download, load::show).disabled(b -> net.active());
|
||||
}else{
|
||||
cont.row();
|
||||
}
|
||||
|
||||
cont.addRowImageTextButton("$hostserver.mobile", Icon.host, ui.host::show).disabled(b -> net.active());
|
||||
cont.buttonRow("$hostserver.mobile", Icon.host, ui.host::show).disabled(b -> net.active());
|
||||
|
||||
cont.addRowImageTextButton("$quit", Icon.exit, this::showQuitConfirm).update(s -> {
|
||||
cont.buttonRow("$quit", Icon.exit, this::showQuitConfirm).update(s -> {
|
||||
s.setText(control.saves.getCurrent() != null && control.saves.getCurrent().isAutosave() ? "$save.quit" : "$quit");
|
||||
s.getLabelCell().growX().wrap();
|
||||
});
|
||||
|
||||
@@ -92,7 +92,7 @@ public class PlanetDialog extends FloatingDialog{
|
||||
float bmargin = 6f;
|
||||
|
||||
//TODO names
|
||||
buttons.addImageTextButton("$back", Icon.left, style, this::hide).margin(bmargin);
|
||||
buttons.button("$back", Icon.left, style, this::hide).margin(bmargin);
|
||||
//buttons.addImageTextButton("Tech", Icon.tree, style, () -> ui.tech.show()).margin(bmargin);
|
||||
//buttons.addImageTextButton("Launch", Icon.upOpen, style, this::hide).margin(bmargin);
|
||||
//buttons.addImageTextButton("Database", Icon.book, style, () -> ui.database.show()).margin(bmargin);
|
||||
@@ -163,7 +163,7 @@ public class PlanetDialog extends FloatingDialog{
|
||||
cont.clear();
|
||||
titleTable.remove();
|
||||
|
||||
cont.addRect((x, y, w, h) -> render()).grow();
|
||||
cont.rect((x, y, w, h) -> render()).grow();
|
||||
}
|
||||
|
||||
private void render(){
|
||||
@@ -341,7 +341,7 @@ public class PlanetDialog extends FloatingDialog{
|
||||
//TODO add strings to bundle after prototyping is done
|
||||
|
||||
stable.add("[accent]" + selected.id).row();
|
||||
stable.addImage().color(Pal.accent).fillX().height(3f).pad(3f).row();
|
||||
stable.image().color(Pal.accent).fillX().height(3f).pad(3f).row();
|
||||
stable.add(selected.save != null ? selected.save.getPlayTime() : "[lightgray]Unexplored").row();
|
||||
|
||||
stable.add("Resources:").row();
|
||||
@@ -350,14 +350,14 @@ public class PlanetDialog extends FloatingDialog{
|
||||
int idx = 0;
|
||||
int max = 5;
|
||||
for(UnlockableContent c : selected.data.resources){
|
||||
t.addImage(c.icon(Cicon.small)).padRight(3);
|
||||
t.image(c.icon(Cicon.small)).padRight(3);
|
||||
if(++idx % max == 0) t.row();
|
||||
}
|
||||
}).fillX().row();
|
||||
|
||||
stable.row();
|
||||
|
||||
stable.addButton("Launch", Styles.transt, () -> {
|
||||
stable.button("Launch", Styles.transt, () -> {
|
||||
if(selected != null){
|
||||
if(selected.is(SectorAttribute.naval)){
|
||||
ui.showInfo("You need a naval loadout to launch here.");
|
||||
|
||||
@@ -3,7 +3,6 @@ package mindustry.ui.dialogs;
|
||||
import arc.Core;
|
||||
import arc.scene.ui.TextButton;
|
||||
import arc.util.Time;
|
||||
import mindustry.core.GameState.State;
|
||||
import mindustry.game.Saves.SaveSlot;
|
||||
import mindustry.gen.*;
|
||||
|
||||
@@ -23,7 +22,7 @@ public class SaveDialog extends LoadDialog{
|
||||
|
||||
public void addSetup(){
|
||||
slots.row();
|
||||
slots.addImageTextButton("$save.new", Icon.add, () ->
|
||||
slots.button("$save.new", Icon.add, () ->
|
||||
ui.showTextInput("$save", "$save.newslot", 30, "", text -> {
|
||||
ui.loadAnd("$saving", () -> {
|
||||
control.saves.addSave(text);
|
||||
|
||||
@@ -31,7 +31,7 @@ public class SchematicsDialog extends FloatingDialog{
|
||||
|
||||
shouldPause = true;
|
||||
addCloseButton();
|
||||
buttons.addImageTextButton("$schematic.import", Icon.download, this::showImport);
|
||||
buttons.button("$schematic.import", Icon.download, this::showImport);
|
||||
shown(this::setup);
|
||||
onResize(this::setup);
|
||||
}
|
||||
@@ -45,8 +45,8 @@ public class SchematicsDialog extends FloatingDialog{
|
||||
|
||||
cont.table(s -> {
|
||||
s.left();
|
||||
s.addImage(Icon.zoom);
|
||||
s.addField(search, res -> {
|
||||
s.image(Icon.zoom);
|
||||
s.field(search, res -> {
|
||||
search = res;
|
||||
rebuildPane[0].run();
|
||||
}).growX();
|
||||
@@ -69,7 +69,7 @@ public class SchematicsDialog extends FloatingDialog{
|
||||
if(!search.isEmpty() && !s.name().toLowerCase().contains(search.toLowerCase())) continue;
|
||||
|
||||
Button[] sel = {null};
|
||||
sel[0] = t.addButton(b -> {
|
||||
sel[0] = t.button(b -> {
|
||||
b.top();
|
||||
b.margin(0f);
|
||||
b.table(buttons -> {
|
||||
@@ -78,15 +78,15 @@ public class SchematicsDialog extends FloatingDialog{
|
||||
|
||||
ImageButtonStyle style = Styles.clearPartiali;
|
||||
|
||||
buttons.addImageButton(Icon.info, style, () -> {
|
||||
buttons.button(Icon.info, style, () -> {
|
||||
showInfo(s);
|
||||
});
|
||||
|
||||
buttons.addImageButton(Icon.download, style, () -> {
|
||||
buttons.button(Icon.download, style, () -> {
|
||||
showExport(s);
|
||||
});
|
||||
|
||||
buttons.addImageButton(Icon.pencil, style, () -> {
|
||||
buttons.button(Icon.pencil, style, () -> {
|
||||
ui.showTextInput("$schematic.rename", "$name", s.name(), res -> {
|
||||
Schematic replacement = schematics.all().find(other -> other.name().equals(res) && other != s);
|
||||
if(replacement != null){
|
||||
@@ -102,9 +102,9 @@ public class SchematicsDialog extends FloatingDialog{
|
||||
});
|
||||
|
||||
if(s.hasSteamID()){
|
||||
buttons.addImageButton(Icon.link, style, () -> platform.viewListing(s));
|
||||
buttons.button(Icon.link, style, () -> platform.viewListing(s));
|
||||
}else{
|
||||
buttons.addImageButton(Icon.trash, style, () -> {
|
||||
buttons.button(Icon.trash, style, () -> {
|
||||
if(s.mod != null){
|
||||
ui.showInfo(Core.bundle.format("mod.item.remove", s.mod.meta.displayName()));
|
||||
}else{
|
||||
@@ -160,7 +160,7 @@ public class SchematicsDialog extends FloatingDialog{
|
||||
TextButtonStyle style = Styles.cleart;
|
||||
t.defaults().size(280f, 60f).left();
|
||||
t.row();
|
||||
t.addImageTextButton("$schematic.copy.import", Icon.copy, style, () -> {
|
||||
t.button("$schematic.copy.import", Icon.copy, style, () -> {
|
||||
dialog.hide();
|
||||
try{
|
||||
Schematic s = Schematics.readBase64(Core.app.getClipboardText());
|
||||
@@ -174,7 +174,7 @@ public class SchematicsDialog extends FloatingDialog{
|
||||
}
|
||||
}).marginLeft(12f).disabled(b -> Core.app.getClipboardText() == null || !Core.app.getClipboardText().startsWith(schematicBaseStart));
|
||||
t.row();
|
||||
t.addImageTextButton("$schematic.importfile", Icon.download, style, () -> platform.showFileChooser(true, schematicExtension, file -> {
|
||||
t.button("$schematic.importfile", Icon.download, style, () -> platform.showFileChooser(true, schematicExtension, file -> {
|
||||
dialog.hide();
|
||||
|
||||
try{
|
||||
@@ -189,7 +189,7 @@ public class SchematicsDialog extends FloatingDialog{
|
||||
})).marginLeft(12f);
|
||||
t.row();
|
||||
if(steam){
|
||||
t.addImageTextButton("$schematic.browseworkshop", Icon.book, style, () -> {
|
||||
t.button("$schematic.browseworkshop", Icon.book, style, () -> {
|
||||
dialog.hide();
|
||||
platform.openWorkshop();
|
||||
}).marginLeft(12f);
|
||||
@@ -209,18 +209,18 @@ public class SchematicsDialog extends FloatingDialog{
|
||||
TextButtonStyle style = Styles.cleart;
|
||||
t.defaults().size(280f, 60f).left();
|
||||
if(steam && !s.hasSteamID()){
|
||||
t.addImageTextButton("$schematic.shareworkshop", Icon.book, style,
|
||||
t.button("$schematic.shareworkshop", Icon.book, style,
|
||||
() -> platform.publish(s)).marginLeft(12f);
|
||||
t.row();
|
||||
dialog.hide();
|
||||
}
|
||||
t.addImageTextButton("$schematic.copy", Icon.copy, style, () -> {
|
||||
t.button("$schematic.copy", Icon.copy, style, () -> {
|
||||
dialog.hide();
|
||||
ui.showInfoFade("$copied");
|
||||
Core.app.setClipboardText(schematics.writeBase64(s));
|
||||
}).marginLeft(12f);
|
||||
t.row();
|
||||
t.addImageTextButton("$schematic.exportfile", Icon.export, style, () -> {
|
||||
t.button("$schematic.exportfile", Icon.export, style, () -> {
|
||||
dialog.hide();
|
||||
platform.export(s.name(), schematicExtension, file -> Schematics.write(s, file));
|
||||
}).marginLeft(12f);
|
||||
@@ -312,7 +312,7 @@ public class SchematicsDialog extends FloatingDialog{
|
||||
cont.table(r -> {
|
||||
int i = 0;
|
||||
for(ItemStack s : arr){
|
||||
r.addImage(s.item.icon(Cicon.small)).left();
|
||||
r.image(s.item.icon(Cicon.small)).left();
|
||||
r.label(() -> {
|
||||
Tilec core = player.closestCore();
|
||||
if(core == null || state.rules.infiniteResources || core.items().has(s.item, s.amount)) return "[lightgray]" + s.amount + "";
|
||||
|
||||
@@ -84,7 +84,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
t.defaults().size(270f, 60f).left();
|
||||
TextButtonStyle style = Styles.cleart;
|
||||
|
||||
t.addImageTextButton("$settings.cleardata", Icon.trash, style, () -> ui.showConfirm("$confirm", "$settings.clearall.confirm", () -> {
|
||||
t.button("$settings.cleardata", Icon.trash, style, () -> ui.showConfirm("$confirm", "$settings.clearall.confirm", () -> {
|
||||
ObjectMap<String, Object> map = new ObjectMap<>();
|
||||
for(String value : Core.settings.keys()){
|
||||
if(value.contains("usid") || value.contains("uuid")){
|
||||
@@ -104,7 +104,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
|
||||
t.row();
|
||||
|
||||
t.addImageTextButton("$data.export", Icon.download, style, () -> {
|
||||
t.button("$data.export", Icon.download, style, () -> {
|
||||
if(ios){
|
||||
Fi file = Core.files.local("mindustry-data-export.zip");
|
||||
try{
|
||||
@@ -128,7 +128,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
|
||||
t.row();
|
||||
|
||||
t.addImageTextButton("$data.import", Icon.download, style, () -> ui.showConfirm("$confirm", "$data.import.confirm", () -> platform.showFileChooser(true, "zip", file -> {
|
||||
t.button("$data.import", Icon.download, style, () -> ui.showConfirm("$confirm", "$data.import.confirm", () -> platform.showFileChooser(true, "zip", file -> {
|
||||
try{
|
||||
data.importData(file);
|
||||
Core.app.exit();
|
||||
@@ -146,7 +146,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
|
||||
if(!mobile){
|
||||
t.row();
|
||||
t.addImageTextButton("$data.openfolder", Icon.folder, style, () -> Core.app.openFolder(Core.settings.getDataDirectory().absolutePath()));
|
||||
t.button("$data.openfolder", Icon.folder, style, () -> Core.app.openFolder(Core.settings.getDataDirectory().absolutePath()));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -185,20 +185,20 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
TextButtonStyle style = Styles.cleart;
|
||||
|
||||
menu.defaults().size(300f, 60f);
|
||||
menu.addButton("$settings.game", style, () -> visible(0));
|
||||
menu.button("$settings.game", style, () -> visible(0));
|
||||
menu.row();
|
||||
menu.addButton("$settings.graphics", style, () -> visible(1));
|
||||
menu.button("$settings.graphics", style, () -> visible(1));
|
||||
menu.row();
|
||||
menu.addButton("$settings.sound", style, () -> visible(2));
|
||||
menu.button("$settings.sound", style, () -> visible(2));
|
||||
menu.row();
|
||||
menu.addButton("$settings.language", style, ui.language::show);
|
||||
menu.button("$settings.language", style, ui.language::show);
|
||||
if(!mobile || Core.settings.getBool("keyboard")){
|
||||
menu.row();
|
||||
menu.addButton("$settings.controls", style, ui.controls::show);
|
||||
menu.button("$settings.controls", style, ui.controls::show);
|
||||
}
|
||||
|
||||
menu.row();
|
||||
menu.addButton("$settings.data", style, () -> dataDialog.show());
|
||||
menu.button("$settings.data", style, () -> dataDialog.show());
|
||||
}
|
||||
|
||||
void addSettings(){
|
||||
@@ -256,7 +256,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
game.pref(new Setting(){
|
||||
@Override
|
||||
public void add(SettingsTable table){
|
||||
table.addButton("$tutorial.retake", () -> {
|
||||
table.button("$tutorial.retake", () -> {
|
||||
hide();
|
||||
control.playTutorial();
|
||||
}).size(220f, 60f).pad(6).left();
|
||||
@@ -378,7 +378,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
|
||||
@Override
|
||||
public void addCloseButton(){
|
||||
buttons.addImageTextButton("$back", Icon.leftOpen, () -> {
|
||||
buttons.button("$back", Icon.leftOpen, () -> {
|
||||
if(prefs.getChildren().first() != menu){
|
||||
back();
|
||||
}else{
|
||||
@@ -387,7 +387,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
}).size(230f, 64f);
|
||||
|
||||
keyDown(key -> {
|
||||
if(key == KeyCode.ESCAPE || key == KeyCode.BACK){
|
||||
if(key == KeyCode.escape || key == KeyCode.back){
|
||||
if(prefs.getChildren().first() != menu){
|
||||
back();
|
||||
}else{
|
||||
|
||||
@@ -63,7 +63,7 @@ public class TechTreeDialog extends FloatingDialog{
|
||||
|
||||
addCloseButton();
|
||||
|
||||
buttons.addImageTextButton("$database", Icon.book, () -> {
|
||||
buttons.button("$database", Icon.book, () -> {
|
||||
hide();
|
||||
ui.database.show();
|
||||
}).size(210f, 64f);
|
||||
@@ -343,7 +343,7 @@ public class TechTreeDialog extends FloatingDialog{
|
||||
infoTable.table(b -> {
|
||||
b.margin(0).left().defaults().left();
|
||||
|
||||
b.addImageButton(Icon.info, Styles.cleari, () -> ui.content.show(node.block)).growY().width(50f);
|
||||
b.button(Icon.info, Styles.cleari, () -> ui.content.show(node.block)).growY().width(50f);
|
||||
b.add().grow();
|
||||
b.table(desc -> {
|
||||
desc.left().defaults().left();
|
||||
@@ -355,7 +355,7 @@ public class TechTreeDialog extends FloatingDialog{
|
||||
for(ItemStack req : node.requirements){
|
||||
t.table(list -> {
|
||||
list.left();
|
||||
list.addImage(req.item.icon(Cicon.small)).size(8 * 3).padRight(3);
|
||||
list.image(req.item.icon(Cicon.small)).size(8 * 3).padRight(3);
|
||||
list.add(req.item.localizedName).color(Color.lightGray);
|
||||
list.label(() -> " " + Math.min(data.getItem(req.item), req.amount) + " / " + req.amount)
|
||||
.update(l -> l.setColor(data.has(req.item, req.amount) ? Color.lightGray : Color.scarlet));
|
||||
@@ -370,7 +370,7 @@ public class TechTreeDialog extends FloatingDialog{
|
||||
|
||||
if(mobile && locked(node)){
|
||||
b.row();
|
||||
b.addImageTextButton("$research", Icon.ok, Styles.nodet, () -> unlock(node))
|
||||
b.button("$research", Icon.ok, Styles.nodet, () -> unlock(node))
|
||||
.disabled(i -> !data.hasItems(node.requirements)).growX().height(44f).colspan(3);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ZoneInfoDialog extends FloatingDialog{
|
||||
if(i++ % 2 == 0){
|
||||
iteminfo.row();
|
||||
}
|
||||
iteminfo.addImage(stack.item.icon(Cicon.small)).size(8 * 3).padRight(1);
|
||||
iteminfo.image(stack.item.icon(Cicon.small)).size(8 * 3).padRight(1);
|
||||
iteminfo.add(stack.amount + "").color(Color.lightGray).padRight(5);
|
||||
}
|
||||
};
|
||||
@@ -55,7 +55,7 @@ public class ZoneInfoDialog extends FloatingDialog{
|
||||
|
||||
cont.pane(cont -> {
|
||||
if(zone.locked()){
|
||||
cont.addImage(Icon.lock);
|
||||
cont.image(Icon.lock);
|
||||
cont.row();
|
||||
cont.add("$locked").padBottom(6);
|
||||
cont.row();
|
||||
@@ -70,9 +70,9 @@ public class ZoneInfoDialog extends FloatingDialog{
|
||||
r.add("$complete").colspan(2).left();
|
||||
r.row();
|
||||
for(Objective o : zones){
|
||||
r.addImage(Icon.terrain).padRight(4);
|
||||
r.image(Icon.terrain).padRight(4);
|
||||
r.add(o.display()).color(Color.lightGray);
|
||||
r.addImage(o.complete() ? Icon.ok : Icon.cancel, o.complete() ? Color.lightGray : Color.scarlet).padLeft(3);
|
||||
r.image(o.complete() ? Icon.ok : Icon.cancel, o.complete() ? Color.lightGray : Color.scarlet).padLeft(3);
|
||||
r.row();
|
||||
}
|
||||
});
|
||||
@@ -86,9 +86,9 @@ public class ZoneInfoDialog extends FloatingDialog{
|
||||
r.add("$research.list").colspan(2).left();
|
||||
r.row();
|
||||
for(Unlock blocko : blocks){
|
||||
r.addImage(blocko.block.icon(Cicon.small)).size(8 * 3).padRight(5);
|
||||
r.image(blocko.block.icon(Cicon.small)).size(8 * 3).padRight(5);
|
||||
r.add(blocko.block.localizedName).color(Color.lightGray).left();
|
||||
r.addImage(blocko.block.unlocked() ? Icon.ok : Icon.cancel, blocko.block.unlocked() ? Color.lightGray : Color.scarlet).padLeft(3);
|
||||
r.image(blocko.block.unlocked() ? Icon.ok : Icon.cancel, blocko.block.unlocked() ? Color.lightGray : Color.scarlet).padLeft(3);
|
||||
r.row();
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public class ZoneInfoDialog extends FloatingDialog{
|
||||
}else{
|
||||
cont.add(zone.localizedName).color(Pal.accent).growX().center();
|
||||
cont.row();
|
||||
cont.addImage().color(Pal.accent).height(3).pad(6).growX();
|
||||
cont.image().color(Pal.accent).height(3).pad(6).growX();
|
||||
cont.row();
|
||||
cont.table(desc -> {
|
||||
desc.left().defaults().left().width(Core.graphics.isPortrait() ? 350f : 500f);
|
||||
@@ -115,7 +115,7 @@ public class ZoneInfoDialog extends FloatingDialog{
|
||||
t.left();
|
||||
int i = 0;
|
||||
for(Item item : zone.resources){
|
||||
r.addImage(item.icon(Cicon.small)).size(8 * 3);
|
||||
r.image(item.icon(Cicon.small)).size(8 * 3);
|
||||
if(++i % 4 == 0){
|
||||
r.row();
|
||||
}
|
||||
@@ -143,13 +143,13 @@ public class ZoneInfoDialog extends FloatingDialog{
|
||||
});
|
||||
cont.row();
|
||||
|
||||
cont.addButton(zone.canConfigure() ? "$configure" : Core.bundle.format("configure.locked", zone.configureObjective.display()),
|
||||
cont.button(zone.canConfigure() ? "$configure" : Core.bundle.format("configure.locked", zone.configureObjective.display()),
|
||||
() -> loadout.show(zone.loadout.findCore().itemCapacity, zone.getStartingItems(), zone::resetStartingItems, zone::updateLaunchCost, rebuildItems)
|
||||
).fillX().pad(3).disabled(b -> !zone.canConfigure());
|
||||
|
||||
cont.row();
|
||||
|
||||
Button button = cont.addButton(zone.locked() ? "$uncover" : "$launch", () -> {
|
||||
Button button = cont.button(zone.locked() ? "$uncover" : "$launch", () -> {
|
||||
if(!data.isUnlocked(zone)){
|
||||
Sounds.unlock.play();
|
||||
data.unlockContent(zone);
|
||||
|
||||
@@ -14,7 +14,6 @@ import arc.scene.ui.layout.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.core.GameState.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.gen.*;
|
||||
@@ -27,11 +26,13 @@ import static mindustry.Vars.*;
|
||||
|
||||
public class BlockInventoryFragment extends Fragment{
|
||||
private final static float holdWithdraw = 20f;
|
||||
private final static float holdShrink = 120f;
|
||||
|
||||
private Table table = new Table();
|
||||
private Tilec tile;
|
||||
private float holdTime = 0f;
|
||||
private float holdTime = 0f, emptyTime;
|
||||
private boolean holding;
|
||||
private float[] shrinkHoldTimes = new float[content.items().size];
|
||||
private Item lastItem;
|
||||
|
||||
{
|
||||
@@ -99,9 +100,15 @@ public class BlockInventoryFragment extends Fragment{
|
||||
table.touchable(Touchable.enabled);
|
||||
table.update(() -> {
|
||||
|
||||
if(state.isMenu() || tile == null || !tile.isValid() || !tile.block().isAccessible() || tile.items().total() == 0){
|
||||
if(state.isMenu() || tile == null || !tile.isValid() || !tile.block().isAccessible() || emptyTime >= holdShrink){
|
||||
hide();
|
||||
}else{
|
||||
if(tile.items().total() == 0){
|
||||
emptyTime += Time.delta();
|
||||
}else{
|
||||
emptyTime = 0f;
|
||||
}
|
||||
|
||||
if(holding && lastItem != null){
|
||||
holdTime += Time.delta();
|
||||
|
||||
@@ -117,12 +124,21 @@ public class BlockInventoryFragment extends Fragment{
|
||||
|
||||
updateTablePosition();
|
||||
if(tile.block().hasItems){
|
||||
boolean dirty = false;
|
||||
if(shrinkHoldTimes.length != content.items().size) shrinkHoldTimes = new float[content.items().size];
|
||||
|
||||
for(int i = 0; i < content.items().size; i++){
|
||||
boolean has = tile.items().has(content.item(i));
|
||||
if(has != container.contains(i)){
|
||||
rebuild(false);
|
||||
boolean had = container.contains(i);
|
||||
if(has){
|
||||
shrinkHoldTimes[i] = 0f;
|
||||
dirty |= !had;
|
||||
}else if(had){
|
||||
shrinkHoldTimes[i] += Time.delta();
|
||||
dirty |= shrinkHoldTimes[i] >= holdShrink;
|
||||
}
|
||||
}
|
||||
if(dirty) rebuild(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -57,12 +57,12 @@ public class HudFragment extends Fragment{
|
||||
|
||||
ImageButtonStyle style = Styles.clearTransi;
|
||||
|
||||
select.addImageButton(Icon.menu, style, ui.paused::show);
|
||||
flip = select.addImageButton(Icon.upOpen, style, this::toggleMenus).get();
|
||||
select.button(Icon.menu, style, ui.paused::show);
|
||||
flip = select.button(Icon.upOpen, style, this::toggleMenus).get();
|
||||
|
||||
select.addImageButton(Icon.paste, style, ui.schematics::show);
|
||||
select.button(Icon.paste, style, ui.schematics::show);
|
||||
|
||||
select.addImageButton(Icon.pause, style, () -> {
|
||||
select.button(Icon.pause, style, () -> {
|
||||
if(net.active()){
|
||||
ui.listfrag.toggle();
|
||||
}else{
|
||||
@@ -77,7 +77,7 @@ public class HudFragment extends Fragment{
|
||||
}
|
||||
});
|
||||
|
||||
select.addImageButton(Icon.chat, style,() -> {
|
||||
select.button(Icon.chat, style,() -> {
|
||||
if(net.active() && mobile){
|
||||
if(ui.chatfrag.shown()){
|
||||
ui.chatfrag.hide();
|
||||
@@ -97,7 +97,7 @@ public class HudFragment extends Fragment{
|
||||
}
|
||||
});
|
||||
|
||||
select.addImage().color(Pal.gray).width(4f).fillY();
|
||||
select.image().color(Pal.gray).width(4f).fillY();
|
||||
|
||||
float size = Scl.scl(dsize);
|
||||
Array<Element> children = new Array<>(select.getChildren());
|
||||
@@ -122,7 +122,7 @@ public class HudFragment extends Fragment{
|
||||
}
|
||||
|
||||
cont.row();
|
||||
cont.addImage().height(4f).color(Pal.gray).fillX();
|
||||
cont.image().height(4f).color(Pal.gray).fillX();
|
||||
cont.row();
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ public class HudFragment extends Fragment{
|
||||
teams.left();
|
||||
int i = 0;
|
||||
for(Team team : Team.base()){
|
||||
ImageButton button = teams.addImageButton(Tex.whiteui, Styles.clearTogglePartiali, 40f, () -> Call.setPlayerTeamEditor(player, team))
|
||||
ImageButton button = teams.button(Tex.whiteui, Styles.clearTogglePartiali, 40f, () -> Call.setPlayerTeamEditor(player, team))
|
||||
.size(50f).margin(6f).get();
|
||||
button.getImageCell().grow();
|
||||
button.getStyle().imageUpColor = team.color;
|
||||
@@ -261,7 +261,7 @@ public class HudFragment extends Fragment{
|
||||
setDisabled(() -> !control.tutorial.canNext());
|
||||
}},
|
||||
new Table(f -> {
|
||||
f.left().addImageButton(Icon.left, Styles.emptyi, () -> {
|
||||
f.left().button(Icon.left, Styles.emptyi, () -> {
|
||||
control.tutorial.prevSentence();
|
||||
}).width(44f).growY().visible(() -> control.tutorial.canPrev());
|
||||
}));
|
||||
@@ -340,7 +340,7 @@ public class HudFragment extends Fragment{
|
||||
}
|
||||
});
|
||||
table.margin(12);
|
||||
table.addImage(Icon.ok).pad(3);
|
||||
table.image(Icon.ok).pad(3);
|
||||
table.add(text).wrap().width(280f).get().setAlignment(Align.center, Align.center);
|
||||
table.pack();
|
||||
|
||||
@@ -441,7 +441,7 @@ public class HudFragment extends Fragment{
|
||||
|
||||
lastUnlockLayout.add(image);
|
||||
}else{ //else, add a specific icon to denote no more space
|
||||
lastUnlockLayout.addImage(Icon.add);
|
||||
lastUnlockLayout.image(Icon.add);
|
||||
}
|
||||
|
||||
lastUnlockLayout.pack();
|
||||
@@ -486,13 +486,13 @@ public class HudFragment extends Fragment{
|
||||
dialog.cont.add("$launch.confirm").width(500f).wrap().pad(4f).get().setAlignment(Align.center, Align.center);
|
||||
dialog.buttons.defaults().size(200f, 54f).pad(2f);
|
||||
dialog.setFillParent(false);
|
||||
dialog.buttons.addButton("$cancel", dialog::hide);
|
||||
dialog.buttons.addButton("$ok", () -> {
|
||||
dialog.buttons.button("$cancel", dialog::hide);
|
||||
dialog.buttons.button("$ok", () -> {
|
||||
dialog.hide();
|
||||
Call.launchZone();
|
||||
});
|
||||
dialog.keyDown(KeyCode.ESCAPE, dialog::hide);
|
||||
dialog.keyDown(KeyCode.BACK, dialog::hide);
|
||||
dialog.keyDown(KeyCode.escape, dialog::hide);
|
||||
dialog.keyDown(KeyCode.back, dialog::hide);
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
@@ -597,7 +597,7 @@ public class HudFragment extends Fragment{
|
||||
}
|
||||
|
||||
private void addPlayButton(Table table){
|
||||
table.right().addImageButton(Icon.play, Styles.righti, 30f, () -> {
|
||||
table.right().button(Icon.play, Styles.righti, 30f, () -> {
|
||||
if(net.client() && player.admin()){
|
||||
Call.onAdminRequest(player, AdminAction.wave);
|
||||
}else if(inLaunchWave()){
|
||||
|
||||