Jump to content

Recommended Posts

  • Scripting Moderators
On 2017-6-14 at 19:57, Axel said:

Indeed, memo and comboox are pretty difficult and if not possible, comine actual gui in mta with your functions. We should let it for the last, until then, for progress bar: 

It is much easier and usefull. There is even a usefull function on wiki: dxDrawProgressBar or dxDrawLoading

DGS has updated to 2.66 with DX Progress Bar .

See the update log: http://angel.mtaip.cn:233/dgsUpdate/

Edited by thisdp
Link to comment
  • Scripting Moderators
On 2017-6-23 at 22:37, Axel said:

Goood! Now we need checkox and memo and we can replace entirre gui with yours!

I got some problems that  memo may use much performance in client.

Link to comment
  • Scripting Moderators
6 hours ago, Axel said:

Try to reduce usage, lesser loops, if any, lesser dx drawings, if you made it round, make it square, to use less dxdrawrectangle. Or rewrite it in a different way.

How to render depends on text selection.

dxDrawText takes much performance.

Edited by thisdp
Link to comment
  • Scripting Moderators
On 2017-6-23 at 22:37, Axel said:

Goood! Now we need checkox and memo and we can replace entirre gui with yours!

Now I got a big problem with memo. I can hardly deal with newline of memo when the text is out of bounding box ( not the argument in dxDrawText ) which is used to make text selection. And I can't use CEF to replace it because CEF doesn't support IME.

Edited by thisdp
Link to comment
  • Scripting Moderators
On Sunday, July 02, 2017 at 01:29, Senpai said:

so when can we expect a radio button?

soon but i cant make memo.If i use my way to make memo, your client will be very lag.

Edited by thisdp
Link to comment
  • Scripting Moderators
12 hours ago, Gourmet. said:

Sometimes when I alt tab and get back after some time, nothing is functional on that GUI. I have gridlist there. @thisdp

What do you mean?

13 hours ago, Senpai said:

work on the things you can make:D

radio button is WIP

Link to comment
  • Scripting Moderators
1 hour ago, Gourmet. said:

I can't press anything, I can't close it, none of the buttons are working.

Maybe you enabled your chat box input.

1 hour ago, Gourmet. said:

I can't press anything, I can't close it, none of the buttons are working.

If you can't click dgs buttons , can't input something in dgs edit etc, event "onClientClick" shouldn't be working.

Link to comment
  • Scripting Moderators
5 hours ago, Axel said:

What is the status of memo? It is the only gui element stoppping me from reacing my entire gui with yours.

Serious problem with memo. 

Link to comment
  • Scripting Moderators
3 hours ago, Axel said:

Present it to us (the code). We could help you to fix the problem.

Not so easy. The problem is HOW TO DO rather than the code.

Well. If we want to make a memo with dx and without CEF, first thing that we need is the method of text selection.

As is known to us all, memo like edit box but it is multi-lined. What I want to do is  to deal with the multi line.

Text have word break in the original memo. And have text selection.

For example,

text1 = "Hello everyone, I am thisdp. And I want to make a dx memo."

This is a long string. If the memo is not wide enough, the rest text will be shown in the next line.

And now the problem appears. How can I know where the text will be break ?

If I use dxGetTextWidth with "while/repeat/for" in lua, the performance will be very very low.

So I need a function that can get the string index from position

Link to comment

Can you not do smething like this: 

 

local nr = 8
function formatString( text ) -- function to format the entire text into a table
	if string.len(text) > nr then
		return string.sub(text, 1, nr-1), formatString( string.sub(text, nr) )
	else
		return text
	end
end

local testText = "we are testing here something, if it makes our table"
local textTable = { formatString(testText) }

And then just use the table in your code?

Link to comment
  • Scripting Moderators
2 minutes ago, Axel said:

Can you not do smething like this: 

 


local nr = 8
function formatString( text ) -- function to format the entire text into a table
	if string.len(text) > nr then
		return string.sub(text, 1, nr-1), formatString( string.sub(text, nr) )
	else
		return text
	end
end

local testText = "we are testing here something, if it makes our table"
local textTable = { formatString(testText) }

And then just use the table in your code?

I mean the word break.

It is the same way to realize text selection and word break.

The position means the position like cursor position.

Edited by thisdp
Link to comment
  • Scripting Moderators
4 hours ago, Axel said:

Can you not do smething like this: 

 


local nr = 8
function formatString( text ) -- function to format the entire text into a table
	if string.len(text) > nr then
		return string.sub(text, 1, nr-1), formatString( string.sub(text, nr) )
	else
		return text
	end
end

local testText = "we are testing here something, if it makes our table"
local textTable = { formatString(testText) }

And then just use the table in your code?

The width of every word is different.

Link to comment
On 29.05.2017 at 09:22, thisdp said:

Thisdp's Dx Graphical User Interface System


Features:
1.Check Update(Will Notice You , But You Can Choose To Ignore It)
2.It includes Window, Edit, Button, Gridlist, Image, ScrollBar, ScrollPane, Label,TabPanel, Cyclehitshape, CMD, RadioButton
3.Edit Seltion Fixed
4.Cyclehitshape is used to check whether your mouse is in the target cycle area.
5.Debug Mode , Command: "debugdgs"
6.You can apply shader to the dxgui
7.Include CMD, Command: "cmd"

Notice:Do not close your server or stop the script when it is updating.


But....
Doesn't include radio button, check button ......(they can be made by button)

Wiki: https://wiki.multitheftauto.com/wiki/Dgs ( Still Working In Process )

Here are two ways to download DGS ( Notice: Script Name Must Be "dgs")

Full script (need to be unziped): here

Updater (need to be unziped): here

To Contact Me , Skype: thisdpzjl

If you want to close update system, you can clear 'update.lua' but not delete it.

PmExU5C.jpg

Hey. These functions do not work: 

Link to comment

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.
×
×
  • Create New...