ImpulseAdventure / GUIslice-Builder

Cross-platform drag & drop GUI builder for GUIslice
Other
168 stars 35 forks source link

Use of keypads with small screeens #187

Closed dirkx closed 2 years ago

dirkx commented 2 years ago

Describe the solution you'd like

When working with small screens (e.g. 320x240);l the offset given by the default templates for gslc_ElemXKeyPadCreate_Alpha() is so large that it is off the screen; even if the entry box is right at the top left.

Having the ability in the GUI builder to specify an offset with the TextBox; which is then used in the X,Y of gslc_ElemXKeyPadCreate_Alpha() would be useful. Or laternatively have some belts and braces that prevents the keypad ever being drawn off screen (in partuclar the enter/escape).

Additional context

Manually editing hotplate-nggb_GSLC.h and changing the X/Y values from thereof to 2 'solves it:

e./g. change

  static gslc_tsXKeyPadCfg_Alpha sCfgTx;
  sCfgTx = gslc_ElemXKeyPadCfgInit_Alpha();
  m_pElemKeyPadAlpha = gslc_ElemXKeyPadCreate_Alpha(&m_gui, E_ELEM_KEYPAD_ALPHA, E_POP_KEYPAD_ALPHA,
    &m_sKeyPadAlpha, 65, 80, E_BUILTIN5X8, &sCfgTx);

to

  static gslc_tsXKeyPadCfg_Alpha sCfgTx;
  sCfgTx = gslc_ElemXKeyPadCfgInit_Alpha();
  m_pElemKeyPadAlpha = gslc_ElemXKeyPadCreate_Alpha(&m_gui, E_ELEM_KEYPAD_ALPHA, E_POP_KEYPAD_ALPHA,
    &m_sKeyPadAlpha, 2, 2, E_BUILTIN5X8, &sCfgTx);
Pconti31 commented 2 years ago

@dirkx Yes, it would be useful. Which is why you can already do so. Simply select edit->options and select KeyPadAlpha tab, edit the X and Y values and/or change fonts, sizes of buttons etc...

Paul--

dirkx commented 2 years ago

On 5 Feb 2022, at 14:45, Paul Conti @.***> wrote:

@dirkx https://github.com/dirkx Yes, it would be useful. Which is why you can already do so. Simply select edit->options and select KeyPadAlpha tab, edit the X and Y values and/or change fonts, sizes of buttons etc...

Thanks - that is a good stopgap !

Dw.

Pconti31 commented 2 years ago

Fixed documentation inside User Guide, added to section to 5.0 customizing , 5.1.3 Keypad Alpha and 5.1.4 Keypad Numeric.