Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Baguettator

#161
Hi and congrats for the new release ! I tested a few times and the new visuals things are very appreciated ! As for the other features :)

I probably already ask the question, but I want to (re)ask it in case of some plans could have changed, because AGS development seems to be in a good mood : is AGS editor going to work with PNG files for functions like DrawImage or DynamicSprites.CreateFromFile ? As far as I know, CreateFromFile can't use alphachannels, and sometimes it is a problem.

Another question was in my mind : is it convenient if we get the possibility to have items in listboxes that are cut if the items' text is too long, ending with a "..." ? It could be very nice to have this feature independantly of the "Guicontrol cut their content" option, because for listboxes it's a special case.

Again for listboxes : could we have directly in the editor a way to "change" the visuals for their arrows ? And eventually for a slider to scroll them ? It could minimize the scripting, because for now we have to script and create tons of buttons for that.

Again and again : thanks for all your work on AGS, it's really a very nice thing :)
#162
I'm speaking about the custom extenders linked to standard structs !

QuoteThe label is not supposed to cut anything without "clip contents", but my guess is that the font renderer may prevent anything from being drawn in negative relative coordinates (above and to the left from text's starting drawing position).

On the question why it is drawn too high, I quickly experimented with this font (downloaded it here), and noticed that it cuts a pixel or two from top if it has "TTF font adjustment" set to "Resize ascender...", but it seems fine if this option is set to "Do nothing". Is this the effect that you are experiencing?

I think it cuts the negative positions.

I will test the "Do nothing" parameter, and I will let you know :)
#163
Quote from: Crimson Wizard on Sun 10/07/2022 23:03:07
Quote from: Baguettator on Sun 10/07/2022 22:39:10
- the functions for specific controls (functions like that : function my function (this Button*)) don't appear in the list of the editor (at the top of the script). It was not a problem in previous versions

What are these functions, where and how are they declared?

For example, I have these two functions declared in the script .asc :

Code: ags
function Prise_Objectif(int typesalle, Button *bouton)
function PionFouille(this Button*)


In the list of the script (the one who gathers ALL the functions of the script, at the top of the editor), normally, I should able to see :

PriseObjectif
Button::PionFouille

But the second one doesn't appear. And all the functions linked to a struct that is not created in the script (all the "standard" ones, like Button, GuiControl, ListBox etc...) don't appear in the list.

Quote from: Crimson Wizard on Sun 10/07/2022 23:03:07
Quote from: Baguettator on Sun 10/07/2022 22:39:10
- the labels seem to cut the letters at their top border, even if the option in General Settings is false ("GUIControl cut their content").

Please, give some details... what is the font, which parameters do you use, what is the label's parameters?

Sorry, the font is Gorri Sans, the label parameters are standard, the thing is that probably I need to add a vertical offset to the font so the top of the letters won't be cut by the label top edge. But if I didn't choose the "cut content for Guicontrol" option in General Settings, that's not intended to be cut ?

Quote from: Crimson Wizard on Sun 10/07/2022 23:03:07
Quote from: Baguettator on Sun 10/07/2022 22:39:10
- is there any reason for the DrawString function is not as good as the way texts are displayed in labels ? With my font (GorriSans), texts in labels are perfectly displayed, and when I use the DrawString function, the letters are "bold" and not as precise.

Depends on what do you draw upon. If the font is anti-aliased, and you draw on a surface without alpha channel, then the anti-aliasing will be lost.

Perfect, I didn't know about it ! thanks !
#164
Hi !

I found minor bugs in the last version :

- the functions for specific controls (functions like that : function my function (this Button*)) don't appear in the list of the editor (at the top of the script). It was not a problem in previous versions

- the labels seem to cut the letters at their top border, even if the option in General Settings is false ("GUIControl cut their content").

- is there any reason for the DrawString function is not as good as the way texts are displayed in labels ? With my font (GorriSans), texts in labels are perfectly displayed, and when I use the DrawString function, the letters are "bold" and not as precise.
#165
Hi,

Also I thought about a thing : would it be possible to make the slider's handle clickable even "out" from the slider's height ?

If my handle's image is 50*50 pixels, at min value or at max value, the slider is 25 pixels out from the slider (+/- 4 pixels, according to the strange maths in AGS  ;) ). The problem is that if I click on the handle, but the click is on the 25 pixels "out" from the slider, the handle doesn't react. Even if you click on it, and even if you have chosen the pixel-perfect collision.

