Scripting Moderators thisdp Posted November 14, 2017 Author Scripting Moderators Share Posted November 14, 2017 8 hours ago, medo7 said: dxDrawCircle dxDrawCircle Download shader_circle.zip This resource exports a 'dxDrawCircle' function for use in your own scripts. Example resource calling dxDrawCircle function from shader_circle: circle_example.zip Exactly! Link to comment
Scripting Moderators thisdp Posted November 15, 2017 Author Scripting Moderators Share Posted November 15, 2017 (edited) On 2017/11/13 at 11:36, Lowner said: dgsDxGUIBringToFront dont work with dgsDxCreateEdit. If I try to do: dgsDxGUIBringToFront (EditBox, 'left') dgsDxEditSetCaretPosition (EditBox, 1) The cursor simply flashes and I can not start writing without clicking the mouse on the dgsDxCreateEdit. I don't have such problem. try to update your dgs to the latest version with updatedgs Edited November 15, 2017 by thisdp Link to comment
AfterAll14 Posted November 16, 2017 Share Posted November 16, 2017 Hi there. I have an idea for you, as soon as you seem to be interested in GUI programming. I'm not using your GUI system, but what I want to suggest has nothing to do with specific GUI, it's more like MTA problem atm. So, when you're programming a GUI, you are forced to constantly keep in mind all those numbers: buttons positions, windows sizes, font scales and so on. This information is a garbage that doesn't really help to improve script logic, but acts like stones attached to your legs that doesn't allow your brain to put some ideas into working script as fast as you may want to. So what I suppose for you is to make an editor where you can create GUI using drag/drop technique, that will generate GUI script automatically. This will allow brain to focus on things that really matter (design, comfort of usage, game logic), instead of wasting energy on dealing with garbage. If you are interested in making improvements over your current script version (maybe v2.0?) I guess this is a worthy thing to go for. P.S. Thanks for your efforts anyways. 2 Link to comment
Scripting Moderators thisdp Posted November 16, 2017 Author Scripting Moderators Share Posted November 16, 2017 7 hours ago, AfterAll14 said: Hi there. I have an idea for you, as soon as you seem to be interested in GUI programming. I'm not using your GUI system, but what I want to suggest has nothing to do with specific GUI, it's more like MTA problem atm. So, when you're programming a GUI, you are forced to constantly keep in mind all those numbers: buttons positions, windows sizes, font scales and so on. This information is a garbage that doesn't really help to improve script logic, but acts like stones attached to your legs that doesn't allow your brain to put some ideas into working script as fast as you may want to. So what I suppose for you is to make an editor where you can create GUI using drag/drop technique, that will generate GUI script automatically. This will allow brain to focus on things that really matter (design, comfort of usage, game logic), instead of wasting energy on dealing with garbage. If you are interested in making improvements over your current script version (maybe v2.0?) I guess this is a worthy thing to go for. P.S. Thanks for your efforts anyways. Thanks for your advice. Actually my dxlib focus on the designing. There are a lot of properties of every dxgui. Most of original gui functions can be replaced by dgs' ones directly. Link to comment
GodOfPenguins Posted November 17, 2017 Share Posted November 17, 2017 You can make the flashing pipe (| - pipe) invisible when ReadOnly is true? 1 Link to comment
GodOfPenguins Posted November 17, 2017 Share Posted November 17, 2017 dgsDxEditSetMaxLength not work if paste text through dgsDxGUISetText 1 Link to comment
Ahmed Ly Posted November 18, 2017 Share Posted November 18, 2017 that function doesn't work dgsDxMemoSetReadOnly 1 Link to comment
Scripting Moderators thisdp Posted November 18, 2017 Author Scripting Moderators Share Posted November 18, 2017 Thanks for your report. And I will fix them soon. 2 hours ago, Ahmed Ly said: that function doesn't work dgsDxMemoSetReadOnly 8 hours ago, Taka said: dgsDxEditSetMaxLength not work if paste text through dgsDxGUISetText 2 Link to comment
GodOfPenguins Posted November 18, 2017 Share Posted November 18, 2017 (edited) Why memo invisible? No errors function openSmsWindow(number) smartGUI.sms.smsLabel = DGS:dgsDxCreateLabel(0.05, 0.15, 1, 0.1, "Введите SMS для номера "..number.."", true, smartGUI.desktop, 0xFF000000) smartGUI.sms.memo = DGS:dgsDxCreateMemo(0.1, 0.3, 0.8, 0.4, "WHERE YOU?!", true, smartGUI.desktop, 0xFF0000FF, 1, 1, nil, 0xFFBFBFBF) end Edited November 18, 2017 by Taka 1 Link to comment
Scripting Moderators thisdp Posted November 18, 2017 Author Scripting Moderators Share Posted November 18, 2017 2 minutes ago, Taka said: Why memo invisible? No errors function openSmsWindow(number) smartGUI.sms.smsLabel = DGS:dgsDxCreateLabel(0.05, 0.15, 1, 0.1, "Введите SMS для номера "..number.."", true, smartGUI.desktop, 0xFF000000) smartGUI.sms.memo = DGS:dgsDxCreateMemo(0.1, 0.3, 0.8, 0.4, "WHERE YOU?!", true, smartGUI.desktop, 0xFF0000FF, 1, 1, nil, 0xFFBFBFBF) end What will it happen when you turn off "debugdgs" ? Link to comment
GodOfPenguins Posted November 18, 2017 Share Posted November 18, 2017 (edited) 7 minutes ago, thisdp said: What will it happen when you turn off "debugdgs" ? Nothing. Memo still invisible. If enter a lot of characters horizontally, it starts to work, but if enter a lot of characters vertically, it broken. Edited November 18, 2017 by Taka 1 Link to comment
Scripting Moderators thisdp Posted November 18, 2017 Author Scripting Moderators Share Posted November 18, 2017 (edited) 1 hour ago, Taka said: Nothing. Memo still invisible. If enter a lot of characters horizontally, it starts to work, but if enter a lot of characters vertically, it broken. The problem is found. Edited November 18, 2017 by thisdp Link to comment
Scripting Moderators thisdp Posted November 18, 2017 Author Scripting Moderators Share Posted November 18, 2017 1 hour ago, Taka said: Nothing. Memo still invisible. If enter a lot of characters horizontally, it starts to work, but if enter a lot of characters vertically, it broken. Your problems are solved. Update DGS to 2.94. See update log : http://angel.mtaip.cn:233/dgsUpdate 2 Link to comment
Scripting Moderators thisdp Posted November 18, 2017 Author Scripting Moderators Share Posted November 18, 2017 2 hours ago, Taka said: Nothing. Memo still invisible. If enter a lot of characters horizontally, it starts to work, but if enter a lot of characters vertically, it broken. May be this will help you. I have just finished it. https://wiki.multitheftauto.com/wiki/Dgs-dxmemo 2 Link to comment
Lowner Posted November 18, 2017 Share Posted November 18, 2017 On 15.11.2017 at 19:28, thisdp said: I don't have such problem. try to update your dgs to the latest version with updatedgs Thakns, it work. 1 Link to comment
ahmedo01 Posted November 19, 2017 Share Posted November 19, 2017 Good library. Thanks for it. http://prntscr.com/hcf9e8 I have a gridlist and second column is blurred why? Can you help me with that? 2 Link to comment
Ahmed Ly Posted November 19, 2017 Share Posted November 19, 2017 13 minutes ago, ahmedo01 said: Good library. Thanks for it. http://prntscr.com/hcf9e8 I have a gridlist and second column is blurred why? Can you help me with that? post your code 1 Link to comment
ahmedo01 Posted November 19, 2017 Share Posted November 19, 2017 local AnimationWindow = exports.EKdgs:dgsDxCreateWindow(584,226,262,421,"TRYO ~ Animasyonlar",false) local stop = exports.EKdgs:dgsDxCreateButton(9,367,122,25,"Durdur",false,AnimationWindow) local close = exports.EKdgs:dgsDxCreateButton(133,367,120,25,"Kapat",false,AnimationWindow) local animgrid = exports.EKdgs:dgsDxCreateGridList(9,3,244,358,false,AnimationWindow) local column1 = exports.EKdgs:dgsDxGridListAddColumn(animgrid,"Kategoriler",0.35) local column2 = exports.EKdgs:dgsDxGridListAddColumn(animgrid,"Animasyon",0.5) for i=1,#anims do local cato, name = anims[i][1], anims[i][2] local row = exports.EKdgs:dgsDxGridListAddRow ( animgrid ) exports.EKdgs:dgsDxGridListSetItemText ( animgrid, row, column1, cato, false, false ) exports.EKdgs:dgsDxGridListSetItemText ( animgrid, row, column2, name, false, false ) exports.EKdgs:dgsDxGridListSetItemData ( animgrid, row, column1, {anims[i][3],anims[i][4]} ) end And buttons havent got wordwrap. Add it and it will be good. Thanks. 1 Link to comment
Scripting Moderators thisdp Posted November 19, 2017 Author Scripting Moderators Share Posted November 19, 2017 51 minutes ago, ahmedo01 said: local AnimationWindow = exports.EKdgs:dgsDxCreateWindow(584,226,262,421,"TRYO ~ Animasyonlar",false) local stop = exports.EKdgs:dgsDxCreateButton(9,367,122,25,"Durdur",false,AnimationWindow) local close = exports.EKdgs:dgsDxCreateButton(133,367,120,25,"Kapat",false,AnimationWindow) local animgrid = exports.EKdgs:dgsDxCreateGridList(9,3,244,358,false,AnimationWindow) local column1 = exports.EKdgs:dgsDxGridListAddColumn(animgrid,"Kategoriler",0.35) local column2 = exports.EKdgs:dgsDxGridListAddColumn(animgrid,"Animasyon",0.5) for i=1,#anims do local cato, name = anims[i][1], anims[i][2] local row = exports.EKdgs:dgsDxGridListAddRow ( animgrid ) exports.EKdgs:dgsDxGridListSetItemText ( animgrid, row, column1, cato, false, false ) exports.EKdgs:dgsDxGridListSetItemText ( animgrid, row, column2, name, false, false ) exports.EKdgs:dgsDxGridListSetItemData ( animgrid, row, column1, {anims[i][3],anims[i][4]} ) end And buttons havent got wordwrap. Add it and it will be good. Thanks. DGS:dgsDxGUISetProperty(button,"wordbreak",true) 1 hour ago, ahmedo01 said: Good library. Thanks for it. http://prntscr.com/hcf9e8 I have a gridlist and second column is blurred why? Can you help me with that? Don't worry about it, it will be fixed in the next update/version. Thanks for your advice. Link to comment
ahmedo01 Posted November 19, 2017 Share Posted November 19, 2017 I got a very important bug. Needs hot fix. I use edit in my gui and added this code addEventHandler("onClientDgsDxGUITextChange", add_item_amount, function(element) fixEdits() LAST_AMOUNT = exports.EKdgs:dgsDxGUIGetText(add_item_amount) reloadPriceCalc() end) function fixEdits() local price = tonumber(exports.EKdgs:dgsDxGUIGetText(add_item_price)) local amount = tonumber(exports.EKdgs:dgsDxGUIGetText(add_item_amount)) local buyamount = tonumber(exports.EKdgs:dgsDxGUIGetText(buy_select_edit)) if not price then exports.EKdgs:dgsDxGUISetText(add_item_price,"") end if not amount then exports.EKdgs:dgsDxGUISetText(add_item_amount,"") end if not buyamount then exports.EKdgs:dgsDxGUISetText(buy_select_edit,"") end if exports.EKdgs:dgsDxGUIGetText(add_item_price):len() > 5 then exports.EKdgs:dgsDxGUISetText(add_item_price,LAST_PRICE) end if exports.EKdgs:dgsDxGUIGetText(add_item_amount):len() > 5 then exports.EKdgs:dgsDxGUISetText(add_item_amount,LAST_AMOUNT) end if exports.EKdgs:dgsDxGUIGetText(buy_select_edit):len() > 5 then exports.EKdgs:dgsDxGUISetText(buy_select_edit,LAST_BUYAMOUNT) end end function reloadPriceCalc() local price = tonumber(exports.EKdgs:dgsDxGUIGetText(add_item_price)) or 0 local amount = tonumber(exports.EKdgs:dgsDxGUIGetText(add_item_amount)) or 0 exports.EKdgs:dgsDxGUISetText(GUIEditor.label[5],"Toplam: $"..(price*amount)) local buyamount = tonumber(exports.EKdgs:dgsDxGUIGetText(buy_select_edit)) if buyamount then exports.EKdgs:dgsDxGUISetText(GUIEditor.label[10],"Alınacak eşya sayısı: "..buyamount) end local selectedbuy = exports.EKdgs:dgsDxGridListGetSelectedItem( items_list ) if selectedbuy and selectedbuy > -1 and buyamount then local idata = exports.EKdgs:dgsDxGridListGetItemData( items_list, selectedbuy, 1 ) exports.EKdgs:dgsDxGUISetText(GUIEditor.label[12],"Ödenecek miktar: $"..(buyamount * idata.price)) end end and when you try to enter something into edit. Game freeze''.s. Waiting for fix. 1 Link to comment
ahmedo01 Posted November 19, 2017 Share Posted November 19, 2017 I think it's about dgsDxGUISetText. 1 Link to comment
Scripting Moderators thisdp Posted November 21, 2017 Author Scripting Moderators Share Posted November 21, 2017 (edited) On 2017/11/20 at 02:44, ahmedo01 said: I think it's about dgsDxGUISetText. Stack Over Flow. I mean you make the code into a dead loop. If you set text under the event "onClientDgsDxGUITextChange" without conditions. It will lead the thread into a dead loop. TextChanged->SetText->TextChanged->SetText... From your code I think that what you need may be this function. dgsDxEditSetWhiteList(edit,"[^0-9$]") On 2017/11/19 at 21:40, ahmedo01 said: Good library. Thanks for it. http://prntscr.com/hcf9e8 I have a gridlist and second column is blurred why? Can you help me with that? I fixed the problem, updatedgs. Edited November 21, 2017 by thisdp 1 Link to comment
ahmedo01 Posted November 21, 2017 Share Posted November 21, 2017 Is the update server working? Thanks for replies. 1 Link to comment
Scripting Moderators thisdp Posted November 21, 2017 Author Scripting Moderators Share Posted November 21, 2017 4 hours ago, ahmedo01 said: Is the update server working? Thanks for replies. Not working? Link to comment
SmoothGarlic Posted November 22, 2017 Share Posted November 22, 2017 Hi, i hope my eyes aren't broken When i look at this GUI i see a blure effect or something, can u fix that or how can i fix that ? I use the updated version. https://imgur.com/a/4rWPr 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now