Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.SetOption(sciter.SCITER_SET_GFX_LAYER,4) Do not work #99

Closed
libi opened this issue Dec 29, 2017 · 12 comments
Closed

.SetOption(sciter.SCITER_SET_GFX_LAYER,4) Do not work #99

libi opened this issue Dec 29, 2017 · 12 comments
Assignees

Comments

@libi
Copy link

libi commented Dec 29, 2017

hello , I use xxx.exe -sciter-fgx=skia , It can work;

but this code is do not work

w,err := .......
.....
w.SetOption(sciter.SCITER_SET_GFX_LAYER,4)

please help me fix it ,thank you !

@pravic
Copy link
Member

pravic commented Dec 29, 2017

That should be called before any window creation.

@libi
Copy link
Author

libi commented Dec 29, 2017

if i dont create windows,how i get sciter.Sciter ?

@pravic
Copy link
Member

pravic commented Dec 29, 2017

Yeah, it lacks this at the moment :)

@pravic pravic closed this as completed in 4f243b2 Dec 29, 2017
@libi
Copy link
Author

libi commented Dec 29, 2017

Can you help me with the field sample code abou this? Thank you very much

@pravic
Copy link
Member

pravic commented Dec 29, 2017

Could you try the latest version? I haven't checked it, but it should work as following:

func main() {
  sciter.SetOption(sciter.SCITER_SET_GFX_LAYER, sciter.GFX_LAYER_SKIA);
  sciter.SetOption(sciter.SCITER_SET_DEBUG_MODE, 1);
  sciter.SetOption(sciter.SCITER_SET_UX_THEMING, 1);

  w, err := window.New ...

@libi
Copy link
Author

libi commented Dec 29, 2017

it not work, because SetOption is a method, belong to srtuct *sciter.Sciter.
shoud i new this struct ?

@libi
Copy link
Author

libi commented Dec 29, 2017

Thank you very much,I have see your commit. 😁

@pravic pravic self-assigned this Dec 29, 2017
@pravic
Copy link
Member

pravic commented Dec 29, 2017

So, it works? Great then 👍

@libi
Copy link
Author

libi commented Dec 29, 2017

There have a compile error
..\github.com\sciter-sdk\go-sciter\sciter.go:397:` cannot convert 0 (type int) to type C.HWND
I try fix
hwnd := C.HWINDOW(0)
to
hwnd := C.HWINDOW(nil)

It can finish compile. but I can't be sure if it's useful.

pravic added a commit that referenced this issue Dec 29, 2017
@pravic
Copy link
Member

pravic commented Dec 29, 2017

Check it now.

@libi
Copy link
Author

libi commented Dec 29, 2017

well done! I have try this ,It works very well. Thank you!

@pravic
Copy link
Member

pravic commented Dec 29, 2017

My pleasure :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants