SRL Archive - MSI Suggestions

MSI PlayerForm


Naum

2009-12-31 09:26:10

Apparently, according to coh3n, a player form for MSI still has to be done, so I called dibs on it.
However, since the SRL_PlayerForm does not work, the whole saving of the player's (INI) loading (INI) and other stuff needs to be added.

One problem.

What do I add to it, and how do I lay it out. I have a blank template:



For example:



This is the script btw, it's really messy. I ripped most of the stuff off Coh3n's form, so all credits to him. (Image (form) moving functions are from one of my old scripts).

program New;

Const
BitmapCount = 2;
mainBackground = 0;
x_Norm = 1;

var
// MSIForm variables.
Form_MSI : TForm;
FormBitmaps: array [0..BitmapCount - 1] of Integer;
Images : Array[0..1] of TImage;
b, w, h, i, fx2, fy2 : Integer;
StartPos, StartMousePos : TPoint;
AreMoving : Boolean;

Procedure GetPos(Sender1: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
Begin
GetMousePos(fX2, fY2);
StartPos := Point(Form_MSI.left, Form_MSI.top);
StartMousePos := Point(fx2, fy2);
Aremoving := True;
End;

Procedure GetPosX(Sender2: TObject; Shift: TShiftState; X, Y: Integer);
Begin
if AreMoving then
begin
GetMousePos(fX2, fY2);
Form_MSI.Left := StartPos.x + (fx2 - StartMousePos.x);
Form_MSI.Top := StartPos.y + (fy2 - StartMousePos.y);
end;
End;

Procedure GetPosY(Sender3: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
Begin
GetMousePos(fX2, fy2);
Form_MSI.Left := StartPos.x + (fx2 - StartMousePos.x);
Form_MSI.Top := StartPos.y + (fy2 - StartMousePos.y);
AreMoving := False;
End;

Procedure Close(Sender : TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
Begin
WriteLn('Closed Form');
Form_MSI.Close;
End;

Procedure OkiClick(Sender: TObject);
Begin
Case Sender Of
Images[0] : Form_MSI.ModalResult:= mrOk;
End;
End;

// This form was parsed using DFM Form Parser v.26c Beta by Ron.
// Generated from olol.dfm.
procedure MSIForm;
begin
FormBitmaps[mainBackGround] := LoadBitmap(ScriptPath + 'MSI_FormBackGround.bmp');
FormBitmaps[x_Norm] := LoadBitmap(ScriptPath + 'RS X.png');

Form_MSI := CreateForm;
Form_MSI.Left := 250;
Form_MSI.Top := 114;
Form_MSI.Width := 498;
Form_MSI.Height := 490;
Form_MSI.Caption := 'frmDesign';
Form_MSI.BorderStyle := NSNone;
Form_MSI.Color := clBtnFace;
Form_MSI.Font.Color := clWindowText;
Form_MSI.Font.Height := -11;
Form_MSI.Font.Name := 'MS Sans Serif';
Form_MSI.Font.Style := [];
Form_MSI.PixelsPerInch := 96;

Images[1] := TImage.Create(Form_MSI);
Images[1].Parent := Form_MSI;
Images[1].Width := 498;
Images[1].Height := 490;
b := FormBitmaps[mainBackGround];
GetBitmapSize(b, w, h);
CopyCanvas(GetBitmapCanvas(b), Images[1].Canvas, 0, 0, w, h, 0, 0, w, h);
Images[1].OnMouseDown := @GetPos;
Images[1].OnMouseMove := @GetPosX;
Images[1].OnMouseUp := @GetPosY;

Images[0] := TImage.Create(Form_MSI);
Images[0].Parent := Form_MSI;
Images[0].Width := 28;
Images[0].Height := 34;
Images[0].Top := 6;
Images[0].Left := 465;
b := FormBitmaps[x_Norm];
GetBitmapSize(b, w, h);
SafeDrawBitmap(b, Images[1].Canvas, 465, 6);
Images[0].OnClick := @OkiClick;

end;

procedure SafeMSIForm;
var
v : TVariantArray;
begin
SetArrayLength(v, 0);
ThreadSafeCall('MSIForm', v);
end;

procedure ShowMSIFormModal;
begin
Form_MSI.ShowModal;
end;

procedure SafeShowMSIFormModal;
var
v : TVariantArray;
begin
SetArrayLength(v, 0);
ThreadSafeCall('ShowMSIFormModal', v);
end;

procedure MainMSIForm;
begin
SafeMSIForm;
SafeShowMSIFormModal;
FreeForm(Form_MSI);
end;

begin
ClearDebug;
MainMSIForm;
end.

I need ideas, Thanks!

marpis

2010-01-01 09:05:55

This is what I have already done in my Kharidi Chef script
But the Add player / Delete player don't work. So the form is 90% done, all it needs is AddPlayer; DeletePlayer; and images. :) Already has saving to .ini

And to the empty space under Add/Delete player buttons I thought of some nice picture.

And btw, MSI playerform will definately have tabs. Multiplayer without tabs is very ugly IMO.

BobboHobbo

2010-01-01 20:46:37

Well since I havent done anything for MSI lately.

Flopped it up in 5 mins can be much better but just a breif outline :).

Coh3n

2010-01-02 09:27:57

From: marpis
And btw, MSI playerform will definately have tabs. Multiplayer without tabs is very ugly IMO.

Yeah, you should talk to Nava about the tabs on his form (the one he lost). They were exactly like the tabs you see in the RS General Store. If you could do this, it would really fit into the background. ;)

EDIT: I also think you should make the 'X', just the 'X', without the tab background. Looks cleaner IMO.

Sir R. M8gic1an

2010-01-04 10:34:30

Damn nice Bobbo!

~RM

Coh3n

2010-01-04 11:32:36

From: BobboHobbo
Flopped it up in 5 mins can be much better but just a breif outline :).

