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.


Messages - arcus

Pages: [1] 2
1
Development Deliberation / Can paws support Chinese input?
« on: August 16, 2005, 09:42:41 am »
Hi.all
I\'m using paws to make some gui, and now I need to input some Chinese character in the pawsedittextbox, but I found that it cannot display what I have inputed. And I check the pawstextbox\'s code, it seems that it only accept one byte character language input, so for the Chinese character, it cannot be inputed??Right?
Is there some way can the edittextbox accept Chinese character?

Any help and suggestion will be welcome!

Frank

2
Development Deliberation /
« on: August 16, 2005, 09:35:46 am »
Thanks a lot!

Frank

3
Development Deliberation /
« on: August 15, 2005, 03:06:25 am »
hi,
the problem has been solved. It is the CS version confiliction problem. Now it is Ok.

frank

4
Development Deliberation / which cs version current ps using?
« on: August 12, 2005, 12:25:31 pm »
Using daily build version or the 98_004?

Thanks a lot!

Frank

5
Development Deliberation /
« on: August 12, 2005, 08:10:57 am »
I feel the problem maybe the calling convention. Because I\'m using the MSVC to compile my project, and the compile option set __cdecl, but some method is called with a wrong stack sequence. For example, when calling widget class\' OnButtonPressed() and SetSize() method.
How do you think?

Thanks a lot!
Have a nice weekend!

Frank

6
Development Deliberation /
« on: August 12, 2005, 03:58:59 am »
the class of loginwindow is like this (header file ):


#ifndef __LOGINWIN_H__
#define __LOGINWIN_H__

/**
  *@file LoginWindow???????
  *
  *????????????LoginWindow??
  *
  *@author qcli
  */

#include \"paws/pawswidget.h\"
#include \"messagesubscriber.h\"
#include \"paws/pawstextbox.h\"
#include \"paws/pawsbutton.h\"
#include \"message.h\"
#include \"svraccountmessage.h\"
#include \"SPEngine.h\"
#include \"selectwin.h\"

/**
  *@brief LoginWindow??????¼????
  *
  *??????????¼???????????????????????????????????
  *??????????????????????????
  */
class LoginWindow:public pawsWidget, public MessageSubscriber
{
public:
 LoginWindow(PawsManager* manager);
  ~LoginWindow();
 bool PostSetup();
    /**
     *@brief Called whenever a button is pressed.
      *@param button The button pressed.
      *@param keyModifier Modifier key in effect.
      *@param widget The widget the button belongs to.
      *@return bool Parent\'s result or FALSE if no parent.
      */
 bool OnButtonPressed(int mouseButton,int keyModifier,pawsWidget* widget);
   bool OnMouseDown( int button, int modifiers, int x, int y );
    /**
   *@brief ??????????????????
      *@param message ????????????????LOGIN_ACK(??¼???)
   */
    void HandleMessage(Message* message);

   void SetEngine(SPEngine* engine);

   SelectWindow *GetSelect(){return select;}

private:
   /**
   *@brief ????????????????????
    */
    void ConnectToServer();
 
    ///??¼??š?
   pawsEditTextBox* login;  
   ///??¼????
   pawsEditTextBox* password;  

    SelectWindow* select;

   SPEngine* loginengine;

  pawsButton* okbtn;

  pawsButton* cancelbtn;

};
CREATE_PAWS_FACTORY(LoginWindow);
#endif




the .cpp file is like this:


#include
#include
#include
#include
#include \"log.h\"

#include \"loginwin.h\"
#include \"clientnetmanager.h\"
#include \"clientaccountmessage.h\"
#include \"winmanager.h\"
#include \"paws/pawsmanager.h\"
#include \"string.h\"

#define LOGIN_WINDOW_QUIT       100
#define LOGIN_WINDOW_LOGIN      101
LoginWindow::LoginWindow(PawsManager* manager)
                :pawsWidget(manager)
{}

LoginWindow::~LoginWindow()
{}

