AriosJentu

[REL] Custom GUI Widget System

Recommended Posts

Suggestion: Make ":setFont" method for all elements in your script. like: Edits, Memos, Tabs(Title), Window(Title).
It's easy because i already made those in my version.

Problem(Maybe not): When i use Dark red theme with my window, (into the window) i made my Tab panels the Labels, Check boxes(Label) Comes with gray color and this make it hard to read.
( I solve this by make the entire Labels, Check boxes again with dark red theme )  

  • Like 1

Share this post


Link to post
1 hour ago, iMr.WiFi..! said:

Suggestion: Make ":setFont" method for all elements in your script. like: Edits, Memos, Tabs(Title), Window(Title).
It's easy because i already made those in my version.

Problem(Maybe not): When i use Dark red theme with my window, (into the window) i made my Tab panels the Labels, Check boxes(Label) Comes with gray color and this make it hard to read.
( I solve this by make the entire Labels, Check boxes again with dark red theme )  

Thank you for suggestion and reporting :)

About problem - I understand it. The reason is - tabpanel's tab now haven't option to save color scheme from it's parent. I think I'll add it in future.

About fonts - I'll add them soon.

Edited by AriosJentu

Share this post


Link to post

Update: Added CustomStaticImage widgets:

- Added CustomStaticImage widgets. When using this as parent, it saves to object Color Scheme. Used with fixing next bug:

- Fixed bug when adding element to TabPanel, it wont saves color scheme of TabPanel

- Added functions setFont, setFontSize and setSystemFont for some widgets, like Window, Edits, Labels, Buttons, and etc. Almost for all widgets.

*setFont function used for set custom font (.ttf), and setSystemFont used for set default MTA fonts for widget.

  • Like 1

Share this post


Link to post

Suggestion:
Make ".setFont" & ".setSystemFont" for Custom Combobox Items.
And for Custom dialog too.

Edited by iMr.WiFi..!

Share this post


Link to post
29 minutes ago, iMr.WiFi..! said:

Problem on line(6414):
You need to delete this line because Tab panel doesn't have a Label to Set font.

Thank you. It now fixed.

1 minute ago, iMr.WiFi..! said:

Suggestion:
Make ".setFont" & ".setSystemFont" for Custom Combobox Items.

Oki, I'll add it soon.

  • Like 1

Share this post


Link to post
22 minutes ago, AriosJentu said:

Thank you. It now fixed.

Oki, I'll add it soon.

 

24 minutes ago, iMr.WiFi..! said:

And for Custom dialog too.

I recently edit the reply check it.


+

Problem (Line: 4981):
Using ":setSystemFont" of checkbox doesn't change font.
I solve this by changing line to: "checkbox.Label:setSystemFont(font)"

Edited by iMr.WiFi..!
  • Like 1

Share this post


Link to post
2 hours ago, iMr.WiFi..! said:

 

I recently edit the reply check it.


+

Problem (Line: 4981):
Using ":setSystemFont" of checkbox doesn't change font.
I solve this by changing line to: "checkbox.Label:setSystemFont(font)"

Thank you. In current version fixed bug with checkboxes and buttons, and added font functions to dialogs. In next update I'll try to add them for Tooltips.

Share this post


Link to post

Minor codestyle update: Rewrited Dialog Widget to more readable style :D

Edited by AriosJentu

Share this post


Link to post

It looks much better than CEGUI on screenshots, but example file isn't working from same resource (0 errors in debug):

Spoiler

H8dsrNZ.png

+ there's missing test.lua 

Edited by MrDadosz

Share this post


Link to post

Nevermind, there were commented lines in meta.xml. Really nice, but my i5-6500 can't handle it. 100% core usage when I'm moving my mouse on GUI from this resource :/

Share this post


Link to post
1 hour ago, MrDadosz said:

Nevermind, there were commented lines in meta.xml. Really nice, but my i5-6500 can't handle it. 100% core usage when I'm moving my mouse on GUI from this resource :/