5 min? I'd like to see what it looks like after a couple hours. :eek:

EDIT: I think a list of what it should include may be something like this:
  • Name/Pass/Nick/etc.
  • Skill to train (using a drop down menu maybe) - once selected, another drop down menu appears with locations to train that skill.
  • An awesome logo, maybe make a thread in the Graphics section? I'm sure a ton of people will post different things.
Anythings else you guys think should be added?

Sir R. M8gic1an

2010-01-04 13:23:14

From: Coh3n
5 min? I'd like to see what it looks like after a couple hours. :eek:

EDIT: I think a list of what it should include may be something like this:
  • Name/Pass/Nick/etc.
  • Skill to train (using a drop down menu maybe) - once selected, another drop down menu appears with locations to train that skill.
  • An awesome logo, maybe make a thread in the Graphics section? I'm sure a ton of people will post different things.
Anythings else you guys think should be added?


A check box Menu rather than a drop down?

and then…

Players[0].Booleans[skill_Agility] := CheckBox[skill_Agility];

~RM

Coh3n

2010-01-04 14:24:49

I like that, but wouldn't it take up a lot of space on the form if we had a check box for every skill? Maybe it wouldn't, I'd have to see what it looks like.

@Bobbo: Where did you get the image for the "Start Script"? I recognize it, but I don't remember where from.

Blumblebee

2010-01-04 17:29:40

From: Coh3n
I like that, but wouldn't it take up a lot of space on the form if we had a check box for every skill? Maybe it wouldn't, I'd have to see what it looks like.

@Bobbo: Where did you get the image for the "Start Script"? I recognize it, but I don't remember where from.


i agree i think it would take waaaay to much space up. why dont we have a city combobox, and the second box which deturmines the skill/area/whatever can be manipulated to change the output given dependant on the first choice in the box above (hard to explain I hope you get the idea)

StarBlaster100 did this in his Powerskills script waaaaay back If i recall.

NCDS

2010-01-04 19:55:21

From: Blumblebee
i agree i think it would take waaaay to much space up. why dont we have a city combobox, and the second box which deturmines the skill/area/whatever can be manipulated to change the output given dependant on the first choice in the box above (hard to explain I hope you get the idea)

StarBlaster100 did this in his Powerskills script waaaaay back If i recall.


That's got my vote.

Coh3n

2010-01-05 00:06:48

From: Blumblebee
i agree i think it would take waaaay to much space up. why dont we have a city combobox, and the second box which deturmines the skill/area/whatever can be manipulated to change the output given dependant on the first choice in the box above (hard to explain I hope you get the idea)