bool LoginWindow::PostSetup()
{
/*
   login = (pawsEditTextBox*)FindWidget(\"account\");
    if (login == NULL)
        return false;

    password = (pawsEditTextBox*)FindWidget(\"password\");
    if (password == NULL)
        return false;
    password->SetPassword(true);*/

 okbtn = (pawsButton*)FindWidget(\"ok\");
    //cancelbtn = (pawsButton*)FindWidget(\"cancel\");

  //login->SetParent(this);
   //password->SetParent(this);
    okbtn->SetParent(this);
 //cancelbtn->SetParent(this);
   return true;

}

void LoginWindow::SetEngine(SPEngine* engine)
{
 loginengine=engine;
 return;
}

bool LoginWindow::OnMouseDown( int button, int modifiers, int x, int y )
{
   printf(\"login window mouse down!!!!!!!!!!!!!!!!!!!!!\\n\");
    //pawsWidget::OnMouseDown( button, modifiers, x, y );

    BringToTop((pawsEditTextBox*)this->FindWidget(\"account\"));

    BringToTop((pawsEditTextBox*)this->FindWidget(\"password\"));

    BringToTop((pawsButton*)this->FindWidget(\"ok\"));

  //BringToTop((pawsButton*)this->FindWidget(\"cancel\"));

    // WinManager* win = loginengine->GetWinManager();
          //  win->ShowOKWindow( \"û?????û?????????\" );  
   return true;
}

bool LoginWindow::OnButtonPressed( int button, int keyModifier, pawsWidget* widget )
{
 printf(\"login window button pressed******************************************\\n\");
    switch( widget->GetID() )
    {
        case LOGIN_WINDOW_QUIT:
        {  
            printf(\"********quit*********\");
            loginengine->QuitClient();
            return true;
        }
       
        case LOGIN_WINDOW_LOGIN:
        {
            if ( strlen(login->GetText()) == 0 ||
                 strlen(password->GetText()) == 0)
            {
                WinManager* win = loginengine->GetWinManager();
              //win->ShowOKWindow( \"û?????û?????????\" );        
                return true;
            }                
           
            ConnectToServer();
            return true;
        }
           
    return false;
    }
    return false;
}
void LoginWindow::ConnectToServer()
{
  // char* account=login->GetText();
   //char* code=password->GetText();
  // LoginMsg* message=new LoginMsg(login->GetText(),password->GetText());
  // ClientNetManager* netmanager = loginengine->GetNetManager();
  // netmanager->SendMessage(message);
   
}
void LoginWindow::HandleMessage(Message* message)
{
 /*switch(message->type)
 {
   case MSG_LOGIN_ACK:
     {
            LoginAckMsg* recvmessage = new LoginAckMsg(message);

             switch( recvmessage->loginAck)
             {
           case 0:
                 {
                   WinManager* win = loginengine->GetWinManager();
                     win->ShowOKWindow( \"????????????????????!\" );
                   return ;
                }
           case 1:
                 {
                   WinManager* win = loginengine->GetWinManager();
                     win->ShowOKWindow( \"??????????????????????!\" );
                   return ;
                }
           case 2:
                 {
                   WinManager* win = loginengine->GetWinManager();
                     win->ShowOKWindow( \"????????????,???????¼????????????!\" );
                    return ;
                }
           case 3:
                 {
                    return ;
                }
              return ;
           }
       }
   case MSG_CHAR_LIST:
     {
           WinManager* win = loginengine->GetWinManager();
         select=(SelectWindow*)win->FindWidget(\"data/gui/selectperson.xml\");
           if(!select)
         {
               win->LoadWidget(\"data/gui/selectperson.xml\");
             select = (SelectWindow*)win->FindWidget(\"selectwindow\");
           }
             select->HandleMessage(message);
           select->Show();
             Hide();
             return;
        }
           return ;
    }*/

}

7
Development Deliberation /
« on: August 12, 2005, 03:49:49 am »
the WinManager class is like as follow:


#include
#include

#include \"winmanager.h\"
#include \"spengine.h\"
#include
#include
#include

#include \"paws/pawsprogressbar.h\"
#include \"paws/pawsmenu.h\"


WinManager::WinManager(SPEngine* engine,iObjectRegistry* objectReg,const char* skin)
               :PawsManager(objectReg,skin)
{
  myengine=engine;
}

WinManager::~WinManager()
{}


void WinManager::Init()
{
    RegisterFactories();
    LoadWidget(\"conf/login.xml\");
}

void WinManager::Start()
{
       
    login = (LoginWindow*)FindWidget(\"loginwindow\");
  login->SetEngine(myengine);
 login->Show();
  pawsMouse *pm = new pawsMouse(this);//?õ????pawsMouse?????
   pm->ChangeImage(\"Standard Mouse Pointer\");
}


void WinManager::RegisterFactories()
{
    pawsWidgetFactory* factory;
   
   factory = new LoginWindowFactory(this);
 }


WinManager class is a child class of PawsManager.

8
Development Deliberation / problem of paws handle event.
« on: August 11, 2005, 04:42:16 am »
hi, all
I\'m using paws to create my own gui system.
First I create the gui xml definition file and its related class, and then I create a class named winmanager to hold all the guis. And now I met a strange problem, when I click the mouse on a button in the VC debug mode, it can transfer this event to the winmanager and its gui widget, and it shows that OnButtonPressed method will be invoke, but then I goto the next step system does not invoke this OnButtonPressed method in my gui class.
It is quite strange, I\'m sure whether I explain my question clearly. Is there any simple independent sample of using paws system? How about the handle event system?

any help and suggestion will be welcome!


Frank

9
Development Deliberation /
« on: August 03, 2005, 11:57:18 am »
I have solved the problem.

thx a lot!
frank

10
Fan Art /
« on: July 28, 2005, 05:39:49 am »
I meet the same problem too.
The cal3d model exported from 3dsmax works well, but when I put this model into the game, for example, I replace the cally.cal3d model with my model in the sample of celtest. The model can be displayed, but also one of the his leg cannot move. Is there any limitation for crystalspace to load the model compared to the cal3d\'s miniviewer?
Does anyone meet the problem?

thanks
Frank

11
hi, all
I\'m using paws to make gui, and I think the backgroup and border of the pawsedittextbox is not so beautiful, so I make some change for it.
1. If I set the backgroup image for this pawsedittextbox, it is very difficult to make the image to fit the pawseditboxsize.
2. If I set a pawstextbox with same pistion for this pawseditextbox, it is very easy to lose the pawsedittextbox\'s focus, and then the backgroud image of the pawstextbox will be on the top and no text will be displayed.
Is there any simple way can implement this?

Thanks
Frank

12
Development Deliberation / question about server side engine use
« on: July 15, 2005, 04:41:09 am »
hi, all
I have a question about server side engine use. In my view, the CS engine helps server side to build up an virtual world according to the client side. Right? If so, whether system invoke the engine function of csDefaultRunLoop in th server side? I think we can use the engine help us to setup the whole basic data structure for the virtual world, but for the event loop, I\'m not sure whether we need the engine also, maybe we can also up this virtual world without this engine, of course this world is very weak and simple compared to the using engine\'s.  
In the PS, I check the psCSSetup file, it seems that it just load some CS plugins, but there is no CSDefaultRunLoop running in the server side?
How do you think so?

Any help and comment will be welcome!

Frank

13
Development Deliberation / a question about polygon display in CS
« on: July 07, 2005, 05:58:27 am »
hi?? all
I built a level model in the 3dsmax. In my model, I use a polygons to display a tile, it can see the ceiling from to top, but if the viewer is under the tile, there is no image can be seen. In my opinion, I just want to use a polygon to display the tile, but I\'m not sure that CS can support this, otherwise, I have to build some object to display the tile. Right?

Any help and suggestion will be welcome!

Frank

14
Development Deliberation /
« on: July 05, 2005, 04:49:48 am »
Quote
Originally posted by arcus
hi, all
As I know, CS support unicode, does this mean that aws support unicode too? Anyway if I want to display some Chinese character in the paws, should I refine the files in the package of common\\paws to support Chinese ttf file? If so, can anybody give me a hint for this?

Thank you very much!
Frank

Sorry, it seems that CS doesn\'t support unicode now, :(

15
Development Deliberation /
« on: July 04, 2005, 12:11:42 pm »
hi, all
As I know, CS support unicode, does this mean that aws support unicode too? Anyway if I want to display some Chinese character in the paws, should I refine the files in the package of common\\paws to support Chinese ttf file? If so, can anybody give me a hint for this?

Thank you very much!
Frank

Pages: [1] 2