Of course, if the handle is within the slider (not at min/max value), it works perfectly by clicking everywhere on it.
#166
OK, no problem for sliders, my code deals really well with that :)

1 tone down is about the "pitch" of the music. I could send you my project so that you can test and see.

Also I encountered again the strange sound, like a train slowing quickly... Strange...

Any update of AGS 3.6 with the fix for ListBox.RowCount bug ?
#167
Wow that's strange !!

Is it planned to change it ? Or there is a reason for that kind of "maths" to exist ? (I believe yes, because why to do difficult when you can do easy).

About my audio problems I told before, could you have a look if the PlayMp3File function works normally ? My code uses this function, I don't do anything excepting playing MP3 files normally, and I encounter "randomly" the bug while the files are played 1 tone under the original.

Also, the Audio.Play function works like before ? Because in the 3.5 versions, I didn't write parameters (I did myaudio.Play()), and it played once normally. Now the same audio files are playing several times, and I didn't change the code ! As you worked on audio before (as I saw in this thread), maybe things have changed a bit ?
#168
Quote from: Crimson Wizard on Fri 01/07/2022 19:52:27
This appeared to be an old bug (reproduced as early as AGS 3.2.1), but will be fixed now.

Will it be in the next update ?

About the slider :

Arrow buttons, Handle : 50*50
Slider width:50
Slider Max value : 7
I tried these situations :

-slider height=200
-slider height=273
- slider height=259

I always place the arrow buttons so that at max and min values, the handle is placed just next to the buttons corners.

In each case, there were 4 pixels between the arrow button (up) and the handle when it's in the max value position.

It seems to be a bug ?
#169
Quote from: Crimson Wizard on Fri 01/07/2022 19:52:27
Please tell what is the width of the slider itself?

Overall this is probably because of how handle position is calculated. From my memory, the slider's width is divided by value range, and that's how handle positions are set up.
For instance, if you have values 0-10, this means 11 positions. If your slider is 110 pixels wide, that would mean a position each 10 pixels, distributed along all the slider's width. If slider is 100 pixels wide, that would mean 9 pixels for position and so on. On top of that AGS may add some extra tweaks to create offsets/margins for a handle. This may result in slightly different offsets; the larger the graphics the larger this difference may be (in absolute pixel value).

The slider has the same width as the handle. My slider is vertical : so the max value is up. Min value is down. The strange thing is that the handle seems to be always with 4 pixels offset when it's max value. Could you reproduce the same problem with your own tests ? My handle is a square, the same width as the slider background.
#170
OK, I will gather informations and tell you what happenned exactly :)

About sliders, OK I understand, my question was if it was possible to get more options for the handle offsets, maybe it's not planned for now.

Few bugs, probably :

- If my handle is 50*50 pixels, when the slider value is minimal, the handle is perfectly 25 pixels out from the slider background. If the slider value is maximal, the handle is only at 21 pixels out from the slider background. There is always a 4 pixels "offset" when the value is maximal. Strange ?

- the LisBox.RowCount value seems bugged.When I launch my game, I add items in my listbox (for example 7 items). The gui where my listbox is is not visible yet. If I display the rowcount value, it's 0 ! then I make the gui visible, and display again the value : 5 ! ( the right value !) is it a bug that the listboxes' row count value are not set up propely until they appear at screen ?
#171
Well it could be useful to allow the difference between left-click and right-click in a slider, couldn't it ?

I have also 1 request, but I know that it's not really your plans to make new improvements :

Could it be possible to add new informations in the Slider struct ? Like the left corner's position (x, y, in the screen, or from the slider itself) of the handle. Also maybe a Y Offset ? And allow negative offsets ?

