Portal SAMP
[Ajuda] Problema com Dialog - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP Mobile (https://portalsamp.com/forumdisplay.php?fid=11)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=12)
+--- Tópico: [Ajuda] Problema com Dialog (/showthread.php?tid=71)



Problema com Dialog - xbruno1000x - 29/09/2020

[Imagem: xlDcMQK.jpg]
Como pode ser visto na imagem, não é mostrado a dialog inteira.
Source:
dialog.cpp
https://pastebin.com/raw/h0PPBXJU
dialog.h
Código PHP:
#pragma once

#define DIALOG_STYLE_MSGBOX        0
#define DIALOG_STYLE_INPUT        1
#define DIALOG_STYLE_LIST        2
#define DIALOG_STYLE_PASSWORD    3

class CDialogWindow
{
public:
    
CDialogWindow();
    ~
CDialogWindow();

    
void Render();
    
void Clear();
    
void Show(bool bShow);
    
void SetInfo(charszInfoint length);

    
void DrawFormattedText();

public:
    
bool        m_bIsActive;
    
uint8_t     m_byteDialogStyle;
    
uint16_t    m_wDialogID;
    
char        m_utf8Title[64*1];
    
char*        m_putf8Info;
    
char*         m_pszInfo;
    
char        m_utf8Button1[64*1];
    
char        m_utf8Button2[64*1];

    
float        m_fSizeX;
    
float         m_fSizeY;
}; 



RE: Problema com Dialog - RosaScripter - 29/09/2020

(29/09/2020 09:57)xbruno1000x Escreveu: [Imagem: xlDcMQK.jpg]
Como pode ser visto na imagem, não é mostrado a dialog inteira.
Source:
dialog.cpp
https://pastebin.com/raw/h0PPBXJU
dialog.h
Código PHP:
#pragma once

#define DIALOG_STYLE_MSGBOX        0
#define DIALOG_STYLE_INPUT        1
#define DIALOG_STYLE_LIST        2
#define DIALOG_STYLE_PASSWORD    3

class CDialogWindow
{
public:
    
CDialogWindow();
    ~
CDialogWindow();

    
void Render();
    
void Clear();
    
void Show(bool bShow);
    
void SetInfo(charszInfoint length);

    
void DrawFormattedText();

public:
    
bool        m_bIsActive;
    
uint8_t     m_byteDialogStyle;
    
uint16_t    m_wDialogID;
    
char        m_utf8Title[64*1];
    
char*        m_putf8Info;
    
char*         m_pszInfo;
    
char        m_utf8Button1[64*1];
    
char        m_utf8Button2[64*1];

    
float        m_fSizeX;
    
float         m_fSizeY;
}; 
Código louco de entender fioti ;-;


RE: Problema com Dialog - Mihauwk_ - 29/09/2020

Opa, se voce ver ali na dialog tem uma setinha no canto, aperte nela, deve mostrar o resto da dialog Smile.

Seu codigo é bem diferente hein...aconselho usar um modo de fazer dialogs mais simples, não sei se o problema é no codigo, pois essa forma de dialog é bem diferente.


RE: Problema com Dialog - xbruno1000x - 30/09/2020

(29/09/2020 21:49)Mihauwk_ Escreveu: Opa, se voce ver ali na dialog tem uma setinha no canto, aperte nela, deve mostrar o resto da dialog Smile.

Seu codigo é bem diferente hein...aconselho usar um modo de fazer dialogs mais simples, não sei se o problema é no codigo, pois essa forma de dialog é bem diferente.

A setinha não funciona, realmente está bugado no APK. O dialog no gamemode foi feito de forma padrão e funciona perfeitamente no PC, provavelmente é alguma coisa errada no source, e eu não faço ideia do que seja...


RE: Problema com Dialog - Ricadel - 04/10/2020

use-o e não terá problemas, não agradeça.
https://pastebin.com/raw/7gGzVGHx
dialog.h: 
Código PHP:
#pragma once

#define DIALOG_STYLE_MSGBOX        0
#define DIALOG_STYLE_INPUT        1
#define DIALOG_STYLE_LIST        2
#define DIALOG_STYLE_PASSWORD    3
#define DIALOG_STYLE_TABLIST    4
#define DIALOG_STYLE_TABLIST_HEADERS    5

#include <string>

class CDialogWindow
{
public:
    
CDialogWindow();
    ~
CDialogWindow();

    
void Render();
    
void Clear();
    
void ShowListItems();
    
void ShowListInfo();
    
void GetListItemsCount();
    
void Show(bool bShow);
    
void SetInfo(charszInfoint length);
    
void GenerateDialogList();

    
void DrawFormattedText();
    
    
void RenderTabList(int dStyle);
    
void SetSelectedItem(int item, const char *text);
    
int GetSelectedItem();
    const 
char *GetSelectedItemText();
    
void ResetSelectedItem();
    
void SetupDialogStyles();
    
bool GetState() {
        return 
m_bIsActive;
    };
    
    
void DetectDialogTouchDown();
    
bool DetectDialogDoubleTap(int item);

public:
    
bool        m_bIsActive;
    
uint8_t     m_byteDialogStyle;
    
uint16_t    m_wDialogID;
    
char        m_utf8Title[64*1];
    
char*        m_putf8Info;
    
char*         m_pszInfo;
    
char        m_utf8Button1[64*1];
    
char        m_utf8Button2[64*1];

    
float        m_fSizeX;
    
float         m_fSizeY;

    
int m_bSL;
    
    
uint8_t m_iSelectedItem;
    
std::string m_strSelectedItemText;
    
    
int m_iNumberOfTaps;
    
uint32_t m_lastTimeTap;
    
uint32_t m_touchDownTime;
    
bool m_bSplitted;
}; 


Dodgy