New console font options
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
plugins {
|
||||
id "me.tatarka.retrolambda" version "3.5.0"
|
||||
id "org.jetbrains.kotlin.jvm" version "1.1.2-2"
|
||||
//id "org.jetbrains.kotlin.jvm" version "1.1.2-2"
|
||||
}
|
||||
|
||||
if (System.getenv("BUILD_NUMBER") != null)
|
||||
|
||||
@@ -51,6 +51,7 @@ public enum Level {
|
||||
public static final String JAVA_SYMBOL = "([a-zA-Z_$][a-zA-Z\\d_$]*\\.)+[a-zA-Z_$][a-zA-Z\\d_$]*";
|
||||
|
||||
public static Level guessLevel(String line, Level preLevel) {
|
||||
if (line.startsWith("MC:")) line = line.substring("MC:".length());
|
||||
Level level = preLevel;
|
||||
Matcher m = MINECRAFT_LOGGER.matcher(line);
|
||||
if (m.find()) {
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
*/
|
||||
package org.jackhuang.hmcl.util.ui;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.Font;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.awt.event.ItemEvent;
|
||||
import java.awt.event.ItemListener;
|
||||
import javax.swing.DefaultComboBoxModel;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JList;
|
||||
import javax.swing.ListCellRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author huang
|
||||
*/
|
||||
public class JFontComboBox extends JComboBox<String> implements ItemListener {
|
||||
private static DefaultComboBoxModel<String> defaultModel = null;
|
||||
private int fontSize;
|
||||
|
||||
protected static DefaultComboBoxModel<String> getDefaultModel() {
|
||||
if (defaultModel == null)
|
||||
defaultModel = new DefaultComboBoxModel<>(GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames());
|
||||
return defaultModel;
|
||||
}
|
||||
|
||||
public JFontComboBox() {
|
||||
super();
|
||||
setRenderer(new JFontComboBoxCellRenderer());
|
||||
setModel(getDefaultModel());
|
||||
addItemListener(this);
|
||||
fontSize = getFont().getSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
setFont(new Font(e.getItem().toString(), Font.PLAIN, fontSize));
|
||||
}
|
||||
|
||||
public static class JFontComboBoxCellRenderer extends JLabel implements ListCellRenderer<String> {
|
||||
|
||||
@Override
|
||||
public Component getListCellRendererComponent(JList list, String value, int index, boolean isSelected, boolean cellHasFocus) {
|
||||
Font font = new Font(value, Font.PLAIN, 14);
|
||||
setEnabled(list.isEnabled());
|
||||
setText(font.getFontName());
|
||||
setFont(font);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -330,6 +330,7 @@ launcher.decorated=Enable system window border(in order to fix the problem that
|
||||
launcher.modpack=<html><a href="http://blog.163.com/huanghongxun2008@126/blog/static/7738046920160323812771/">Documentations for modpacks.</a></html>
|
||||
launcher.lang=Language
|
||||
launcher.restart=Options will be in operations only if restart this app.
|
||||
launcher.log_font=Log Font
|
||||
|
||||
launcher.title.game=Games
|
||||
launcher.title.main=Home
|
||||
|
||||
@@ -330,6 +330,7 @@ launcher.decorated=Enable system window border(in order to fix the problem that
|
||||
launcher.modpack=<html><a href="http://blog.163.com/huanghongxun2008@126/blog/static/7738046920160323812771/">Documentations for modpacks.</a></html>
|
||||
launcher.lang=Language
|
||||
launcher.restart=Options will be in operations only if restart this app.
|
||||
launcher.log_font=Log Font
|
||||
|
||||
launcher.title.game=Games
|
||||
launcher.title.main=Home
|
||||
|
||||
@@ -328,6 +328,7 @@ launcher.decorated=Enable system window border(in order to fix the problem that
|
||||
launcher.modpack=<html><a href="http://blog.163.com/huanghongxun2008@126/blog/static/7738046920160323812771/">Documentations for modpacks.</a></html>
|
||||
launcher.lang=Language
|
||||
launcher.restart=Options will be in operations only if restart this app.
|
||||
launcher.log_font=Log Font
|
||||
|
||||
launcher.title.game=Phiên bản & Mods
|
||||
launcher.title.main=HMCL Main
|
||||
|
||||
@@ -328,6 +328,7 @@ launcher.decorated=Enable system window border(in order to fix the problem that
|
||||
launcher.modpack=<html><a href="http://blog.163.com/huanghongxun2008@126/blog/static/7738046920160323812771/">Documentations for modpacks.</a></html>
|
||||
launcher.lang=Language
|
||||
launcher.restart=Options will be in operations only if restart this app.
|
||||
launcher.log_font=Log Font
|
||||
|
||||
launcher.title.game=Phi\u00ean b\u1ea3n & Mods
|
||||
launcher.title.main=HMCL Main
|
||||
|
||||
@@ -330,6 +330,7 @@ launcher.decorated=啟用視窗邊框(Linux下可解決程式介面全灰問題)
|
||||
launcher.modpack=<html><a href="http://huangyuhui.duapp.com/link.php?type=modpack">整合包作者幫助</a></html>
|
||||
launcher.lang=語言
|
||||
launcher.restart=本介面選項需要重啟本啟動器生效
|
||||
launcher.log_font=日誌字體
|
||||
|
||||
launcher.title.game=遊戲設定
|
||||
launcher.title.main=主頁
|
||||
|
||||
@@ -330,6 +330,7 @@ launcher.decorated=\u555f\u7528\u8996\u7a97\u908a\u6846(Linux\u4e0b\u53ef\u89e3\
|
||||
launcher.modpack=<html><a href="http://huangyuhui.duapp.com/link.php?type=modpack">\u6574\u5408\u5305\u4f5c\u8005\u5e6b\u52a9</a></html>
|
||||
launcher.lang=\u8a9e\u8a00
|
||||
launcher.restart=\u672c\u4ecb\u9762\u9078\u9805\u9700\u8981\u91cd\u555f\u672c\u555f\u52d5\u5668\u751f\u6548
|
||||
launcher.log_font=\u65e5\u8a8c\u5b57\u9ad4
|
||||
|
||||
launcher.title.game=\u904a\u6232\u8a2d\u5b9a
|
||||
launcher.title.main=\u4e3b\u9801
|
||||
|
||||
@@ -330,6 +330,7 @@ launcher.decorated=启用窗口边框(Linux下可解决程序界面全灰问题)
|
||||
launcher.modpack=<html><a href="http://huangyuhui.duapp.com/link.php?type=modpack">整合包作者帮助</a></html>
|
||||
launcher.lang=语言
|
||||
launcher.restart=本界面选项需要重启本启动器生效
|
||||
launcher.log_font=日志字体
|
||||
|
||||
launcher.title.game=游戏设置
|
||||
launcher.title.main=主页
|
||||
|
||||
@@ -330,6 +330,7 @@ launcher.decorated=\u542f\u7528\u7a97\u53e3\u8fb9\u6846(Linux\u4e0b\u53ef\u89e3\
|
||||
launcher.modpack=<html><a href="http://huangyuhui.duapp.com/link.php?type=modpack">\u6574\u5408\u5305\u4f5c\u8005\u5e2e\u52a9</a></html>
|
||||
launcher.lang=\u8bed\u8a00
|
||||
launcher.restart=\u672c\u754c\u9762\u9009\u9879\u9700\u8981\u91cd\u542f\u672c\u542f\u52a8\u5668\u751f\u6548
|
||||
launcher.log_font=\u65e5\u5fd7\u5b57\u4f53
|
||||
|
||||
launcher.title.game=\u6e38\u620f\u8bbe\u7f6e
|
||||
launcher.title.main=\u4e3b\u9875
|
||||
|
||||
Reference in New Issue
Block a user