StarBlaster100 did this in his Powerskills script waaaaay back If i recall.

That's exactly what I was talking about in my original post (except with drop down menus). Either way works for me.

I also think custom tabs/buttons would be awesome for MSI, but that may be too much work (or something we look into in the future).

marpis

2010-01-05 07:32:33

This would be cool and isn't very hard if you know tabs. A Nexus style break handler would be awesome by the way!

Coh3n

2010-01-05 10:50:55

From: marpis
This would be cool and isn't very hard if you know tabs. A Nexus style break handler would be awesome by the way!

That would be really cool. :)

Nava2

2010-01-05 11:07:51

From: Coh3n
That would be really cool. :)


I'll do it when I get some time.. might have to wait though :p

Also, I *doubt* it would be using the old style I created. I wish I had that setup.. the TTabController I created was awesome.. I might just recreate that component… :)

Coh3n

2010-01-05 14:13:03

From: Nava2
I'll do it when I get some time.. might have to wait though :p

Also, I *doubt* it would be using the old style I created. I wish I had that setup.. the TTabController I created was awesome.. I might just recreate that component… :)


I'm sure there are a lot of awesome things we could do, but to be honest, I think we need to create a simple form to start. We need to get this released. Lol.

BobboHobbo

2010-01-07 06:19:42

From: Coh3n


@Bobbo: Where did you get the image for the "Start Script"? I recognize it, but I don't remember where from.


From Runescapes Login. Ill Make a proper background and button since ive got PS installed now :)

@Marpis: I like your outline looks very well organised!

Coh3n

2010-01-07 09:55:33

From: BobboHobbo
From Runescapes Login. Ill Make a proper background and button since ive got PS installed now :)

@Marpis: I like your outline looks very well organised!

Lol as if I missed that, I look at the login screen 5x a day. :duh:

Naum

2010-01-07 11:40:38

From: Coh3n
Lol as if I missed that, I look at the login screen 5x a day. :duh:


You also missed the Event Handlers list :p.

BH: Maybe you can use LoginChars from scar, to draw on the button like 'start script' :)

Coh3n

2010-01-07 11:45:28

From: Naum
You also missed the Event Handlers list :p.

BH: Maybe you can use LoginChars from scar, to draw on the button like 'start script' :)

Yeah, I think since I've been away from school, I'm slowly losing brain cells.

Cazax

2010-01-07 15:02:38

Okay, I have the base:

Coh3n

2010-01-07 15:26:05

From: Cazax
Okay, I have the base:

I like everything except the border. :o I don't know why, I just don't think it fits in with the rest of the form.

Naum

2010-01-07 17:16:35

From: Coh3n
I like everything except the border. :o I don't know why, I just don't think it fits in with the rest of the form.


I guess we could remove the border and make it a lone TImage :), that would look pretty cool.

Coh3n

2010-01-07 17:17:30

From: Naum
I guess we could remove the border and make it a lone TImage :), that would look pretty cool.

Plus we can just make our own "Close Form" button/image.

BobboHobbo

2010-01-07 19:38:26

Well I tried my terrible PS Skillzzzz. Just went over Cazax's code with the new images. And new hover xD.

Got rid of the outline border. Looks cleaner.

Before:

After:

Sir R. M8gic1an

2010-01-07 19:50:27

doesn't look right….

The box needs to be moved up, so that the actual box is centered on the screen.
The start button's right edge needs to be aligned with the script setup box's right edge.

other than that, looks great :p

~RM

BobboHobbo

2010-01-07 19:52:45

From: Rasta Magician
doesn't look right….

The box needs to be moved up, so that the actual box is centered on the screen.
The start button's right edge needs to be aligned with the script setup box's right edge.

other than that, looks great :p

~RM


I dont know how to move the white box lol.

Cazax

2010-01-08 10:04:46

I don't like the new button and background :p Oh, by the way, could you round the borders so I add close buttons instead of default border?

Coh3n

2010-01-08 11:41:36

I don't mind the new background, but I don't really like the text of the new button. I like Caxax's first button text, although it seemed kind of small.

marpis

2010-01-08 13:50:05

The button-like edges are ugly and I think the form is too small :rolleyes:
And tbh, I think 2 tabcontrols is the only right way to do it, like my example shows.

