Closed runrc closed 8 months ago
Set window size already exists in the main library, while getting window size can be done by running a script. Someone needs to add this to the Nim wrapper.
webui_set_size(myWindow, 800, 600);
webui_set_position(myWindow, 100, 100);
I believe the get/set position bindings have already been added to the main branch. Unfortunately, I get the following build error(s) when trying to build the examples.
% git clone --recursive https://github.com/webui-dev/nim-webui
% cd nim-webui/examples
% nim r minimal.nim
Hint: used config file '/opt/homebrew/Cellar/nim/2.0.0_1/nim/config/nim.cfg' [Conf]
Hint: used config file '/opt/homebrew/Cellar/nim/2.0.0_1/nim/config/config.nims' [Conf]
Hint: used config file '/Users/runrc/dev/webui/examples/nim.cfg' [Conf]
..............................................................................................................
/Users/runrc/dev/webui/webui.nim(118, 15) Error: undeclared field: 'data'
Having the ability to set the window position would be very useful. Unfortunately, I'm not 100% proficient with Nim, so any help in fixing this error would be helpful?
I've updated the bindings & wrapper, this should be fixed.
It would be very useful if we could get and set the window size and position. Can we expect this functionality to be available soon?