Comments (3)
Calling setPresicion invalidates text highlighting if input is greater than max value. Also it doens't matter if I call setPrecision(0) or with any other argument.
from vis-ui.
invalidates text highlighting
So text is deselected? Please provide SSCCE.
from vis-ui.
package com.nikoliazekter.awesomegame.desktop;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.utils.viewport.ScreenViewport;
import com.kotcrab.vis.ui.VisUI;
import com.kotcrab.vis.ui.widget.NumberSelector;
public class TestIssue46 {
public static void main(String[] args) {
LwjglApplicationConfiguration c = new LwjglApplicationConfiguration();
c.width = 1280;
c.height = 720;
new LwjglApplication(new TestIssue46Application(), c);
}
}
class TestIssue46Application extends ApplicationAdapter {
private Stage stage;
@Override
public void create() {
VisUI.load();
stage = new Stage(new ScreenViewport());
Table table = new Table();
table.setSkin(VisUI.getSkin());
table.setFillParent(true);
table.add("Red highlighting appears when input is greater than 200");
table.row();
NumberSelector numberSelectorNormal = new NumberSelector("Normal", 100, 0, 200, 1);
table.add(numberSelectorNormal);
table.row();
table.add("No red highlighting appears when input is greater than 200");
table.row();
NumberSelector numberSelectorBuggy = new NumberSelector("Buggy", 100, 0, 200, 1);
numberSelectorBuggy.setPrecision(0);
table.add(numberSelectorBuggy);
stage.addActor(table);
Gdx.input.setInputProcessor(stage);
}
@Override
public void resize(int width, int height) {
stage.getViewport().update(width, height, true);
}
@Override
public void render() {
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
stage.act(Gdx.graphics.getDeltaTime());
stage.draw();
}
@Override
public void dispose() {
VisUI.dispose();
stage.dispose();
}
}
from vis-ui.
Related Issues (20)
- Tab and ScrollPane visual bug HOT 3
- IllegalArgumentException application crash when typing name in FileChooser "Open" dialog HOT 2
- Update to LibGDX 1.9.14 HOT 1
- VisUI Tixel Skin, where'd it go? HOT 3
- VisImageButton getImage().setColor(color) does not work. HOT 4
- VisUI Draggable on Grid HOT 3
- Add rich text HOT 2
- Tree node is removed but the container remains HOT 3
- Build issue default startup LibGDX project with GWT and VisUI HOT 3
- Tooltip Issue HOT 3
- Illegal reflective access operation with FileChooser
- Enhance VisWindow HOT 2
- Window close should have an close callback listener HOT 1
- [VisUI Request] Set text orientation in VisImageTextButton HOT 1
- Support 'center' alignments in ToastManager
- TabbedPane clicking a tab makes it invisible HOT 3
- VisUI 1.5.2 release HOT 2
- VisUI 1.5.3 release
- Some enhanced suggestions
- How to render? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vis-ui.