Gosh that was painless,
Thanks,
Ray
fgcommand("canvas-dialog-show", props.Node.new({filename:"about"}) );
TheTom wrote:That's definitely a problem with ATI. I've tried an HD 7870 on Windows as well as Linux with different driver versions, but all showed the same problems with different intensity (mainly flickering of some parts and other buffer contents) and different applications using OpenGL (eg. FlightGear, Blender, Spotify).
Hooray wrote:That's probably related to your hardware being ATI/AMD-based, and the PUI (legacy GUI) integration with OSG code, and a few incompatible/untested settings (think shaders/effects, rembrandts/als etc) - PUI is fixed-function pipeline code, while most of FG is increasingly being moved to support more modern code using shaders and effects, or at the very least OSG StateSets.
TheTom wrote:While working on the new GUI based on Canvas I have not noticed any problems so far, so it should not suffer from the clipping problems.
var (width,height) = (320,160);
var title = 'My new Window';
# create a new window, dimensions are WIDTH x HEIGHT, using the dialog decoration (i.e. titlebar)
var window = canvas.Window.new([width,height],"dialog")
.set('title',title);
# creating the top-level/root group which will contain all other elements/group
var root = myCanvas.createGroup();
var vbox = canvas.VBoxLayout.new();
myCanvas.setLayout(vbox);
var scroll = canvas.gui.widgets.ScrollArea.new(root, canvas.style, {size: [96, 128]}).move(20, 100);
vbox.addItem(scroll, 1);
var scrollContent =
scroll.getContent()
.set("font", "LiberationFonts/LiberationSans-Bold.ttf")
.set("character-size", 16)
.set("alignment", "left-center");
var list = canvas.VBoxLayout.new();
scroll.setLayout(list);
for (var i=1;i<=5;i+=1) {
var label = canvas.gui.widgets.Label.new(scrollContent, canvas.style, {wordWrap: 0});
label.setImage("Textures/Splash"~i~".png");
label.setFixedSize(256,256);
list.addItem(label);
}
Users browsing this forum: No registered users and 2 guests