In my game, the sliders are custom, I use a rectangle for the slider background and a square for the handle. The problem is when value=0 (or value=max), half of the handle isout of the slider. So I need to use a transparent image for the slider, use a button for the real background of the slider, calculate how much the handle is out from the slider, resize the slider so that at value=0 (or value=max) the handle fit perfectly to the borders of the real background (the button's sprite)... And then place the arrows (buttons too) just on top and below the real background of the slider. This way I manage to create a true custom slider that fit perfectly. But it's a lot of work, it could be easier. Like if we can define that the handle's borders can't be out of the slider. Or give it offsets ? Also, being able to know the x,y coordinates of the handle could be useful to generate automatically the custom sliders' sprites at game_start, especially if they use the same images, but not at the same sizes.

Maybe I don't know how to make a good custom slider :) Well, I know it could be out of this thread because it looks like a technical question, but it's mainly a request - until someone tells me that there is an other already existing solution (sorry eri0o for always saying me that I'm out of this thread :( ).

I also encountered problems with the last 3.6 version: I'm playing MP3 audioclips, using the old audio functions (PlayClip or something like that), and at one moment, I heard like a distorsion sound for about 5 seconds, then the music played, but 1 tone lower...!!!
#172
I would like to "merge" the functions for 3 controls : the custom slider and the customs arrows I made for scrolling a list box. As there are many listboxes in my game, I would like to minimize the number of functions in global script. Merging would allow to do that in one single function, instead of 3 : 1 arrow for Scrolling up, 1 arrow for scrolling down, 1 slider for scrolling up or down. For me it's just an optimization for the script (less functions, less lines etc...).

I can't do that because the "onchange" functions need only 1 parameter, and the "onclick" functions need 2 parameters. So I can't apply a 2 parameters function for a slider (the game crashes and says "1 parameter intended").
#173
Quote from: Crimson Wizard on Tue 28/06/2022 14:57:57
There's no Slider_OnClick right now, there's OnChange which is somewhat a different thing. I guess the point is to support "OnClick" event in all controls? I may open this as a feature suggestion for the future.

Oh sorry, I wanted to write "Slider_OnChange". But I didn't realize that it's an "OnChange" function, and not a "OnClick". There would be no needs to make the "OnChange" function working with 2 parameters ? (control and mousebutton)

OK, I understand that you need to fix the errors instead of making new improvements. :)

Thanks for answering !
#174
Hi there ! I playtested my game, and I thought about some things :

Suggestions :

- Would it be possible to make "Slider_OnClick" functions to allow 2 parameters like "Buttons_OnClick" functions ? (so "Slider_OnClick(GUIControl *control, MouseButton *button"). If it's not a big problem, it will allow to simplify the code when we make our own sliders and arrows, gathering all of these controls into 1 function (and not 3). At least for me, it would be great :)

- Any way to add a parameter for list boxes that allow to "cut" the text of the items if they are too long (out of the listbox) ? And without "changing" the real text of these items (like the items are always the full text, but the listbox displays only what it fits into the box). Could be nice to allow a true/false option for this.

Problems :

- it seems that the "_" symbol doesn't allow to correctly find the "keyword" we are writing into the editor. For example, if I have to write into the editor my variable "is_bright", when I write "is_", it should appear in the list and select my variable (so then I just press enter and it's done). I mean for "autocompletion". Since 3.6, it doesn't understand the "_" symbol. Maybe other symbols do the same problem, I don't know.

- When I write "int p=player.Room", the word "Room" becomes in blue, because it's like the editor considers that we are talking about the struct "Room". Normally, it should stay in black, because it's not the struct, but the part of the "player" struct.

I hope my english is well understable :)
#175
Hi there !

I'm looking for a module that allows to write texts like the simple program "Notepad" (or "Word") into an AGS game. My goal is to allow the player to write some texts in some "boxes", like the player clicks on a button (or something), and he can write a text that appears in this button. He could also select the text, copy/paste etc...

Is there anyone available for AGS ? I'm using the latest  release. I didn't find anything like that in the forum, but maybe I just badly understand english and so I didn't see the ones that exist :D

Let me know !

Thanks :)
#176
@Crimson Wizard : are you going to update properly AGS 3.6 soon ? Or I have to use your fix you gave me before ?
#177
Well, I repeated the operation, and... it worked ?!

Will look if it happens again. I don't what hapened before...! Sorry :(
#178
It seems that my file is in UTF-8. I use Notepad (I don't know if it's the same name in english, it's the basic program in Windows).
#179
Hi again ! I created a new translation file (in the editor), and I saw that the texts inside it were badly displayed. Each éèÉ etc... was displayed badly.

I'm still using the Unicode format. Any idea ? I never got such problems before (I'm using AGS 3.6.0.25)
#180
@Crimson Wizard : Thanks for the fix, I will try it in a proper release :)
SMF spam blocked by CleanTalk