Give me example, where (or on what widget) you moving mouse and CPU usage is overloads. Is it on all widgets? 

Cuz I have i5-7200U, and U series are for laptops, and I haven't loading more than 20% of this resource.

Share this post


Link to post

If you don't mind, Can i re-publish this topic in Arabic sections? because it really good system and i hope that Arabs use it in some day! Of course all rights will come back to you.

  • Like 1

Share this post


Link to post
6 hours ago, iMr.WiFi..! said:

If you don't mind, Can i re-publish this topic in Arabic sections? because it really good system and i hope that Arabs use it in some day! Of course all rights will come back to you.

It will be good, thank you :)

Share this post


Link to post
On 22/09/2018 at 01:52, AriosJentu said:

Give me example, where (or on what widget) you moving mouse and CPU usage is overloads. Is it on all widgets? 

Cuz I have i5-7200U, and U series are for laptops, and I haven't loading more than 20% of this resource.

I used example.lua file included with script. I tested it today and I have big lagspikes when I'm moving main window to the bottom of the screen (left - right, right - left, down - up works normally, but moving it from top to bottom causes lag spikes).

Video:

 

Edited by MrDadosz
  • Like 1

Share this post


Link to post
5 hours ago, MrDadosz said:

I used example.lua file included with script. I tested it today and I have big lagspikes when I'm moving main window to the bottom of the screen (left - right, right - left, down - up works normally, but moving it from top to bottom causes lag spikes).

Video:

 

try to create gui element, and move your cursor, then you will find the same thing.

Share this post


Link to post
9 hours ago, MrDadosz said:

I used example.lua file included with script. I tested it today and I have big lagspikes when I'm moving main window to the bottom of the screen (left - right, right - left, down - up works normally, but moving it from top to bottom causes lag spikes).

Video:

 

I know about this troubles. One of the reasons is events, like OnClientRender and OnClientCursorMove. In this events there is too many calculations per frame - getting and setting gui positions. And I haven't any ideas how to fix this, cuz this events must be as main events of system, used to moving/resizing functions, widget animations and etc.

Share this post


Link to post
10 hours ago, AriosJentu said:

OnClientCursorMove

shrink this events with variable to get last x and last y

if u didn't understood what i mean download my dxlib and search for  "onClientDxWindowMove" and you will got understand also if u want understand more just check "dxSetPosition"

Edited by Master_MTA

Share this post


Link to post
1 hour ago, Master_MTA said:

shrink this events with variable to get last x and last y

if u didn't understood what i mean download my dxlib and search for  "onClientDxWindowMove" and you will got understand also if u want understand more just check "dxSetPosition"

This GUI Widget System is not based on dx

Share this post


Link to post
8 hours ago, Master_MTA said:

yeah i know am talking about calculation method 

Your calculation method can't be used here, because it needs to update position every time - every frame will be exec function "guiSetPosition", and it will have more lags, because this fuction executes in onClientRender, and it haven't any optimizations.

Share this post


Link to post

Update: Fixed codestyle for widgets

- Fixed codestyle of Custom Tooltips and Custom Loadings

- Added font functions for Custom Tooltips

- Removed some unnecessary lines for some optimization (but I think - nothing will happened with CPU usage :D)

Share this post


Link to post

Update: Added Custom Text Boxes (CustomEdits analog, but with custom design)

- It can be fully transparent, and can be putted on some your-own objects

- Added functions to get caret selection parameters

For current time its not merged in win.lua, cuz now testing for bugs. You also can send me bug reports.

Note: This boxes will never get fonts for memo boxes, because coefficient of difference between two lines are different for all fonts.

Screenshot: (notice that this style is not recommending to use in current windows system style, but it demonstrate how does them looks like)

UMZasgP.jpg

And, of course, this can be overload your CPU, because it's GUI :D In future, I hope, I'll port this system to DX, but for now I haven't any ideas how to make on them layering and hiding parts of images in some frames (for scroll panes, for example)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.