This commit is contained in:
Timi
2026-05-11 21:38:37 +08:00
parent 6837781383
commit 88f3e135ff
37 changed files with 358 additions and 658 deletions

View File

@@ -22,7 +22,7 @@ public class TimiVersionLabel extends VersionLabel<JsonObject> {
private final String appName;
public TimiVersionLabel(String nowVersion, String appName) {
super(TimiFXUI.MULTILINGUAL.textArgs("version.checking", nowVersion));
super(TimiFXUI.MULTILINGUAL.text("version.checking"));
this.nowVersion = nowVersion;
this.appName = appName;
@@ -58,11 +58,11 @@ public class TimiVersionLabel extends VersionLabel<JsonObject> {
@Override
protected String updateText(String newVersion) {
return TimiFXUI.MULTILINGUAL.textArgs("version.new", nowVersion, newVersion);
return TimiFXUI.MULTILINGUAL.text("version.new");
}
@Override
protected String failText(Throwable e) {
return TimiFXUI.MULTILINGUAL.textArgs("version.fail", nowVersion);
return TimiFXUI.MULTILINGUAL.text("version.fail");
}
}

View File

@@ -31,15 +31,13 @@ public class InterpolatorPane extends BorderPane implements TimiFXUI {
private final Region block;
public InterpolatorPane(Interpolates interpolator) {
SplineInterpolator si = interpolator.getValue();
// 二次曲线
Canvas canvas = new Canvas();
canvas.setWidth(64);
canvas.setHeight(64);
// 插值
SelectableLabel label = new SelectableLabel(TimiFXUI.MULTILINGUAL.textArgs("fx.example.interpolator.demo", interpolator, si.getX1(), si.getY1(), si.getX2(), si.getY2()));
SelectableLabel label = new SelectableLabel(TimiFXUI.MULTILINGUAL.text("fx.example.interpolator.demo"));
// 方块
block = new Region();
@@ -76,7 +74,7 @@ public class InterpolatorPane extends BorderPane implements TimiFXUI {
// 绘制图示
{
double[][] list = interpolator.buildBezierPoint(canvas.getWidth(), canvas.getWidth() * .5);
double[][] list = interpolator.buildBezierPoint(canvas.getWidth(), (long) (canvas.getWidth() * .5));
GraphicsContext g = canvas.getGraphicsContext2D();
g.setFill(Colorful.WHITE);
g.fillRect(0, 0, canvas.getWidth(), canvas.getHeight());

View File

@@ -64,7 +64,7 @@ public class AnimationRendererDemo extends AbstractDemoPane implements OS.FileSy
SelectableLabel status = new SelectableLabel("-Djavafx.animation.fullspeed=" + isFullSpeed);
// 重启
Button restart = new Button(TimiFXUI.MULTILINGUAL.textArgs("fx.example.animation_renderer.restart", TimiFXUI.MULTILINGUAL.text(isFullSpeed ? "disable" : "enable")));
Button restart = new Button(TimiFXUI.MULTILINGUAL.text("fx.example.animation_renderer.restart"));
// 示例
Label labelDemo = TimiFXUI.title(TimiFXUI.MULTILINGUAL.text("example"));

View File

@@ -45,7 +45,7 @@ public class CheckBoxPickerDemo extends AbstractDemoPane {
}});
for (int i = 0; i < 32; i++) {
picker.getItems().add(TimiFXUI.MULTILINGUAL.textArgs("fx.example.check_box_picker.item", i));
picker.getItems().add(TimiFXUI.MULTILINGUAL.text("fx.example.check_box_picker.item"));
}
}
}