Coh3n

2010-01-08 17:06:25

From: marpis
The button-like edges are ugly and I think the form is too small :rolleyes:
And tbh, I think 2 tabcontrols is the only right way to do it, like my example shows.

What do you mean - "button-like edges"?

Blumblebee

2010-01-08 21:57:48

From: marpis
The button-like edges are ugly and I think the form is too small :rolleyes:
And tbh, I think 2 tabcontrols is the only right way to do it, like my example shows.


I think it looks fine, it is one of the nicest forms i have seen in a long time tbh. However i agree in the sense that, if we're going to do it we might aswell do it right ;) We should go all out, and do it up properly, make it the best form we can to set the tone of MSI.

that however is easier said than done, i am happy if we keep this model, or if we expand on our current model to something more elaborate.

BobboHobbo

2010-01-08 22:42:13

From: Blumblebee
I think it looks fine, it is one of the nicest forms i have seen in a long time tbh. However i agree in the sense that, if we're going to do it we might aswell do it right ;) We should go all out, and do it up properly, make it the best form we can to set the tone of MSI.

that however is easier said than done, i am happy if we keep this model, or if we expand on our current model to something more elaborate.


Well if some dont like it, We should fix it to be liked by everyone before we publish.

marpis

2010-01-09 13:45:35

From: Coh3n
What do you mean - "button-like edges"?


I meant the picture in the first post. The second version of the same background is OK.

BobboHobbo

2010-01-09 20:05:33

MSI Logo winner = Frement ;p?


Coh3n

2010-01-10 00:13:57

From: BobboHobbo
MSI Logo winner = Frement ;p?


I think his is the best so far, but I also think we should let it go for another few days. Three days doesn't give that many people a chance.

marpis

2010-01-10 07:24:54

From: BobboHobbo
MSI Logo winner = Frement ;p?



I don't like it at all, sorry.

And I don't think we should get the best of the competition if it isn't good enough. I'd be happy with a simple text with a slight shadow-glow effect.
These guys try too hard :-\

Coh3n

2010-01-10 11:20:19

From: marpis
I don't like it at all, sorry.

And I don't think we should get the best of the competition if it isn't good enough. I'd be happy with a simple text with a slight shadow-glow effect.
These guys try too hard :-\

Seriously? I think it's sweet. Is it the MSI part you don't like? Because even if he made the MSI lettering match the PlayerForm, it would still look pretty good (IMO).

marpis

2010-01-10 13:27:09

From: Coh3n
Seriously? I think it's sweet. Is it the MSI part you don't like? Because even if he made the MSI lettering match the PlayerForm, it would still look pretty good (IMO).


Yea it's the MSI part, way too complicated :S

Nava2

2010-01-10 17:59:33

Just to let you know, form support isn't well supported in Simba.

Not sure if you are going to move it over or not, but just letting you know.

Coh3n

2010-01-10 19:06:38

From: Nava2
Just to let you know, form support isn't well supported in Simba.

Not sure if you are going to move it over or not, but just letting you know.

I think we should, but I haven't talked to anyone else about it. And is it that much more work to make forms well supported?

Nava2

2010-01-10 19:36:10

From: Coh3n
I think we should, but I haven't talked to anyone else about it. And is it that much more work to make forms well supported?


Talk to the PS developer… :|

Sir R. M8gic1an

2010-01-10 22:33:59

From: Nava2
Talk to the PS developer… :|


Hummm… If I remember right, I think ray had sorted out a way to do it.

~RM

Nava2

2010-01-10 23:00:54

From: Rasta Magician
Hummm… If I remember right, I think ray had sorted out a way to do it.

~RM


Linux.

Not to mention, Wizzup's words, forms will *never* be supported.

BobboHobbo

2010-01-11 01:35:00

Well we could make the form on SCAR then get the script to start up Simba xD.

Nah, Idk. Might aswell finish it what ever happens, happens?

Nava2

2010-01-11 07:31:05

Since they *kinda* work on Windows, why not just have the option to use the form, or not!

Coh3n

2010-01-11 11:04:34

From: Nava2
Not to mention, Wizzup's words, forms will *never* be supported.

But why?

Nava2

