v0.3.4b: adjusted the UI for font selection, added a bunch of character support to pixel font
This commit is contained in:
parent
295fb19fb6
commit
b7a7df1296
Binary file not shown.
|
@ -339,6 +339,10 @@ public class ShatteredPixelDungeon extends Game {
|
|||
|
||||
public static void language(Languages lang) {
|
||||
Preferences.INSTANCE.put( Preferences.KEY_LANG, lang.code());
|
||||
if (lang == Languages.RUSSIAN || lang == Languages.CHINESE || lang == Languages.KOREAN)
|
||||
RenderedText.setFont("font.ttf");
|
||||
else if (classicFont())
|
||||
RenderedText.setFont("pixelfont.ttf");
|
||||
}
|
||||
|
||||
public static Languages language() {
|
||||
|
@ -363,6 +367,10 @@ public class ShatteredPixelDungeon extends Game {
|
|||
}
|
||||
|
||||
public static boolean classicFont(){
|
||||
Languages lang = ShatteredPixelDungeon.language();
|
||||
if (lang == Languages.RUSSIAN || lang == Languages.CHINESE || lang == Languages.KOREAN)
|
||||
return false;
|
||||
else
|
||||
return Preferences.INSTANCE.getBoolean(Preferences.KEY_CLASSICFONT, true);
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ windows.wndsettings$uitab.center=Center
|
|||
windows.wndsettings$uitab.flip_toolbar=Flip Toolbar
|
||||
windows.wndsettings$uitab.flip_indicators=Flip Indicators
|
||||
windows.wndsettings$uitab.quickslots=Quickslots
|
||||
windows.wndsettings$uitab.classic_font=Classic Font
|
||||
windows.wndsettings$uitab.smooth_font=Smooth Font
|
||||
windows.wndsettings$audiotab.music_vol=Music Volume
|
||||
windows.wndsettings$audiotab.music_mute=Mute Music
|
||||
windows.wndsettings$audiotab.sfx_vol=SFX Volume
|
||||
|
|
|
@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.windows;
|
|||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Languages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
|
@ -237,17 +238,19 @@ public class WndSettings extends WndTabbed {
|
|||
slots.setRect(0, chkFlipTags.bottom() + GAP_TINY, WIDTH, SLIDER_HEIGHT);
|
||||
add(slots);
|
||||
|
||||
CheckBox chkFont = new CheckBox(Messages.get(this, "classic_font")){
|
||||
CheckBox chkFont = new CheckBox(Messages.get(this, "smooth_font")){
|
||||
@Override
|
||||
protected void onClick() {
|
||||
super.onClick();
|
||||
ShatteredPixelDungeon.classicFont(checked());
|
||||
ShatteredPixelDungeon.classicFont(!checked());
|
||||
PixelScene.windowOnCreate = WndSettings.class;
|
||||
ShatteredPixelDungeon.switchNoFade((Class<? extends PixelScene>) ShatteredPixelDungeon.scene().getClass());
|
||||
}
|
||||
};
|
||||
chkFont.setRect(0, slots.bottom() + GAP_SML, WIDTH, BTN_HEIGHT);
|
||||
chkFont.checked(ShatteredPixelDungeon.classicFont());
|
||||
chkFont.checked(!ShatteredPixelDungeon.classicFont());
|
||||
Languages lang = ShatteredPixelDungeon.language();
|
||||
if (lang != Languages.RUSSIAN && lang != Languages.CHINESE && lang != Languages.KOREAN)
|
||||
add(chkFont);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user