Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

29
LINES

< > BotCompany Repo | #1027032 - Finger Type Mode [dev.]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 843K of libraries. Click here for Pure Java version (8194L/41K).

!7

cmodule FingerTypeMode > DynFullscreen {
  S text;
  
  visual withMargin(withCenteredButtons(dm_textFieldWithLabel text(),
    "Go fullscreen", rThread goFullscreen));
  
  JComponent fullscreenVisualize() {
    new L<JButton> buttons;
    int nButtons = 12;
    buttons.add(jbutton("Exit", rThread exitFullscreen));
    buttons.add(jbutton("SPACE", rThread { type(" ") }));
    S chars = "abcdefghijklmnopqrstuvwxyz";
    for (S s : stringChunks(chars, ratio_iceil(l(chars), nButtons-l(buttons)))) {
      buttons.add(jbutton(upper(s), rThread {
        setFullscreenComponent(withCenteredButtons(jcenteredlabel("Screen 2"),
          "Back", rThread defaultScreen));
      }));
    }
    ret northAndCenterWithMargins(
      fontSizePlus(4, dm_centeredTextField text()),
      hvgrid(chunks(4, buttons), 5);
  }
  
  void type(S s) {
    setField(text := unnull(text)+unnull(s));
  }
}

Author comment

Began life as a copy of #1027031

download  show line numbers  debug dex   

Travelled to 5 computer(s): bhatertpkbcr, mqqgnosmbjvj, pzhvpgtvlbxg, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027032
Snippet name: Finger Type Mode [dev.]
Eternal ID of this version: #1027032/12
Text MD5: 4cf81166972b91b2279b3c471ce2b996
Transpilation MD5: 4923f06943d380b7bd2c0930979d3884
Author: stefan
Category: javax / gui
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-02-11 19:33:35
Source code size: 920 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 54 / 486
Version history: 11 change(s)
Referenced in: -

Formerly at http://tinybrain.de/1027032 & http://1027032.tinybrain.de