2010-01-11 18:08:33

From: Coh3n
But why?


Ask him.

NCDS

2010-01-11 18:16:54

From: Nava2
Just to let you know, form support isn't well supported in Simba.

Not sure if you are going to move it over or not, but just letting you know.


I'm all for moving this project to Simba when it is released. As I assume, for quite obvious reasons, that SRL + Simba will be the majority of SRL's setup.

That's no reason not to use a form for now though. It can be easily edited later on.

BobboHobbo

2010-01-11 18:29:45

From: NCDS
I'm all for moving this project to Simba when it is released. As I assume, for quite obvious reasons, that SRL + Simba will be the majority of SRL's setup.

That's no reason not to use a form for now though. It can be easily edited later on.


Thats true.

Blumblebee

2010-01-11 19:21:41

I don't see the point in implementing a form that isn't going to be part of MSI in X number of weeks. To be honest, I doubt that MSI will be ready before Simba comes out, which then we will have to convert some stuff (i am assuming), ditch the form regardless, and then release it anyways. So why the extra work for nothing?

Sir R. M8gic1an

2010-01-11 19:53:04

From: Blumblebee
I don't see the point in implementing a form that isn't going to be part of MSI in X number of weeks. To be honest, I doubt that MSI will be ready before Simba comes out, which then we will have to convert some stuff (i am assuming), ditch the form regardless, and then release it anyways. So why the extra work for nothing?


The big move to Simba will probably happen when SRL 5 is released. SRL 5 will start being worked on AFTER simbas release, and you can easily expected it to take a couple of months, therefore there will be more than enough time to use the form ;)

~RM

Blumblebee

2010-01-11 20:05:57

From: Rasta Magician
The big move to Simba will probably happen when SRL 5 is released. SRL 5 will start being worked on AFTER simbas release, and you can easily expected it to take a couple of months, therefore there will be more than enough time to use the form ;)

~RM


alright I guess, although I would assume SRL 5 to be in production faster than expected, remember lots of people will be itching to contribute, not to mention SRL 4 being a nice layout for it.

I guess I'll i'm saying is we should start steering towards Simba as its the future, instead of steering towards SCAR.

Coh3n

2010-01-11 20:30:48

From: Blumblebee
alright I guess, although I would assume SRL 5 to be in production faster than expected, remember lots of people will be itching to contribute, not to mention SRL 4 being a nice layout for it.

I guess I'll i'm saying is we should start steering towards Simba as its the future, instead of steering towards SCAR.

You're right. We could also just convince one of the Simba Devs to support forms. :rolleyes:

Sir R. M8gic1an

2010-01-12 04:37:33

From: Blumblebee
alright I guess, although I would assume SRL 5 to be in production faster than expected, remember lots of people will be itching to contribute, not to mention SRL 4 being a nice layout for it.

I guess I'll i'm saying is we should start steering towards Simba as its the future, instead of steering towards SCAR.


Hummm, not so sure about this, SRL 5 won't be a port of SRL 4 to SIMBA, it'll be a complete re-write of SRL from scratch.

~RM

Sir R. M8gic1an

2010-01-16 07:12:31

Time to choose a winning logo…


~RM

Coh3n

2010-01-16 14:02:04

From: Rasta Magician
Time to choose a winning logo…


~RM

Oh shit, yeah I was going to do that the other day, but had some school work, then I forgot. I'll gather the logos and make a new thread right now.

Coh3n

2010-01-27 12:16:22

From: Naum
Okay, I need a PNG file of it.
Furthermore, I started Tab integration on the form today. If anyone want's to help that's fine by me. I'll keep, or hope to keep, this thread regularly updated.

Why don't you just go to the host link and save the picture?

Naum

2010-01-28 17:25:32

From: Coh3n
Oh shit, yeah I was going to do that the other day, but had some school work, then I forgot. I'll gather the logos and make a new thread right now.


Okay, I need a PNG file of it.
Furthermore, I started Tab integration on the form today. If anyone want's to help that's fine by me. I'll keep, or hope to keep, this thread regularly updated.

27/01/10 - Added Tab adding/deleting. I used marpis' code from his script, much easier.
28/01/10 - Added 3 main buttons and fixed a few bugs, added a few consts.